Browse lessons

NAND and NOR gates

Invert AND and OR outputs, and understand universal gates.

NAND and NOR invert the output of AND and OR. Each is also a universal gate: combinations of NAND gates, or combinations of NOR gates, can express any Boolean function.

NAND gate

NAND outputs 0 only when both inputs are 1. For every other input combination, its output is 1.

Turn both switches on, then turn either one off.

Click an input to change its value.Output: 1
ABOutput
001
011
101
110

NOR gate

NOR outputs 1 only when both inputs are 0. Turning on either input makes the output 0.

Compare this with OR: every output value is inverted.

Click an input to change its value.Output: 1
ABOutput
001
010
100
110

Read the symbol

The small circle at a gate’s output represents inversion. An AND shape with this circle is NAND; an OR shape with the circle is NOR.