AQA 8525 GCSE Computer Science · 3.4 Computer Systems

Stretch tasks Boolean Logic

Task 1

Quiz Challenge

A quiz game against four computer players, then short and long written answers.

  1. Quiz Blitz12 questions against the clock
  2. Quick Fire4 short answers
  3. Big Think2 long answers

About 20 minutes

Task 2

This or That

Pixel the cat asks 8 questions. Each has two answers: pick the right one.

  • Two answers to every question
  • A fish treat for every right answer
  • Streaks win Pixel shades, then a party hat

About 4 minutes

Task 3

Memory Match

Flip the cards two at a time to match each term card to its meaning card.

  • 12 cards: each term has a meaning
  • One peek at every card
  • Combo points for pairs found in a row

6 pairs, about 4 minutes

Task 4

Sort It

Sort each statement into the right box, like the tick-box tables in the exam.

  • 10 cards to sort into 3 boxes
  • Drag a card, tap a box or press its number
  • Combo points for cards sorted in a row

10 cards, about 4 minutes

The games need JavaScript. Every question is below, with the answers at the end.

Read the lesson: Boolean Logic

Boolean Logic: the questions

Quiz Challenge, round 1: Quiz Blitz

  1. When does an XOR gate output 1?

    • Always
    • When its inputs are different
    • When both inputs are 1
    • When both inputs are 0
  2. What is 1 XOR 1?

  3. What is 1 OR 1?

  4. In which row of their truth tables do OR and XOR differ?

    • When both inputs are 0
    • When only A is 1
    • When only B is 1
    • When both inputs are 1
  5. How many rows does a truth table with 4 inputs need?

  6. (A AND B) OR C and A AND (B OR C) are the same circuit.

    • True
    • False
  7. With 3 inputs, how should the rightmost input column be filled?

    • 1 1 1 1 0 0 0 0
    • 0 1 0 1 0 1 0 1
    • 0 0 0 0 1 1 1 1
    • 0 0 1 1 0 0 1 1
  8. What is NOT (0 XOR 1)?

  9. Q = (A AND B) OR (NOT C). What is Q when A, B and C are all 0?

  10. Why fill a truth table one column at a time?

    • Examiners require diagonal order
    • Rows cannot be read
    • You apply one rule at a time, so mistakes are rarer
    • It is quicker to draw
  11. Which TWO input pairs make A XOR B equal 1?

    Tick 2.

    • A = 1, B = 0
    • A = 1, B = 1
    • A = 0, B = 0
    • A = 0, B = 1
  12. What is a logic gate?

    • A circuit that turns binary inputs into a binary output by a fixed rule
    • A barrier in a network
    • A type of memory
    • A program that checks passwords

Quiz Challenge, round 2: Quick Fire

  1. Explain the difference between an OR gate and an XOR gate. [2 marks]

  2. Explain how to fill in the input columns of a truth table with three inputs. [2 marks]

  3. Explain why brackets matter when writing a Boolean expression from a circuit diagram. [2 marks]

  4. Describe how to read a logic circuit diagram. [2 marks]

Quiz Challenge, round 3: Big Think

  1. Describe how to produce the truth table for Q = (A AND B) OR (NOT C). [4 marks]

  2. Two switches, at the top and bottom of a staircase, control one light: flipping either switch changes the light. Explain why an XOR gate models this. [4 marks]

This or That: tick the right answer

  1. Which gate outputs 1 when its inputs differ?

    • XOR
    • AND
  2. What is 0 XOR 0?

    • 0
    • 1
  3. How many rows do three inputs need?

    • 6
    • 8
  4. Should you rub out the intermediate columns before handing in?

    • Yes: they look messy
    • No: they earn method marks
  5. What does a NOT gate do?

    • Adds its inputs
    • Inverts its input
  6. What is 1 AND 0?

    • 0
    • 1
  7. Where do you start when reading a circuit diagram?

    • At the inputs
    • At the output
  8. How many rows do four inputs need?

    • 8
    • 16

Memory Match: match each term to its meaning

TermMeaning
A AND1 1 when at least one input is 1
B OR2 Output for every input combination
C XOR3 Inverts its single input
D NOT4 A circuit written out with brackets
E Truth table5 1 only when both inputs are 1
F Boolean expression6 1 when the inputs differ

Sort It: tick one box in each row

AND, OR or XOR? For inputs 00, 01, 10 and 11 in order.

StatementANDORXOR
Its outputs are 0, 1, 1, 1
Outputs 1 when the inputs are different
Models two switches that both control a staircase light
Gives 0 when both inputs are 1, unlike OR
Outputs 1 when at least one input is 1
Outputs 1 only when both inputs are 1
Like two switches side by side, either completing the circuit
Like two switches in series
Its outputs are 0, 1, 1, 0
Its outputs are 0, 0, 0, 1
Answers

