NAND Bricks

How to build a NOT gate from a NAND gate

A NOT gate takes one NAND gate: wire the same signal into both of its inputs. A NAND only outputs 0 when both inputs are 1, so feeding it A twice gives 0 when A is 1 and 1 when A is 0, which is exactly an inverter.

Inputs
1NANDA10Q
Click the inputs to try every combination. Green wires carry 1 and red wires carry 0. The small numbers match the steps below.
Open this circuit in NAND BricksLoads it as a new board with its truth table, ready to run.

The formula

Q = NAND(A, A)

How it works

A NAND gate answers one question: are both of my inputs 1? If yes it outputs 0, otherwise it outputs 1. When both inputs are the same wire, that question becomes is A 1?, and the answer comes out flipped.

There is a second way to do it: hold one input at 1 and send A into the other. NAND(A, 1) is also NOT A. In NAND Bricks, an unwired input shows a small 0 beside it; click it to make it a 1 and try this version.

NOT matters more than it looks. Almost every other gate on this site is "some NAND gates, then flip the answer", so you will reuse this one constantly. Save it as a brick once and you never have to wire it again.

Gate by gate

  1. Takes A on both inputs. Outputs 0 when A is 1, and 1 when A is 0.

Truth table

AQ
01
10

Why 1 NAND gate?

One NAND gate is the minimum, since you cannot do it with zero gates. It is also the only gate on this site that needs just one.

Where it's used

Inverters show up everywhere: turning an AND into a NAND and back, making the "not selected" signal in a multiplexer, and building the active-low enable lines common in real chips.