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.
| A | B | Q (NAND) |
|---|---|---|
| 0 | 0 | 1 |
| 0 | 1 | 1 |
| 1 | 0 | 1 |
| 1 | 1 | 0 |
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.
(c) Michell Cronberg 2026 - MIT license