NAND is universal circuit: build and simulate it online

NOT, AND and OR — using nothing but NAND gates.

Build the nand is universal in the free online simulator — it checks your circuit automatically.

What you need

  • 2 logic switches labelled A, B
  • 3 probes labelled NOTA, AND, OR
  • 3 NAND gates
  • 5 or more NAND gates

Step by step

  1. Inputs and outputs. From the Logic section of the library, drop digital inputs (0/1 boxes) or logic switches for the inputs, and digital outputs or probes for the outputs; give each its label in the inspector (the checker finds them by label). Switches A, B; Probes NOTA, AND, OR
  2. NOT and AND from NAND. A NAND with both inputs tied is a NOT; a NAND followed by that NOT is an AND. NOT A: 1 NAND; A AND B: 2 NANDs
  3. OR from NAND. De Morgan: A + B = NOT(NOT A · NOT B): invert each input, then NAND. 3 more NANDs (6 in all)
  4. Prove it. The checker also makes sure no other kind of gate was used.

Truth table

ABNOTAANDOR
00100
01101
10001
11011

Frequently asked questions

How do you build a nand is universal?

NOT, AND and OR — using nothing but NAND gates. In short: inputs and outputs, then not and and from nand, then or from nand, then prove it.

What is the truth table of a nand is universal?

It has 2 inputs (A, B) and 3 outputs (NOTA, AND, OR), so 4 rows. The full table is on this page; the Embedded Lab checks all of them against your circuit.

What parts do you need for a nand is universal?

3 NAND gates; 5 or more NAND gates — plus logic switches for the inputs and probes for the outputs.

Can I simulate a nand is universal online for free?

Yes. Open it in the BitForBytes Embedded Lab, a free browser-based circuit and logic simulator: drag in the gates, wire them, and press "Check my circuit" — every input combination is simulated and marked for you. No download or sign-up needed.

Part of DSD 26 · Universal gates in the free BitForBytes digital system design course.

More combinational builds