Main Types of Logic Gates
NOT gate
Inverts the input. For example: A=1 -> Out/B=0 , B=1 -> Out/B=1
AND gate
Output is only 1 if both A and B are 1.
A=1 B=1 C=1
A=0 B=1 C=0
A=1 B=0 C=0
A=0 B=0 C=0
A=1 B=1 C=1
A=0 B=1 C=0
A=1 B=0 C=0
A=0 B=0 C=0
NAND gate
The output of this gate is the inverse of the AND gate's output
A=1 B=1 C=0
A=0 B=1 C=1
A=1 B=0 C=1
A=0 B=0 C=1
A=1 B=1 C=0
A=0 B=1 C=1
A=1 B=0 C=1
A=0 B=0 C=1
OR gate
The output is 1 if one of the inputs are 1.
A=1 B=1 C=1
A=0 B=1 C=1
A=1 B=0 C=1
A=0 B=0 C=0
A=1 B=1 C=1
A=0 B=1 C=1
A=1 B=0 C=1
A=0 B=0 C=0
NOR gate
The output of the gate is the inverse of the OR gate
A=1 B=1 C=0
A=0 B=1 C=0
A=1 B=0 C=0
A=0 B=0 C=1
A=1 B=1 C=0
A=0 B=1 C=0
A=1 B=0 C=0
A=0 B=0 C=1
XOR gate
Only 1 if the two inputs are 1 AND 0.
A=1 B=1 C=0
A=0 B=1 C=1
A=1 B=0 C=1
A=0 B=0 C=0
A=1 B=1 C=0
A=0 B=1 C=1
A=1 B=0 C=1
A=0 B=0 C=0