OCR · GCSE · Computer Science

    Course version: J277 · Version from Sept 2022

    Boolean logic: Truth tables

    A truth table lists every possible combination of binary inputs and the resulting output for a Boolean expression or logic diagram.

    Checked against the OCR J277 specification on .

    • Point 2 of 4
    • 4 key terms

    Study notes

    From the checked teaching notes for this specification point.

    The idea

    A truth table lists every possible combination of binary inputs and the resulting output for a Boolean expression or logic diagram. For two inputs, there are four rows (00, 01, 10, 11); for three inputs, there are eight rows. Each row represents one input combination, and the output column shows the result of applying AND, OR and NOT operators. To construct a truth table, write all input combinations in a systematic order, such as counting up in binary. Add intermediate columns for sub-expressions to prevent errors, then evaluate the final output column. For example, for the expression A AND B, the output is 1 only when both A = 1 and B = 1. Truth tables can also be used to test if two logical expressions are equivalent.

    What earns the marks

    • List all possible input combinations for the given number of inputs, using 2ⁿ rows where n is the number of inputs.
    • Order input combinations systematically, such as counting in binary from 00 to 11 for two inputs, to avoid missing or repeating rows.
    • Evaluate the output for each row by applying the Boolean operators (AND, OR, NOT) in the correct order.
    • Complete truth tables for expressions involving combinations of AND, OR and NOT, such as NOT (A AND B) or A OR NOT B.
    • Use truth tables to compare expressions and determine whether they produce identical outputs for all input combinations.

    Common mistakes and how to put them right

    • Missing or duplicating input combinations.

      Put it right: Use 2ⁿ rows and list them systematically, for example 00, 01, 10, 11 for two inputs.

    • Applying NOT to the wrong part of an expression.

      Put it right: NOT binds to the term immediately following it unless brackets show otherwise, so NOT A AND B means (NOT A) AND B.

    • Filling the output column by guessing rather than evaluating each row.

      Put it right: Work through each row using the operator definitions, and use intermediate columns to keep track.

    Exam tips

    • Write intermediate columns for parts of the expression, such as A AND B or NOT A, before completing the final output column.
    • As the OCR J277 exam is untiered, be prepared for both simple single-operator truth tables and more complex expressions combining AND, OR and NOT.
    • When comparing two expressions, complete both truth tables and compare the output columns row by row to prove equivalence.

    Try the lesson

    The start of the Boolean logic: Truth tables lesson, made from checked teaching notes for this specification point.

    Have a go first

    In a truth table for the Boolean expression A AND B, which combination of inputs produces an output of 1?

    Listen

    A truth table lists every possible combination of binary inputs and the resulting output for a Boolean expression or logic diagram. For two inputs, there are four rows (00, 01, 10, 11); for three inputs, there are eight rows. Each row represents one input combination, and the output column shows the result of applying AND, OR and NOT operators. To construct a truth table, write all input combinations in a systematic order, such as counting up in binary. Add intermediate columns for sub-expressions to prevent errors, then evaluate the final output column. For example, for the expression A AND B, the output is 1 only when both A = 1 and B = 1. Truth tables can also be used to test if two logical expressions are equivalent. A strong answer earns marks for these points. List all possible input combinations for the given number of inputs, using 2ⁿ rows where n is the number of inputs. Order input combinations systematically, such as counting in binary from 00 to 11 for two inputs, to avoid missing or repeating rows. Evaluate the output for each row by applying the Boolean operators (AND, OR, NOT) in the correct order. Complete truth tables for expressions involving combinations of AND, OR and NOT, such as NOT (A AND B) or A OR NOT B. Exam tip: Write intermediate columns for parts of the expression, such as A AND B or NOT A, before completing the final output column.

    Key words

    Say what each word means before you turn the card.

    Truth tables

    Try answering aloud or in your head before turning the card.

    Systematic enumeration of input combinations

    Try answering aloud or in your head before turning the card.

    Evaluating AND, OR and NOT operators

    Try answering aloud or in your head before turning the card.

    Testing logical equivalence

    Try answering aloud or in your head before turning the card.

    See every definition
    Truth tables
    A table that lists every possible combination of binary inputs and the resulting output for a Boolean expression or logic diagram.
    Systematic enumeration of input combinations
    Writing all input combinations in a systematic order, such as counting up in binary, so that no rows are missed or repeated.
    Evaluating AND, OR and NOT operators
    Working through each row using the operator definitions to find the output, adding intermediate columns for sub-expressions to prevent errors.
    Testing logical equivalence
    Using truth tables to test if two logical expressions are equivalent by comparing whether they produce identical outputs for all input combinations.

    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: Truth tables

    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