One NAND gives you the opposite of AND. Add another and you're back. A ready-made basics circuit you can open in the TorchAnvil simulator.
A NAND gate gives you !(A & B) — the opposite of AND. So if you want a
plain AND, all you have to do is invert the NAND's output. And the
cheapest inverter we have? Another NAND, with its inputs tied together.
Two NANDs, chained:
!(A & B).!(!(A & B)) — which is just A & B.Double-negation cancels, and you're left with AND.
| A | B | NAND #1 | Lamp (A & B) |
|---|---|---|---|
| 0 | 0 | 1 | 0 |
| 0 | 1 | 1 | 0 |
| 1 | 0 | 1 | 0 |
| 1 | 1 | 0 | 1 |
This is part two of the universality proof. You've now seen NAND-as-NOT and NAND-as-AND. With just those two, you can already build a huge chunk of digital logic — and the circuits that result are surprisingly close to how real silicon is laid out, where NAND is often the cheapest gate to fabricate.
A & B is true.!(A & B) signal — the opposite of what ends up at the lamp.