NAND (Not AND) is the complement of the AND gate. It returns 0 only when ALL input bits are 1 — for every other combination the output is 1. Bitwise NAND applies this to every bit position independently across both operands.
| A | B | A NAND B |
|---|---|---|
| 0 | 0 | 1 |
| 1 | 0 | 1 |
| 0 | 1 | 1 |
| 1 | 1 | 0 |
Any boolean function — AND, OR, NOT, XOR, NOR, or any combination — can be implemented using only NAND gates. This makes NAND the most important gate in digital electronics. Modern chips implement most logic using NAND (or NOR) gates for this reason. Examples:
NAND (Not AND) outputs 0 only when ALL input bits are 1. For all other combinations it outputs 1. It is the complement of AND: A NAND B = NOT(A AND B) = ~(A & B).
Any boolean function can be implemented using only NAND gates. NOT, AND, OR, XOR, and every other gate can be built from NAND, making it sufficient to construct any digital circuit.
Set Input Base to Hex, paste your hex strings and click Calculate NAND. Results appear in all bases including Binary, Decimal and ASCII.
NAND is applied successively: NAND(A, B) first, then NAND(result, C), and so on. Enable Show Intermediate Results to see each step in a table.
See also: NOR Calculator, XOR Calculator, NOT Calculator, Bitwise Calculator.