LearnTronics
NAND, NOR, and XNOR Gates
Invert a gate's output
The bubble convention lets us create three more familiar gates without learning three completely unrelated shapes.
NAND — NOT AND
Y = ~(A • B)
NAND is 0 only when both A and B are 1.
NOR — NOT OR
Y = ~(A + B)
NOR is 1 only when both A and B are 0.
XNOR — NOT XOR
Y = ~(A ⊕ B)
For two inputs, XNOR is 1 when the inputs are the same. That is why it is also useful as an equality detector.
Compare their truth tables
| A | B | NAND | NOR | XNOR |
|---|---|---|---|---|
| 0 | 0 | 1 | 1 | 1 |
| 0 | 1 | 1 | 0 | 0 |
| 1 | 0 | 1 | 0 | 0 |
| 1 | 1 | 0 | 0 | 1 |
Why NAND and NOR matter so much
NAND and NOR are called universal gates. Either type can be combined to build NOT, AND, OR, and ultimately any Boolean function. That makes them especially important in digital circuit design.