Topic 10 ยท Boolean Logic ยท 10.5

The NAND Logic Gate

The NAND gate performs AND first, then reverses the answer.

Invitation

What if the AND answer is reversed?

Imagine a school rule:

โ€œYou may enter unless you are wearing a red shirt AND red shoes.โ€

If both are red, entry is refused. Every other combination is allowed.

That is NAND behaviour: AND decides first, then NOT reverses the result.
Entry rule
Red shirt?
Red shoes?
AND โ†“
Reverse the answer
Big Idea

NAND means NOT AND

A NAND gate has two inputs and one output.

It first checks whether both inputs are 1. It then reverses that result.

A = 1Red shirt
AND
B = 1Red shoes
NOT โ†’
X = 0No entry
Both inputs are 1, so AND gives 1. NAND reverses this to 0.
Visual Guide

The NAND gate symbol

The NAND symbol looks like an AND gate with a small circle on its output.

The small circle means NOT. It reverses the AND result.

AND shape + output circle = NAND.
NAND gate
ABX
Bridge

Only one combination produces 0

0 + 0
Output 1
0 + 1
Output 1
1 + 0
Output 1
1 + 1
Output 0
A NAND gate outputs 0 only when both inputs are 1.
Truth Table

The opposite of AND

Compare the NAND outputs with the AND truth table. Every output is reversed.

ABX
001
011
101
110
Think AND first, then flip the output.
Logic Expression

Writing the NAND rule

The inputs are labelled A and B. The output is labelled X.

X = A NAND B

This means X is the opposite of A AND B.

Read it aloud as: โ€œX equals A NAND B.โ€
Worked Example

Find the output

Question

A NAND gate receives A = 1 and B = 0. What is the output X?

โ€œX = 1 because AND gives 0, then NAND reverses it to 1.โ€
Exam Explainer

Three facts worth remembering

Two InputsNAND compares A and B.
AND Then NOTThe AND result is reversed.
One ZeroOnly 1 AND 1 gives output 0.
Exam answer: โ€œA NAND gate outputs 0 only when both inputs are 1.โ€
Common Mistake

Do not stop after AND

โœ— Incorrect

A = 1 and B = 1 gives X = 1.

โœ“ Correct

AND gives 1, then NAND reverses it to X = 0.

Remember: The small output circle means reverse the answer.
Summary

NAND means AND, then opposite

Step 1Check A AND B.
Step 2Reverse the result.
Output0 only for 1, 1.
Final rule: NAND is the exact opposite of AND.