AND from NAND — universal gates
introNAND then invert
Answer
2 NAND gates realising A · B
Why this example is worth doing
Two gates: a NAND to compute the complement of the product, then a tied-input NAND to invert it back. The page pairs the drawing with the algebra so that involution is visibly doing the work. It also flags the practical consequence that a NAND-only netlist never actually contains this pattern — a synthesiser would push the inversion into the next stage rather than pay for a gate that only undoes the previous one.
Try your own input in the Universal gates. Rebuild any of the other gates using only NAND, or only NOR, with the gate count.
How the answer is reached
Gate list
| Node | Gate | Inputs |
|---|---|---|
| g1 | nand | A, B |
| g2 | nand | g1, g1 |
NAND-only realisation
A ↑ B ↑ (A ↑ B)A · B— 2 NAND gates, verified by reading the network back out.
Truth table
| # | A | B | A ↑ B ↑ (A ↑ B) |
|---|---|---|---|
| 0 | 0 | 0 | 0 |
| 1 | 0 | 1 | 0 |
| 2 | 1 | 0 | 0 |
| 3 | 1 | 1 | 1 |