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.
- 4NAND gates
- Yesfewest possible
- 2inputs
- 1output
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
- A NOT gate on A.
- A NOT gate on B.
- NANDs the inverted inputs, which gives A OR B.
- A NOT gate on the OR, giving NOR. It is 1 only when A and B are both 0.
Truth table
| A | B | Q |
|---|---|---|
| 0 | 0 | 1 |
| 0 | 1 | 0 |
| 1 | 0 | 0 |
| 1 | 1 | 0 |
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".