NAND as AND

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.

Inverting an inverter

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.

How it works

Two NANDs, chained:

  1. NAND #1 takes A and B and produces !(A & B).
  2. NAND #2 takes that output, fans it out to both of its own inputs, and produces !(!(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

Why it matters

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.

Try this