The Seven Basic Logic Gates:
1. NOT Gate (Inverter):
Is a single input gate that simply inverts the input; that means if the input is 0 the output will be
1, and if the input is 1 the output will be 0
U F
F = U’ or F = ~U or F=Ū
or F = ⴈU
U F
0 1
1 0
2. AND Gate:
The AND gate is a multi-input gate that logically ANDs all inputs. The output will be HIGH (1)
only when ALL inputs are HIGH (1s), otherwise the output is LOW (0) . In other words: “For the
output to be 1, input1 AND input2 AND input3 AND … must be 1
ANDing is sometimes referred to as “Logical Multiplication”.
2 – input AND Gate: 3 – input AND Gate:
A B F A B C F
0 0 0 0 0 0 0
0 1 0 0 0 1 0
1 0 0 0 1 0 0
1 1 1 0 1 1 0
1 0 0 0
1 0 1 0
1 1 0 0
1 1 1 1
3. OR Gate:
The OR gate is a multi-input gate that logically ORs all inputs. The output will be LOW (0) only
when ALL inputs are LOW (0s), otherwise the output is HIGH (1)
In other words: “For the output to be 1, input1 OR input2 OR input3 OR … must be 1
ORing is sometimes referred to as “Logical Addition”.
2 – input OR Gate: 3 – input OR Gate:
A B F A B C F
0 0 0 0 0 0 0
0 1 1 0 0 1 1
1 0 1 0 1 0 1
1 1 1 0 1 1 1
1 0 0 1
1 0 1 1
1 1 0 1
1 1 1 1
4. Exclusive-OR (EXOR) (XOR) Gate:
The XOR gate is a two-input gate. The output will be LOW (0) if the two inputs are the same, the
output will be HIGH (1) if the two inputs are different.
XOR Gate:
A B F
0 0 0
0 1 1
1 0 1
1 1 0
5. NAND Gate:
The NAND gate is the opposite of the AND gate. The output will be LOW (0) only when ALL
inputs are HIGH (1s), otherwise the output is HIGH (1)
2 – input NAND Gate: 3 – input NAND Gate:
A B F A B C F
0 0 1 0 0 0 1
0 1 1 0 0 1 1
1 0 1 0 1 0 1
1 1 0 0 1 1 1
1 0 0 1
1 0 1 1
1 1 0 1
1 1 1 0
6. NOR Gate:
The NOR gate is the opposite of the OR gate. The output will be HIGH (1) only when ALL inputs
are LOW (0s), otherwise the output is LOW (0)
2 – input NOR Gate: 3 – input NOR Gate:
A B F A B C F
0 0 1 0 0 0 1
0 1 0 0 0 1 0
1 0 0 0 1 0 0
1 1 0 0 1 1 0
1 0 0 0
1 0 1 0
1 1 0 0
1 1 1 0
7. Exclusive-NOR (EXNOR) (XNOR) Gate:
The XOR gate is a two-input gate. The output will be LOW (0) if the two inputs are the same, the
output will be HIGH (1) if the two inputs are different.
XNOR Gate:
A B F
0 0 1
0 1 0
1 0 0
1 1 1