NAND gate
The NAND gate is an AND followed by an inverter: the output is 0 only when every input is 1, and 1 otherwise. NAND is functionally complete — any Boolean function can be built from NAND gates alone — so it is one of the most important gates in real hardware.
Two-input NAND
Wire inputs A and B and read Y. The output is the exact inverse of AND: it is 0 only in the last row, where both inputs are 1, and 1 everywhere else.
| A | B | Y |
|---|---|---|
| 0 | 0 | 1 |
| 0 | 1 | 1 |
| 1 | 0 | 1 |
| 1 | 1 | 0 |
NAND as an inverter
Tie both inputs of a NAND together and feed them signal A. With both inputs equal, the gate computes NOT(A · A) = Ā, so it behaves exactly like an inverter. This is the first step in proving NAND is a universal gate.
SR latch from two NAND gates
Cross-couple two NAND gates — each gate's output feeds the other's input — to build an active-low SR latch that stores one bit. Pulsing S̄ low sets Q to 1; pulsing R̄ low resets Q to 0; holding both high preserves the stored state. This memory cell is the seed of every flip-flop.
Citations
- Sheffer, H. M. (1913). A set of five independent postulates for Boolean algebras, with application to logical constants. Reference 1
- Shannon, C. E. (1938). A symbolic analysis of relay and switching circuits. Reference 2