Professional Documents
Culture Documents
Basic Logic Gates
Basic Logic Gates
NOT GATE
~X
X ~X ~~X 0 1 0 1 0 1
A NOT gate is sometimes ~~X=X referred to as an inverter because it inverts the input value
AND Gate
OR Gate
NAND Gate
NOR Gate
NOR Gate
NOT-OR X Y W = X | Y Z = ~W = ~(X | Y) W Z X 0 0 1 1 Y 0 1 0 1 W 0 1 1 1 Z 1 0 0 0
NAND Gate
X Y Z = ~(X & Y) X 0 0 1 1 Y 0 1 0 1 W 0 0 0 1 Z 1 1 1 0 Z =
X
Y Z = ~X | ~Y X 0 0 1 1 Y ~X ~Y 0 1 1 1 1 0 0 0 1 1 0 0 Z 1 1 1 0
De Morgans Theorem-1
~(X & Y) = ~X | ~Y
NOT all variables Change & to | and | to & NOT the result
NOR Gate
X
Y Z X Z Y
Z = ~(X | Y) X 0 0 1 1 Y 0 1 0 1 Z 1 0 0 0
Z = ~X & ~Y
X 0 0 1 1 Y ~X ~Y 0 1 1 1 1 0 0 0 1 1 0 0 Z 1 0 0 0
De Morgans Theorem-2
~(X | Y) = ~X & ~Y
NOT all variables Change & to | and | to & NOT the result
De Morgans Theorem
NOT all variables Change & to | and | to & NOT the result -------------------------------------------~X | ~Y = ~(~~X & ~~Y) = ~(X & Y) ~(X & Y) = ~~(~X | ~Y) = ~X | ~Y ~X & !Y = ~(~~X | ~~Y) = ~(X | Y) ~(X | Y) = ~~(~X & ~Y) = ~X & ~Y
Exclusive-OR Gate
XOR X Z Y Z = X ^ Y xor(Z,X,Y)
X Y
0 0 1 1 0 1 0 1
Z
0 1 1 0
XOR
X ^ Y X $ Y X @ Y
X Y
(Verilog) (ABEL)
(textbook)
xor(Z,X,Y)
(Verilog)
Exclusive-NOR Gate
XNOR X Y
Z = ~(X ^ Y)
X Y
Z 0 0 1 1 0 1 0 1
Z
1 0 0 1
Z = X ~^ Y xnor(Z,X,Y)
XNOR
X ~^ Y !(X $ Y) X @ Y
X Y
(Verilog) (ABEL)
xnor(Z,X,Y)
(Verilog)
Multiple-input Gates
Z1 Z2
Z3
Z4
Output Z 1 is HIGH only if all inputs are HIGH An open input will float HIGH
Multiple-input OR Gate
Z2