NAND = NOT AND  ·  NOR = NOT OR  ·  XOR = Exclusive OR (inputs must differ)  ·  XNOR = Exclusive NOR (inputs must be equal)

NAND Gate

0 A 0 B NAND OUT 1

Truth Table

ABY = A NAND B
001
011
101
110

NOR Gate

0 A 0 B NOR OUT 1

Truth Table

ABY = A NOR B
001
010
100
110

XOR Gate

0 A 0 B XOR OUT 0

Truth Table

ABY = A XOR B
000
011
101
110

XNOR Gate

0 A 0 B XNOR OUT 1

Truth Table

ABY = A XNOR B
001
010
100
111

Why NAND is Universal

You can implement NOT, AND, and OR gates using only NAND gates. This means any digital circuit can be built from NAND alone — which is why it's heavily used in CMOS chip fabrication.

Why NOR is Universal

Same principle — NOR can implement NOT, AND, and OR. The original Apollo Guidance Computer was built entirely from NOR gates.

XOR as Equality Detector

XOR outputs 1 when inputs are different. XNOR is its complement — outputting 1 when inputs are equal. XNOR is therefore also called an equality gate and is the core of comparator circuits.