Skip to topic
    ← Back to course topics

    Boolean logic — AQA GCSE Computer Science

    Boolean logic forms the foundational mathematical framework of digital computing, using logic gates and truth tables to evaluate binary inputs into deterministic outputs. In AQA GCSE Computer Science, students must master AND, OR, NOT, and XOR operators to evaluate logic circuits and simplify complex conditional expressions.

    Boolean logic explained

    A truth table lists every possible combination of input values and the output each produces.

    Read the full explanation

    With three inputs A, B and C there are 2³ = 8 rows; with two inputs there are 2² = 4 rows. Construct one by writing a column per input and one for the output, then filling the input columns systematically: for the rightmost input alternate 0,1,0,1; for the next double the run length (0,0,1,1); for the leftmost double again (0,0,0,0,1,1,1,1). This guarantees all eight combinations appear once. Then evaluate the Boolean expression for each row, working out bracketed or NOT terms first, then AND, then OR, and record the result. For example, for Q = (A AND B) OR NOT C, row A=1, B=0, C=0 gives (1 AND 0) OR NOT 0 = 0 OR 1 = 1. Check the output column has eight entries and that no combination is repeated or missed.

    Your focus

    1. Construct a truth table with up to three inputs containing all 2ⁿ input combinations
    2. Evaluate a Boolean expression row by row applying NOT, then AND, then OR
    3. Verify a completed truth table for completeness and correct output values

    Which command word is this?

    Accurately fill in pre-drawn truth table grids or finish a partially drawn circuit diagram using appropriate gates and labels.

    Boolean logic exam tips

    Topic Overview

    Boolean logic is a branch of algebra where all values are either True (1) or False (0). In AQA GCSE Computer Science, students study how fundamental logic gates - NOT, AND, OR, and XOR - process digital electrical signals to make decisions within hardware circuits.

    Understanding Boolean logic is critical because modern central processing units (CPUs) contain millions of these logic gates within the Arithmetic Logic Unit (ALU). Mastering truth tables, circuit diagrams, and logical operators bridges theoretical computational thinking with physical hardware implementation.

    Key Concepts
    • →Logic Gates: Physical hardware components implementing elementary operations (NOT, AND, OR, XOR).
    • →Truth Tables: Mathematical tables laying out every possible permutation of binary inputs and their deterministic logical outputs.
    • →Order of Precedence: Boolean evaluation order where NOT operations take priority over AND, followed by OR, unless altered by brackets.
    • →Circuit Equivalence: Combining simpler gates to replicate complex logic or simplify component counts to minimise manufacturing costs.
    Marking Points
    • Recognises that a three-input truth table needs 2³ = 8 rows covering every combination of inputs
    • Sets out one column per input plus a column for the output, with inputs ordered systematically so no combination repeats or is omitted
    • Evaluates intermediate terms such as NOT or bracketed AND expressions before combining them with OR
    • Applies operator precedence correctly: NOT first, then AND, then OR, unless brackets change the order
    • Works through each row independently and records a definite 0 or 1 in the output column
    • Checks the completed table for the correct number of rows and consistent, complete input patterns
    Examiner Tips
    • 💡Count your rows before starting: state 2ⁿ where n is the number of inputs, so three inputs give eight rows.
    • 💡Use the alternating-then-doubling pattern down the input columns to avoid missing combinations.
    • 💡Show intermediate working columns for complex expressions so each step can be followed and checked.
    • 💡Re-read the expression after completing the table and test one row by hand to confirm your method.
    • 💡Include intermediate columns in truth tables: Even if your final output column has an error, examiners award partial marks for correct sub-expressions.
    • 💡Use standard logic notation: AQA accepts both word notation (AND, OR, NOT) and symbolic notation, but sticking strictly to clear uppercase words prevents ambiguity.
    • 💡Double-check binary sequences: Ensure inputs are listed systematically (00, 01, 10, 11) to avoid skipping input combinations accidentally.
    Common Mistakes
    • Writing only four rows for three inputs: the learner should use 2³ = 8 rows, one for each combination.
    • Filling input columns in an unsystematic order so combinations repeat or are missed: use the alternating/doubling pattern to guarantee full coverage.
    • Combining terms left to right ignoring precedence: evaluate NOT and bracketed terms first, then AND, then OR.
    • Leaving the output column partly blank or inconsistent: every row must have a definite 0 or 1.
    • Confusing inclusive OR with exclusive OR: In daily English, 'or' often implies selecting one option exclusively, whereas logical OR includes both inputs being True.
    • Applying brackets incorrectly: Assuming that NOT A AND B inverts the whole expression, rather than just input A.
    • Miscounting table rows: Using four rows instead of eight rows for an expression involving three distinct inputs (2^n rule).
    Revision Plan
    1. 1Day 1-2: Memorise the truth tables and standard graphical symbols for NOT, AND, OR, and XOR gates.
    2. 2Day 3-4: Practice evaluating composite expressions containing two or three variables, generating full truth tables.
    3. 3Day 5-6: Translate real-world problem scenarios into Boolean expressions and draw the corresponding logic circuits.
    4. 4Day 7: Complete timed past paper questions from AQA Paper 1, cross-checking solutions against official mark schemes.
    Exam Question Types
    • 📋Truth Table Completion: Filling missing output values or intermediate working columns for a given circuit diagram or expression.
    • 📋Circuit Diagram Construction: Drawing connected logic gate symbols from a textual scenario or Boolean equation.
    • 📋Scenario to Expression Translation: Converting written system constraints (e.g. security alarms, sensor systems) into formal Boolean equations.
    Command Word Expectations (AQA)
    Complete

    Accurately fill in pre-drawn truth table grids or finish a partially drawn circuit diagram using appropriate gates and labels.

    Draw

    Produce a clear logic circuit diagram using distinct, standard logic gate symbols connected with unambiguous lines.

    Write

    Provide a concise Boolean expression matching the given requirements, using recognised operators (AND, OR, NOT, XOR).

    How Students Lose Marks (Examiner Pitfalls)
    Pitfall: Confusing the behaviour of OR and XOR logic gates when both inputs are True (1).
    ❌ Weak Answer (Loses Marks):An XOR gate turns on when any input is 1, just like an OR gate.
    Example improved answer:An OR gate outputs 1 if at least one input is 1, meaning it outputs 1 when both inputs are 1. In contrast, an XOR (exclusive OR) gate outputs 1 if and only if exactly one input is 1; if both inputs are 1, an XOR gate outputs 0.
    Examiner Tip: Always write out intermediate columns in truth tables for composite expressions rather than trying to calculate the final output mentally.
    Pitfall: Incorrectly drawing standard logic gate symbols, especially confusing the curved back of the OR gate with the flat back of the AND gate.
    ❌ Weak Answer (Loses Marks):Drawing a generic semi-circle shape for all gates with a text label inside.
    Example improved answer:Draw distinct AQA-recognised gate shapes: AND has a flat back and rounded front; OR has a curved back curving inward and pointed front; NOT is a triangle with a small inversion circle at the output tip.
    Examiner Tip: Never omit the small circle on the NOT gate tip; without it, examiners mark the symbol as an amplifier or an incomplete shape.
    Step-by-Step Worked Solutions

    Question: Construct a truth table for the Boolean expression: Q = (NOT A) AND (B OR C). Determine all output states for Q.

    1. 1.Step 1: Determine the number of inputs and rows. Three binary inputs (A, B, C) require 2^3 = 8 rows, populated in standard binary order from 000 to 111.
    2. 2.Step 2: Calculate intermediate columns. First, invert input A to find (NOT A): 0 becomes 1, and 1 becomes 0. Second, evaluate (B OR C): output is 1 if either B or C is 1.
    3. 3.Step 3: Combine intermediate columns using the AND operation: Q is 1 only when both (NOT A) is 1 AND (B OR C) is 1.
    4. 4.Step 4: Row evaluations: (A=0,B=0,C=0) -> Q=0; (A=0,B=0,C=1) -> Q=1; (A=0,B=1,C=0) -> Q=1; (A=0,B=1,C=1) -> Q=1; (A=1,B=0,C=0) -> Q=0; (A=1,B=0,C=1) -> Q=0; (A=1,B=1,C=0) -> Q=0; (A=1,B=1,C=1) -> Q=0.
    Final Answer: The output column Q yields [0, 1, 1, 1, 0, 0, 0, 0] for binary inputs 000 through 111 respectively.

    Question: An automated greenhouse activates a mist sprayer (S) when the temperature is high (T = 1) AND the humidity is NOT high (H = 0). Write the Boolean expression and state the outputs when (T=1, H=1) and (T=1, H=0).

    1. 1.Step 1: Translate the natural language conditions into formal Boolean logic. Mist sprayer S is active when T is 1 and H is NOT 1.
    2. 2.Step 2: Formulate the expression: S = T AND (NOT H).
    3. 3.Step 3: Test condition (T=1, H=1): S = 1 AND (NOT 1) = 1 AND 0 = 0 (Sprayer OFF).
    4. 4.Step 4: Test condition (T=1, H=0): S = 1 AND (NOT 0) = 1 AND 1 = 1 (Sprayer ON).
    Final Answer: Boolean expression: S = T AND (NOT H). For (T=1, H=1), S = 0. For (T=1, H=0), S = 1.
    Active Recall Memory Test
    What are the output states of a 2-input XOR gate when the inputs are (0,0), (0,1), (1,0), and (1,1)?
    Key Fact: 0, 1, 1, 0.
    How many rows are required in a complete truth table for a logic circuit containing 4 unique inputs?
    Key Fact: 16 rows (calculated as 2^4).
    In Boolean algebra, what is the default order of precedence among AND, OR, and NOT?
    Key Fact: NOT takes highest precedence, followed by AND, followed by OR.
    Frequently Asked Questions
    What is the difference between an OR gate and an XOR gate?
    An OR gate produces an output of 1 whenever one or both inputs are 1. In contrast, an XOR (Exclusive OR) gate produces an output of 1 only when exactly one input is 1. If both inputs to an XOR gate are 1, the output is 0.
    Do I have to use circuit symbols or logic algebra in AQA GCSE exams?
    You need to understand both formats. AQA exam papers frequently require students to read or draw graphical gate symbols and also write out equivalent Boolean statements using words like AND, OR, and NOT. Always check the specific question instructions to provide the requested format.
    Why do logic gates use binary values instead of regular numbers?
    Computers are constructed from electronic transistors that operate reliably as switches with two distinct physical states: fully on (high voltage, represented as 1) or fully off (zero voltage, represented as 0). Binary logic gates use these distinct physical states to perform predictable mathematical and conditional processing without signal degradation.
    How do I know what order to calculate Boolean expressions?
    Just like BIDMAS in mathematics, Boolean algebra has an order of operations. Operations inside brackets are always evaluated first. Next, all NOT operations are applied, followed by AND operations, and finally OR/XOR operations.