NAND Gate from Transistors
By Michell Cronberg - for use in training and presentations

A NAND gate is one of the most fundamental logic gates. In CMOS technology, it's built using 4 transistors: 2 PMOS and 2 NMOS.

Click A and B to toggle the inputs and see how current flows through the transistors.

Circuit Structure

  • P1, P2 - PMOS transistors in parallel (connected to Vcc)
  • N1, N2 - NMOS transistors in series (connected to GND)
  • Output is HIGH when any PMOS conducts
  • Output is LOW only when both NMOS conduct

Truth Table

A B Q (NAND)
0 0 1
0 1 1
1 0 1
1 1 0

Why NAND is Universal

The NAND gate is called a "universal gate" because any other logic gate (AND, OR, NOT, XOR, etc.) can be built using only NAND gates. This makes it the foundation of digital electronics.