Français

The NAND and NOR gates

The NAND gate (NOT-AND) is an AND gate followed by a NOT: it outputs 0 only if all its inputs are 1. The NOR gate (NOT-OR) is an OR followed by a NOT: it outputs 1 only if all its inputs are 0. They are the simplest gates to build in CMOS technology, the one used in today's chips.

Why they matter

They have a surprising property: with only NAND gates (or only NOR gates), you can build any logic circuit, including a whole processor. They are said to be universal. A NAND with its two inputs tied together becomes a NOT; two NANDs in a row give an AND. In theory, one single building block is enough to build everything; in real chips, many types of gate are mixed to go faster.

The truth table

NAND (NOT-AND): the exact opposite of AND.

ABS
001
011
101
110

NOR (NOT-OR): the exact opposite of OR.

ABS
001
010
100
110

The symbol

The same symbol as AND (or OR), with a small bubble on the output. In European notation: the rectangle with & (or ≥1) and a circle on the output. Integrated circuits: 74HC00 (four NANDs), 74HC02 (four NORs).

Your turn to play

Place the right gate and flip the inputs: when every row of the table is green, the lamp lights up.

Your turn: 4 questions

Answer and see straight away whether you were right. You need 3 right answers out of 4 to pass the page. Your score stays on this device, nothing is sent.

Frequently asked questions

Why is the NAND gate called universal?

Because you can build NOT, AND, OR, XOR and every other gate using only NAND gates. A whole circuit can therefore use just one type of gate.

What is the truth table of NAND?

For two inputs: 00 gives 1, 01 gives 1, 10 gives 1, 11 gives 0. It is the exact opposite of the AND gate.

What is the truth table of NOR?

For two inputs: 00 gives 1, 01 gives 0, 10 gives 0, 11 gives 0. It is the exact opposite of the OR gate.

Are NAND and NOT-AND the same thing?

Yes. NAND is short for NOT AND. In the same way, NOR and NOT-OR are the same gate.

The other gates: The AND gate · The OR gate · The NOT gate · The XOR gate · The truth table · All the pages