The NAND gate

Tip: Choose Save as PDF in the print dialog to download. Use A4 paper size.

The NAND gate

Name:
Date:
Class:

Quick Questions

Shade in the A or B circle for each question.

1. Which output column is correct for a NAND gate with inputs 00, 01, 10, 11 (in that order)?
A 1 1 1 0
B 0 0 0 1
2. When does a NAND gate output 0?
A When either input is 1
B Only when both inputs are 1
3. Which symbol shows a NAND gate?
A The AND symbol with a small circle on the output
B The OR symbol with a small circle on the output
4. Which is the correct logic expression for a NAND gate?
A X = NAND A AND B
B X = A NAND B
5. A NAND gate is the same as which combination of gates?
A An AND gate followed by a NOT gate
B A NOT gate followed by an OR gate

Match the Pairs

Draw a line connecting each item on the left to its match on the right.

Left columnRight column
1X = A NAND B ANAND written as AND followed by NOT: the AND result is inverted.
2X = NOT (A AND B) BA NAND gate has exactly two inputs, so it cannot join three inputs A, B and C in a single gate.
3The NAND gate output column for inputs 00, 01, 10 and 11 reads 1 1 1 0 CA=0,B=0 -> 1 | A=0,B=1 -> 1 | A=1,B=0 -> 1 | A=1,B=1 -> 0
4NAND is the opposite of AND: it gives 1 whenever AND gives 0 and 0 whenever AND gives 1 DA=1, B=1: AND gives 1, NAND gives 0
5A NAND B gives 0 0 0 1 EThe output X is 0 only when both A and B are 1; in every other case X is 1.
6X = A NAND B NAND C (a NAND gate with 3 inputs) F0 0 0 1 is the AND output column. NAND is the opposite of AND, so its output column is 1 1 1 0.

Definitions

NAND

Fill in the Blanks

Complete each line of code by filling in the missing parts.

1.
X = A ____ B
2.
X = NOT (A ___ B)
3.
NAND output column: 1 1 1 _
4.
X = ___ (A AND B)
5.
NAND = AND symbol + small ______ on output

Spot the Error

Shade in the letter of the line that contains an error.

Question 1
A X = A NOR B
B A=0 B=0 -> X=1
C A=0 B=1 -> X=1
D A=1 B=0 -> X=1
E A=1 B=1 -> X=0
Question 2
A NAND gate: 1 input, A and B
B Output X is 0 only if
C A and B are both 1
Question 3
A A B X
B 1 1 1
C 0 1 1
D 1 0 1
E 0 0 1
Question 4
A A ← 1
B B ← 1
C T ← A AND B
D X ← T
Question 5
A Expression for NAND:
B X = NOT A AND B
C Output when A=1, B=1 is 0

Answer Key

The NAND gate
Section A: Quick Questions
Q1
A — 1 1 1 0
Q2
B — Only when both inputs are 1
Q3
A — The AND symbol with a small circle on the output
Q4
B — X = A NAND B
Q5
A — An AND gate followed by a NOT gate
Section B: Match the Pairs
Q1
X = A NAND B → The output X is 0 only when both A and B are 1; in every other case X is 1.
Q2
X = NOT (A AND B) → NAND written as AND followed by NOT: the AND result is inverted.
Q3
The NAND gate output column for inputs 00, 01, 10 and 11 reads 1 1 1 0 → A=0,B=0 -> 1 | A=0,B=1 -> 1 | A=1,B=0 -> 1 | A=1,B=1 -> 0
Q4
NAND is the opposite of AND: it gives 1 whenever AND gives 0 and 0 whenever AND gives 1 → A=1, B=1: AND gives 1, NAND gives 0
Q5
A NAND B gives 0 0 0 1 → 0 0 0 1 is the AND output column. NAND is the opposite of AND, so its output column is 1 1 1 0.
Q6
X = A NAND B NAND C (a NAND gate with 3 inputs) → A NAND gate has exactly two inputs, so it cannot join three inputs A, B and C in a single gate.
Section C: Definitions
Q1
NAND — A gate with two inputs that outputs 0 only when both inputs are 1. It is the opposite of AND (AND followed by NOT). Its truth table output is 1 1 1 0. Written X = A NAND B.
Section D: Fill in the Blanks
Q1
X = A NAND B
Q2
X = NOT (A AND B)
Q3
NAND output column: 1 1 1 0
Q4
X = NOT (A AND B)
Q5
NAND = AND symbol + small circle on output
Section E: Spot the Error
Q1
A — The expression is for a NAND gate, so line 1 must be X = A NAND B. NOR is a different gate, and it does not match the truth table rows below.
Q2
A — A NAND gate has two inputs, A and B, not one. Only the NOT gate has a single input. It should read: NAND gate: 2 inputs, A and B.
Q3
B — A NAND gate outputs 0 only when both inputs are 1. When A=1 and B=1 the output is 0, so the row should be 1 1 0.
Q4
D — NAND is AND followed by NOT. Line 4 must invert the AND result: X ← NOT T. Without NOT the program is just an AND gate.
Q5
B — Without brackets, NOT applies only to A. NAND inverts the whole AND result, so the brackets are needed: X = NOT (A AND B).