NAND — Definition, Formula & Examples
NAND is a logic operation that returns false only when both inputs are true, and returns true in every other case. It is the negation of AND (conjunction), which is where the name 'Not AND' comes from.
For propositions and , the NAND operation is defined as . It is a binary Boolean function that evaluates to false if and only if both operands are true, and evaluates to true otherwise.
Key Formula
Where:
- = First proposition or input
- = Second proposition or input
- = Conjunction (AND)
- = Negation (NOT)
- = NAND operator
How It Works
To evaluate a NAND expression, first determine the result of the AND of the two inputs, then negate it. If both inputs are true, AND gives true, so NAND gives false. In every other combination — true/false, false/true, or false/false — AND gives false, so NAND gives true. NAND is called a *functionally complete* gate, meaning you can build every other Boolean operation (NOT, AND, OR, NOR, XOR) using only NAND gates.
Worked Example
Problem: Build the truth table for and identify which input combinations produce true.
Step 1: List all input combinations and compute for each.
Step 2: Negate each result to get .
Answer: NAND outputs true for three of the four rows — it is false only when both and are true.
Why It Matters
NAND gates are the most common building block in digital electronics because any logic circuit can be constructed from NAND gates alone. In discrete math and computer science courses, understanding NAND helps you prove functional completeness and simplify Boolean expressions.
Common Mistakes
Mistake: Confusing NAND with NOR. Students sometimes think NAND is the negation of OR.
Correction: NAND negates the AND: . NOR negates the OR: . Their truth tables differ in three of four rows.
