Logic Gates
Logic Gates
In A 1 1 1
out 0 0 0
1 0 0
In B
0 1 0
OR gate
In A In B out
In A 0 0 0
out
In B 0 1 1
1 0 1
1 1 1
Inverter/NOT gate
A B
1 0
0 1
NAND gate
In A In B out
0 0 1
In A
0 1 1
out
In B 1 0 1
1 1 0
NOR gate
In A In A In B out
out
0 0 1
In B
0 1 0
1 0 0
1 1 0
XOR gate
In A In B out
0 0 0
In A
0 1 1
out
In B 1 0 1
1 1 0
XNOR gate
In A In B out
In A
0 0 1
out
0 1 0
In B
1 0 0
1 1 1
BUFFER gate
In Out
In out 0 0
1 1
Negative logic gates
Negative AND gate Negative NAND gate
In A In A
inv in A inv in A
out inv out
out
In B inv in B
In B inv in B
In A In B Inv A Inv B out In A In B Inv A Inv B out Inv
out
0 0 1 1 1 0 0 1 1 1 0
0 1 1 0 0 0 1 1 0 0 1
1 0 0 1 0 1 0 0 1 0 1
1 1 0 0 0 1 1 0 0 0 1
Negative logic gates
Negative OR gate Negative NOR gate
In A In A
inv in A inv in A
out out inv out
inv in B inv in B
In B In
In A In B Inv in Inv in out InBA In B Inv in Inv in out Inv
A B A B out
0 0 1 1 1
0 0 1 1 1 0
0 1 1 0 1
0 1 1 0 1 0
1 0 0 1 1
1 0 0 1 1 0
1 1 0 0 0
1 1 0 0 0 1
A B C D E
0 0 0 1 0
0 1 0 0 0
1 0 0 1 0
1 1 1 0 0
A B C D D’ A’ E’
0 0 0 0 1 1 0
A 0 0 1 1 0 1 1
A’
E’ 0 1 0 1 0 1 1
D’ 1 0 0 0 1 0 1
B
D 1 1 0 1 0 0 1
C
0 1 1 1 0 1 1
1 0 1 1 0 0 1
1 1 1 1 0 0 1
HALF ADDER
A half adder is
designed to combine
two binary digits
and produce a carry.
FULL ADDER
A quarter adder
is a circuit that
can add two
binary digits but
will not produce
a carry.
NOT gate example
In out
NPN
(1)
NPN
NPN
A B
(in) (out) (0)
NPN
1 0
0 1
NOT gate example
In out
NPN
NPN
(1)
NPN
A B
(in) (out)
NPN
1 0
0 1
BJT N P N
P N P
MOSFET
Different types of logic circuits: TTL and CMOS