Home › Lessons › Digital logic › NAND gate

NAND gate

Digital logic · Beginner · about 10 minutes · part of Zen’s Electronics Design Mastery

AND followed by NOT: the output is 0 only when both inputs are 1. NAND is a universal gate: every other gate, and so any digital circuit, can be built from NANDs alone.

NAND gate: the circuit on the simulator's bench

Open this lesson in the labFree, in your browser, no account needed.

How it works

Y = (A · B)̅

ABYbench
001—
011—
101—
110—

Flip the switches to try every row. “bench” fills in with what the chip actually did.

74HC00: quad 2-input nand in one 14-pin chip. Pin 14 is +5 V, pin 7 is ground. Every unused input should be tied to VCC or GND in a real build.

Try it on the bench

  1. Click switches 1 and 2 to step through 00, 01, 10 and 11. Each combination fills a row of the table.
  2. Select U1 and change its family to 74LS: the high output drops to about 3.5 V, because TTL outputs cannot pull all the way to VCC.
  3. Delete the wire to input B. A floating CMOS input is undefined: the output flickers. Switch the chip to 74LS and the floating input reads as 1.

Parts on the bench

In the course

Zen’s Electronics Design Mastery, module “Digital Electronics”.

More on digital logic