NAND as NOT

Tie a NAND's inputs together and it quietly becomes an inverter. A ready-made basics circuit you can open in the TorchAnvil simulator.

One gate, two jobs

NAND is sometimes called a universal gate — meaning you can build any logic circuit you want using nothing but NANDs. That's a big claim, and the proof starts with the tiniest possible trick: take a NAND and wire its two inputs together.

How it works

A NAND computes !(A & B). What happens when A and B are the same signal?

So NAND(A, A) = !A. The gate flips the bit. It's a NOT gate wearing a NAND hat.

A NAND(A, A)
0 1
1 0

Why it matters

If you can build NOT out of NAND, and you can build AND out of NAND (next sample), and you can build OR out of NAND (the one after that) — then you can build anything out of NAND. Entire chips have been manufactured using only NAND cells for exactly this reason: one fabrication process, one gate, infinite logic.

Try this