Which single type of logic gate can be combined to build any Boolean function at all?

NAND, a universal gate (NOR is the other one).

Start playing free

  1. NAND ✔
  2. AND
  3. XOR

Why: From NAND alone you can make NOT (tie the inputs together), then AND and OR. Those three can build any truth table, so NAND can build anything.

Huh, didn't know that: NOR is also a universal gate, but AND and XOR alone are not.

The dad joke
I asked a NAND gate if it was happy. It said not and.
Like this card?
Play the game

References

Answer: NAND. From NAND alone you can make NOT (tie the inputs together), then AND and OR. Those three can build any truth table, so NAND can build anything.

  1. Princeton COS 111, Problem set: universal gates www.cs.princeton.edu/courses/archive/spr05/cos111/probs/2
    In this problem, you will show that the NAND gate is universal.
    Checked 2026-10-10.

Think this answer is wrong? Tap "Challenge this answer" on the card in the game and tell us why.

Test yourself in the game