Tip: Choose Save as PDF in the print dialog to download. Use A4 paper size.
Shade in the A or B circle for each question.
Draw a line connecting each item on the left to its match on the right.
| Left column | Right column | |
|---|---|---|
| 1X = (A AND B) OR C | AThe brackets are missing, so it is unclear which gate is worked out first. The statement 'A and B together, or C' needs (A AND B) OR C. | |
| 2X = A AND (NOT B) | BX = (A OR B) AND C | |
| 3The alarm sounds if the door is open (A) AND the system is switched on (B), OR if the panic button is pressed (C) | CThe alarm sounds if A and B are both 1, or if C is 1 on its own | |
| 4A warning light comes on if the temperature is high (A) OR the pressure is high (B), AND the machine is running (C) | DNOT C is used, but the statement says C is true (for example, the machine is running). NOT should only be used when the statement says 'not' or 'is off'. | |
| 5X = A AND B OR C | EX is 1 only when A is 1 and B is 0 | |
| 6X = (A OR B) AND NOT C | FX = (A AND B) OR C |
Complete each line of code by filling in the missing parts.
Shade in the letter of the line that contains an error.
X = (A AND B) OR C — Give each condition a letter (A, B, C), turn key words like AND, OR and NOT into gates, and use brackets to group parts so that X matches the wording of the statement.# A = door open, B = window open
X = A AND B# Alarm if door (A) OR window (B) is open
X = A OR B# A = door open, B = window locked
# Alarm if door open AND window NOT locked
X = A AND NOT B# A = door, B = window, C = key switch
# X on if (door OR window) AND key on
X = (A OR B) AND C# A = lid shut, B = guard shut, C = override
# Runs if lid AND guard shut, or override
X = (A AND B) OR C