NAND and NOR Gates
Understand inverted universal logic gates and how they can build any digital system.
The Power of Universal Gates
Did you know that you can build literally any logic circuit in existence using nothing but NAND gates? This is called universal logic. NAND and NOR gates are simply their base counterparts (AND / OR) permanently fused with an integrated NOT inverter on their output.
The NAND Gate
The NAND gate (NOT-AND) acts precisely opposite to an AND gate. It evaluates to true unless both of its inputs are true. Try flipping both switches ON in the simulator; the output will drop to 0!
| Input A | Input B | NAND Output |
|---|---|---|
| 0 | 0 | 1 |
| 0 | 1 | 1 |
| 1 | 0 | 1 |
| 1 | 1 | 0 |
The NOR Gate
The NOR gate (NOT-OR) evaluates to true if and only if both inputs are false. It acts as a complete blocker. The exact moment any single input turns 1, the entire NOR gate violently shuts down and outputs 0.
| Input A | Input B | NOR Output |
|---|---|---|
| 0 | 0 | 1 |
| 0 | 1 | 0 |
| 1 | 0 | 0 |
| 1 | 1 | 0 |