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 | |
|---|---|---|
| 1A = 1, B = 1, A OR B | AOR is shown outputting 0 when both inputs are 1. OR is inclusive, so it must output 1 whenever at least one input is 1, including both. | |
| 2A = 1, B = 1, A XOR B | BXOR is shown outputting 1 when both inputs are 1. XOR must output 0 in this row because it needs exactly one input to be 1. | |
| 3The only row where the OR and XOR output columns differ is the row where both inputs are 1 | CA B | OR XOR 1 1 | 1 0 | |
| 4Everyday 'either...or but not both' wording describes XOR, for example you can have tea or coffee but not both | DOutputs 1, because OR is inclusive and accepts one input or both inputs being 1 | |
| 5A B | XOR 1 1 | 1 | EX = A XOR B | |
| 6A B | OR 1 1 | 0 | FOutputs 0, because XOR is exclusive and needs exactly one input to be 1 |
Complete each line of code by filling in the missing parts.
Shade in the letter of the line that contains an error.
XOR — Exclusive OR: outputs 1 when exactly one input is 1. When A and B are both 1 it outputs 0, but OR outputs 1 in that row. XOR means one or the other, but not both.X = A XOR BX = A OR B
A = 1, B = 1
X = 1A = 1, B = 1
X = A XOR B
X = 0A B OR XOR
1 1 1 0Tea or coffee, or both: X = A OR B