Common mistakes with logic gates, expressions and truth tables

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

Common mistakes with logic gates, expressions and truth tables

Name:
Date:
Class:

Quick Questions

Shade in the A or B circle for each question.

1. A student says the NAND gate outputs 1 only when both inputs are 1. What is the correct statement?
A NAND outputs 0 only when both inputs are 1
B NAND outputs 1 only when both inputs are 1
2. For inputs A = 1 and B = 1, which gate gives output 0 but is often confused with OR?
A XOR
B OR
3. A two-input truth table has its rows written in the order 00, 10, 01, 11. Is this correct?
A Yes, any order of rows is fine
B No, the order should be 00, 01, 10, 11
4. Which expression correctly shows that NOT applies only to A in an AND with B?
A X = NOT (A AND B)
B X = (NOT A) AND B
5. A student writes X = A AND B OR C for a circuit where A and B go into an AND gate and its output goes into an OR gate with C. What is the best fix?
A X = (A AND B) OR C
B X = A AND (B OR C)

Match the Pairs

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

Left columnRight column
1X = NOT (A AND B) but written as X = A AND B AA B C | (A AND B) | X = (A AND B) OR C
2Rows in order: 00, 01, 11, 10 BNAND confused with AND: the output is not inverted, so the truth table is wrong
3OR gives 1 when both inputs are 1, but XOR gives 0 in that row, so they must not be confused CNOT is applied to the wrong part: it only inverts A, not (A AND B). Brackets are missing
4Intermediate columns for each gate help you avoid errors when completing a truth table with several gates DA=1, B=1: A OR B = 1 but A XOR B = 0
5X = NOT A AND B (meant NOT of the whole A AND B) EWrong number of inputs: a NOT gate has exactly one input
6A NOT gate drawn with two inputs, A and B FRows out of binary order: 11 is placed before 10, so the table should run 00, 01, 10, 11

Definitions

common logic mistakes

Fill in the Blanks

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

1.
X = ___ (A AND B) // This is NAND, not AND
2.
X = A ___ B // Output is 0 when A=1 and B=1
3.
0 0 1 0 1 _ 0 1 1
4.
Column _ = A AND B Column X = P OR C
5.
NOT gate: _ input, 1 output AND gate: 2 inputs, 1 output

Spot the Error

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

Question 1
A X = A NAND B
B A B X
C 0 0 1
D 0 1 0
E 1 0 1
F 1 1 0
Question 2
A Gate: XOR
B A=1, B=1 gives X=1
C A=1, B=0 gives X=1
D A=0, B=0 gives X=0
Question 3
A X = NOT A B
B A X
C 0 1
D 1 0
Question 4
A A B X
B 1 0 0
C 0 1 0
D 1 0 0
E 1 1 1
Question 5
A A = rain, B = wind
B Alarm when not both are true
C X = NOT A AND B
D Same as A NAND B

Answer Key

Common mistakes with logic gates, expressions and truth tables
Section A: Quick Questions
Q1
A — NAND outputs 0 only when both inputs are 1
Q2
A — XOR
Q3
B — No, the order should be 00, 01, 10, 11
Q4
B — X = (NOT A) AND B
Q5
A — X = (A AND B) OR C
Section B: Match the Pairs
Q1
X = NOT (A AND B) but written as X = A AND B → NAND confused with AND: the output is not inverted, so the truth table is wrong
Q2
Rows in order: 00, 01, 11, 10 → Rows out of binary order: 11 is placed before 10, so the table should run 00, 01, 10, 11
Q3
OR gives 1 when both inputs are 1, but XOR gives 0 in that row, so they must not be confused → A=1, B=1: A OR B = 1 but A XOR B = 0
Q4
Intermediate columns for each gate help you avoid errors when completing a truth table with several gates → A B C | (A AND B) | X = (A AND B) OR C
Q5
X = NOT A AND B (meant NOT of the whole A AND B) → NOT is applied to the wrong part: it only inverts A, not (A AND B). Brackets are missing
Q6
A NOT gate drawn with two inputs, A and B → Wrong number of inputs: a NOT gate has exactly one input
Section C: Definitions
Q1
common logic mistakes — Mixing up NAND/AND or OR/XOR, rows out of binary order, NOT on the wrong part, missing brackets or columns, wrong input counts, or simplifying a circuit that must be drawn as given.
Section D: Fill in the Blanks
Q1
X = NOT (A AND B) // This is NAND, not AND
Q2
X = A XOR B // Output is 0 when A=1 and B=1
Q3
0 0 1 0 1 0 0 1 1
Q4
Column P = A AND B Column X = P OR C
Q5
NOT gate: 1 input, 1 output AND gate: 2 inputs, 1 output
Section E: Spot the Error
Q1
D — NAND is the opposite of AND. It outputs 1 unless both inputs are 1, so the row 0 1 must give X = 1. Writing 0 treats the gate as AND.
Q2
B — XOR outputs 1 only when the inputs are different. When both inputs are 1, XOR gives 0. Giving 1 is the OR gate's behaviour.
Q3
A — A NOT gate has exactly one input. The expression must be X = NOT A, matching the single input column A in the table.
Q4
B — Truth table rows must follow binary counting order, starting at 0 0. The first row must be 0 0 0. Starting with 1 0 puts the rows out of order and leaves out 0 0.
Q5
C — NOT must apply to the whole bracket (A AND B). Without the brackets, NOT only changes A, which gives a different expression. It should be X = NOT (A AND B).