NAND Bricks

How to build a NOR gate from NAND gates

A NOR gate takes four NAND gates: build an OR from three of them, then add a fourth wired as a NOT. The output is 1 only when both A and B are 0.

Inputs
1NAND2NAND3NAND4NANDA0B01Q
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 = NOT(OR(A, B)) = NAND(R, R), where R = NAND(NAND(A, A), NAND(B, B))

How it works

NOR means "not OR". So take the OR gate from the previous guide and flip its output with one more NAND wired as a NOT.

There is a nice symmetry here. NOR is a universal gate too: you can build everything from NOR alone, the same way this site builds everything from NAND. But going between the two costs gates. NOR needs four NANDs, and NAND would need four NORs.

Gate by gate

  1. A NOT gate on A.
  2. A NOT gate on B.
  3. NANDs the inverted inputs, which gives A OR B.
  4. A NOT gate on the OR, giving NOR. It is 1 only when A and B are both 0.

Truth table

ABQ
001
010
100
110

Why 4 NAND gates?

Four is the fewest possible. Checking every circuit of three NAND gates or fewer turns up no NOR, even though OR alone fits in three.

Where it's used

NOR is the classic building block of the SR latch, the simplest circuit that remembers a bit, and it shows up wherever you need "nothing is on".