CSE204 (Lecture04)
CSE204 (Lecture04)
Lecture 04
Quiz 01
• Today
Binary Logic
• OR function:
– A||B, A|B
– A+B
– OR(A,B)
Truth Table
▪ A Truth Table provides a complete list of
every possible combination of inputs and
its corresponding outputs.
A A &
A.B A.B
B B
A two-input OR Gate
A A
A+B A+B
B B
A (one-input) NOT Gate
A A' A A'
Other Basic Gates
• NAND
• NOR
• XOR
• XNOR
The two-input NAND Gate
A A &
(A.B)' ≡ A
(A.B)' (A.B)'
B B B
≡≡
NAND Negative-OR
The two-input NOR Gate
A A A
B
(A+B)' ≡ (A+B)'
B
(A+B)'
B
NOR Negative-AND
The two-input XOR Gate
A A
A⊕B A⊕B
B B
The two-input XNOR Gate
A
AʘB
B
Universal Gates
NAND
Using NAND
NOT OR
Gate Gate
NOT AND
Gate Gate
NOR
Using NOR
NOT OR
Gate Gate
NOT AND
Gate Gate
BOOLEAN ALGEBRA
(Break!)
Boolean Algebra
▪ For every x, y in B:
❖ x+y=y+x
❖ x.y=y.x
▪ For every x, y, z in B:
❖ (x + y) + z = x + (y + z) = x + y + z
❖ (x . y) . z = x .( y . z ) = x . y . z
▪ For 0 and 1:
❖ 0+x=x+0=x
❖ 1.x=x.1=x
▪ For every x, y, z in B:
❖ x . (y + z) = (x . y) + (x . z)
❖ x + (y . z) = (x + y) . (x + z)
Duality