AQA · GCSE · Computer Science

    Course version: 8525 · Version from Sept 2020

    Create and interpret simple Boolean expressions made up of NOT, AND, OR…

    Full specification wording

    Boolean logic: Create and interpret simple Boolean expressions made up of NOT, AND, OR and XOR operations.

    Boolean expressions combine inputs that are each either true (1) or false (0).

    Checked against the AQA 8525 specification (opens in a new tab) on .

    • Point 10 of 16

    Study notes

    From the checked teaching notes for this specification point.

    The idea

    Boolean expressions combine inputs that are each either true (1) or false (0). NOT inverts a single value, so NOT 1 gives 0. AND outputs 1 only when both inputs are 1. OR outputs 1 when at least one input is 1. XOR (exclusive OR) outputs 1 when the inputs differ, so 1 XOR 1 gives 0 while 1 XOR 0 gives 1. To create an expression, translate a stated condition into operators, for example 'the alarm sounds if the door is open AND the system is armed'. To interpret one, substitute each input's value and work outwards, evaluating brackets first, then NOT, then AND, then OR and XOR left to right. A truth table listing every input combination confirms the result.

    What earns the marks

    • NOT is a unary operator: it negates a single Boolean value, so NOT 1 = 0 and NOT 0 = 1.
    • AND produces 1 only when every input is 1; any 0 input makes the output 0.
    • OR produces 1 when at least one input is 1, and 0 only when all inputs are 0.
    • XOR produces 1 when the inputs are different and 0 when they are the same, so 1 XOR 1 = 0.
    • When interpreting a compound expression, substitute the given input values and evaluate brackets first, then NOT, then AND, then OR/XOR.
    • A truth table with one row per input combination can be used to check the result of an expression.

    Common mistakes and how to put them right

    • Treating XOR as the same as OR: the correction is that OR gives 1 for two 1 inputs, whereas XOR gives 0 when both inputs are 1.

    • Applying NOT to the whole expression instead of the single term it precedes.

      Put it right: NOT binds to the nearest value or bracketed group.

    • Evaluating left to right ignoring operator precedence.

      Put it right: Handle brackets, then NOT, then AND, then OR and XOR.

    • Assuming AND can output 1 when one input is 0.

      Put it right: AND needs all inputs to be 1.

    Exam tips

    • Write out the input values under each variable before simplifying, so substitution errors are visible.
    • Use a truth table to check any expression with two or more inputs rather than guessing the result.
    • Read the question carefully to see whether it asks you to create an expression from a description or interpret a given one.

    Try the lesson

    The start of the Boolean logic: Create and interpret simple Boolean expressions made up of NOT, AND, OR and XOR operations. lesson, made from checked teaching notes for this specification point.

    Have a go first

    Which Boolean operation outputs 1 when at least one of its two inputs is 1?

    There is more to this lesson

    The full lesson goes on to check your understanding and help you earn the marks. Create a free account to carry on, with your progress saved.

    Carry on with the full lesson

    A week of Premium from your first lesson · Then the free plan continues · No card, no charge

    Test your understanding of Boolean logic: Create and interpret simple Boolean expressions made up of NOT, AND, OR and XOR operations.

    Active recall beats re-reading. Take an instant quiz now to test what you’ve learned and lock it into long-term memory.

    Take topic quiz

    A week of Premium from your first lesson · Then the free plan continues · No card, no charge