AND from NAND gates only — AND gate
exam standarduniversal-gate construction
Answer
2 NAND gates realising A · B
Why this example is worth doing
Building AND from NANDs takes two gates: one NAND to compute the complement, one more with its inputs tied to invert it back. The page shows the algebra alongside — ((A·B)′)′ = A·B by involution — and makes the economic point that this is why real libraries do not bother: since NAND is the cheap primitive, a design that wants AND usually restructures to absorb the inversion elsewhere rather than paying for a second gate.
Try your own input in the AND gate. Truth table, symbol and algebraic form for A·B, with a live two-input toggle.
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 |