CS计算机代考程序代写 Slide 1

Slide 1

Digital Logic Review
By Christopher Mar

NOT Gate
x
F
x F

NOT Gate
x
F
x F
0

NOT Gate
x
F
x F
0 1

NOT Gate
x
F
x F
0 1
1

NOT Gate

x
F
x F
0 1
1 0

AND Gate
x
F
x y F

y

AND Gate
x
F
x y F
0 0

y

AND Gate
x
F
x y F
0 0 0

y

AND Gate
x
F
x y F
0 0 0
0 1

y

AND Gate
x
F
x y F
0 0 0
0 1 0

y

AND Gate
x
F
x y F
0 0 0
0 1 0
1 0

y

AND Gate
x
F
x y F
0 0 0
0 1 0
1 0 0

y

AND Gate
x
F
x y F
0 0 0
0 1 0
1 0 0
1 1

y

AND Gate
x
F
x y F
0 0 0
0 1 0
1 0 0
1 1 1

y

Bitwise Operation
Perform logical operation between all inputs for each bit position

Bitwise AND Example
10011 AND 11001

10011
11001

1
0
0
0
1
AND

Lecture Question
What is the result of 01010 AND 10111?
10111
11111
10101
00010
01010

OR Gate
x
F
x y F

y

OR Gate
x
F
x y F
0 0

y

OR Gate
x
F
x y F
0 0 0

y

OR Gate
x
F
x y F
0 0 0
0 1

y

OR Gate
x
F
x y F
0 0 0
0 1 1

y

OR Gate
x
F
x y F
0 0 0
0 1 1
1 0

y

OR Gate
x
F
x y F
0 0 0
0 1 1
1 0 1

y

OR Gate
x
F
x y F
0 0 0
0 1 1
1 0 1
1 1

y

OR Gate
x
F
x y F
0 0 0
0 1 1
1 0 1
1 1 1

y

Lecture Question
What is the result of 01010 OR 10110?
10110
11111
11110
10110
01010

NOR (NOT OR) Gate
x
F
x y F
0 0 1
0 1 0
1 0 0
1 1 0

y

XOR (Exclusive OR) Gate
x y F
0 0 0
0 1 1
1 0 1
1 1 0

XOR Gate
x y F
0 0 0
0 1 1
1 0 1
1 1 0

XOR between any value and 1 inverts the value

Special Considerations for PLP
PLP ISA does not include an XOR or NOT

Boolean Algebra Properties
Annulment law
a & 0 = 0
a | 1 = 1
Identity law
a & 1 = a
a | 0 = a

Lecture Question
Which of the following would be equivalent to NOT $t5?
andi $t5, $t5, 0
andi $t5, $t5, 1
ori $t5, $t5, 0
ori $t5, $t5, 1
nor $t5, $t5, $t5

Multiplexer

i0
F
i1
s0
s0 i1 i0 F
0 0 0 0
0 0 1 1
0 1 0 0
0 1 1 1
1 0 0 0
1 0 1 0
1 1 0 1
1 1 1 1

s0 F
0 i0
1 i1

/docProps/thumbnail.jpeg