Round 1: Quiz Blitz

  1. When its inputs are different Exclusive OR: one or the other, but not both.
  2. 0 The inputs are the same, so XOR gives 0.
  3. 1 OR needs at least one input to be 1.
  4. When both inputs are 1 Learn the bottom row and you have learned the difference.
  5. 16 2 to the power 4 is 16.
  6. False The brackets change the circuit and its truth table.
  7. 0 1 0 1 0 1 0 1 The right column alternates, the middle goes in pairs, the left in fours.
  8. 0 0 XOR 1 is 1, and NOT flips it to 0.
  9. 1 A AND B is 0, but NOT C is 1, so the OR gives 1.
  10. You apply one rule at a time, so mistakes are rarer Working across a row means holding several rules in your head at once.
  11. A = 0, B = 1; A = 1, B = 0 XOR is 1 only when the inputs differ.
  12. A circuit that turns binary inputs into a binary output by a fixed rule NOT, AND, OR and XOR are the four AQA uses.

Round 2: Quick Fire

    • OR outputs 1 when at least one input is 1
    • XOR outputs 1 only when the inputs differ, so 0 when both are 1
    Model answer

    An OR gate outputs 1 when at least one input is 1. An XOR gate outputs 1 only when the inputs are different, so when both are 1 it outputs 0.

    • There are 8 rows
    • The right column alternates, the middle goes in pairs and the left in fours
    Model answer

    There are 2 x 2 x 2 = 8 rows. The right-hand column alternates 0 1 0 1, the middle one goes in pairs, 0 0 1 1, and the left one in fours, which guarantees every combination appears exactly once.

    • Different brackets give a different circuit, with a different truth table
    • For example, (A AND B) OR C is not A AND (B OR C)
    Model answer

    Moving the brackets changes which gate feeds which, so it gives a different circuit with a different truth table: (A AND B) OR C is not the same as A AND (B OR C).

    • Work from the inputs towards the output
    • Name each gate's output as you go
    Model answer

    Work from the inputs on the left towards the output on the right, naming the output of each gate as you go, rather than trying to see the whole circuit at once.

Round 3: Big Think

    • Three inputs need 8 rows
    • Fill the input columns systematically
    • Add intermediate columns for A AND B and for NOT C
    • Fill each column completely, then OR the two to get the final column
    Model answer

    Three inputs need 2 x 2 x 2 = 8 rows. Fill the input columns systematically: C alternates 0 1, B goes in pairs and A in fours. Add an intermediate column for A AND B and one for NOT C, filling each one completely, column by column. Then the final column is the OR of the two intermediate columns.

    • XOR outputs 1 when its inputs are different
    • Flipping one switch makes the inputs differ, turning the light on
    • With both switches in the same position, the output is 0 and the light is off
    • OR would not work: with both inputs 1, OR leaves the light on
    Model answer

    XOR outputs 1 when its inputs are different. With both switches in the same position, the inputs are equal, so the output is 0 and the light is off. Flipping either switch makes the inputs differ, so the light turns on, and flipping either one again makes them the same, so it goes off. An OR gate would not work, because with both switches up both inputs are 1 and OR would leave the light on.

This or That

  1. XOR Exclusive OR: one or the other, but not both.
  2. 0 The inputs are the same, so the output is 0.
  3. 8 2 to the power 3 is 8.
  4. No: they earn method marks Examiners cannot credit working that is not there.
  5. Inverts its input 1 becomes 0 and 0 becomes 1.
  6. 0 AND needs both inputs to be 1.
  7. At the inputs Work forwards, naming each gate's output.
  8. 16 2 to the power 4 is 16.

Memory Match

  • A 5 AND: 1 only when both inputs are 1
  • B 1 OR: 1 when at least one input is 1
  • C 6 XOR: 1 when the inputs differ
  • D 3 NOT: Inverts its single input
  • E 2 Truth table: Output for every input combination
  • F 4 Boolean expression: A circuit written out with brackets

Sort It

  1. OR Its outputs are 0, 1, 1, 1 Every row except 00 gives 1.
  2. XOR Outputs 1 when the inputs are different That is exclusive OR.
  3. XOR Models two switches that both control a staircase light Flipping either changes the output.
  4. XOR Gives 0 when both inputs are 1, unlike OR That one row is the difference between OR and XOR.
  5. OR Outputs 1 when at least one input is 1 OR needs at least one.
  6. AND Outputs 1 only when both inputs are 1 AND needs both.
  7. OR Like two switches side by side, either completing the circuit Either switch is enough.
  8. AND Like two switches in series Both switches must be closed.
  9. XOR Its outputs are 0, 1, 1, 0 Only the rows where the inputs differ give 1.
  10. AND Its outputs are 0, 0, 0, 1 Only the last row, 11, gives 1.