Words in a problem statement and the gates they describe

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

Words in a problem statement and the gates they describe

Name:
Date:
Class:

Quick Questions

Shade in the A or B circle for each question.

1. An alarm sounds when both the door sensor (A) and the window sensor (B) are triggered. Which gate fits?
A OR
B AND
2. A light turns on if either switch A or switch B is on (or both). Which gate fits?
A OR
B AND
3. A fan runs when neither the heater (A) nor the sunlight sensor (B) is on. Which gate fits?
A NAND
B NOR
4. A warning is shown when it is NOT true that both A and B are on. Which gate fits?
A NAND
B NOR
5. An output is 1 when only one of A or B is on, but not both. Which gate fits?
A XOR
B OR

Match the Pairs

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

Left columnRight column
1(A AND B) AX is 1 only when both A and B are 1, as in 'the alarm sounds only if both sensors are on'
2(A OR B) B'Neither' needs both inputs to be 0 to give 1, but NAND gives 1 for 0,0, 0,1 and 1,0. It should be NOR.
3'The door stays locked only if neither the key nor the code is used' means the output is 1 only when both inputs are 0 CX = A NAND B
4'The machine works unless both buttons are pressed together' means the output is 0 only when both inputs are 1 DX = A NOR B
5'Only one of the two switches is on' -> X = A OR B E'Only one of' excludes the case where both are on, but OR also gives 1 when both inputs are 1. It should be XOR.
6'Neither sensor is triggered' -> X = A NAND B FX is 1 when either A or B is 1, as in 'the light is on if either switch is pressed'

Definitions

key word = gate

Fill in the Blanks

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

1.
Problem: both A and B must be 1 X = A ___ B
2.
Problem: either A or B is 1 X = A __ B
3.
Problem: neither A nor B is 1 X = A ___ B
4.
Problem: A and B are not both 1 X = A ____ B
5.
Problem: only one of A or B is 1 X = A ___ B

Spot the Error

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

Question 1
A Alarm sounds if both A and B
B Key word: both
C Gate: OR
D X = A AND B
Question 2
A Lamp on if either switch on
B Key word: either
C Gate: XOR
D X = A OR B
Question 3
A Fan on if neither A nor B on
B Key words: neither ... nor
C Gate: NAND
D X = A NOR B
Question 4
A Buzzer if not both A and B on
B Key words: not both
C Gate: NAND
D X = A NOR B
Question 5
A Pump runs if either A or B on
B Key word: both
C Gate: AND

Answer Key

Words in a problem statement and the gates they describe
Section A: Quick Questions
Q1
B — AND
Q2
A — OR
Q3
B — NOR
Q4
A — NAND
Q5
A — XOR
Section B: Match the Pairs
Q1
(A AND B) → X is 1 only when both A and B are 1, as in 'the alarm sounds only if both sensors are on'
Q2
(A OR B) → X is 1 when either A or B is 1, as in 'the light is on if either switch is pressed'
Q3
'The door stays locked only if neither the key nor the code is used' means the output is 1 only when both inputs are 0 → X = A NOR B
Q4
'The machine works unless both buttons are pressed together' means the output is 0 only when both inputs are 1 → X = A NAND B
Q5
'Only one of the two switches is on' -> X = A OR B → 'Only one of' excludes the case where both are on, but OR also gives 1 when both inputs are 1. It should be XOR.
Q6
'Neither sensor is triggered' -> X = A NAND B → 'Neither' needs both inputs to be 0 to give 1, but NAND gives 1 for 0,0, 0,1 and 1,0. It should be NOR.
Section C: Definitions
Q1
key word = gate — Words in a problem statement point to a gate: both/and = AND, either/or = OR, not = NOT, neither...nor = NOR, not both = NAND, only one of = XOR.
Section D: Fill in the Blanks
Q1
Problem: both A and B must be 1 X = A AND B
Q2
Problem: either A or B is 1 X = A OR B
Q3
Problem: neither A nor B is 1 X = A NOR B
Q4
Problem: A and B are not both 1 X = A NAND B
Q5
Problem: only one of A or B is 1 X = A XOR B
Section E: Spot the Error
Q1
C — The key word 'both' means both inputs must be 1, so the gate is AND, not OR. Line 3 should be 'Gate: AND'.
Q2
C — 'Either' points to an OR gate. XOR would need wording like 'only one of' or 'but not both'. Line 3 should be 'Gate: OR'.
Q3
C — 'Neither ... nor' means the output is 1 only when both inputs are 0, which is a NOR gate. NAND matches 'not both'. Line 3 should be 'Gate: NOR'.
Q4
D — 'Not both' is a NAND gate, so the expression must use NAND. NOR would mean 'neither ... nor'. Line 4 should be 'X = A NAND B'.
Q5
A — The statement says 'either ... or', but the key word, gate and expression are for 'both' and AND. Line 1 should say 'both A and B'.