Skip to content
VirtusAcademy

Boolean Operators

FoundationHigherAQA

Master Boolean Operators for GCSE Computer Science with this free worksheet and full mark scheme — Foundation and Higher exam-style questions with worked answers for AQA GCSE Computer Science (8525). The Boolean operators AND, OR and NOT combine conditions to control the flow of a program.

Free downloads

These worksheets and mark schemes are original, written for Virtus Academy and checked against the current AQA specification. Every worksheet comes with a full mark scheme.

Topic overview

Boolean operators combine or invert conditions, producing a result that is either True or False. Three must be known.

AND gives True only when both conditions are True. OR gives True when at least one condition is True. NOT inverts a condition, turning True into False and False into True.

A truth table lists every possible combination of inputs with the resulting output. For two inputs there are four rows, because each input can be True or False independently: 2 × 2 = 4. For three inputs there are eight rows. Building the table systematically, rather than reasoning about cases in your head, is what makes these questions reliable.

Revision notes

The three operators

AND: True only when both conditions are True.

OR: True when at least one condition is True — including when both are. NOT: inverts the value, so NOT True is False and NOT False is True.

Truth tables

A truth table lists every combination of inputs with the resulting output.

Two inputs give 4 rows because each can be True or False independently: 2 × 2 = 4. Three inputs give 8 rows. List the input combinations systematically so none is missed.

Combining operators

Conditions can be combined: age ≥ 18 AND hasLicence = True.

Brackets control the order when several operators appear together. NOT is applied first, then AND, then OR — so brackets should be used to make the intention explicit.

Key points

  • AND is True only when both are True.
  • OR is True when at least one is True.
  • NOT inverts True and False.
  • A truth table lists every input combination.
  • Two inputs give four rows.
  • Three inputs give eight rows.

Worked examples

Example 1

State the result of True AND False, and True OR False. [2 marks]

Working

True AND False = False, because AND requires both to be Trueevaluate the AND expression
True OR False = True, because OR requires only one to be Trueevaluate the OR expression

Example 2

State how many rows a truth table with three inputs has, and explain. [2 marks]

Working

Each of the three inputs can independently be True or False, giving 2 × 2 × 2explain the combinations
= 8 rowswork out the number of rows

Example 3

Write a condition that is True only when a user is at least 18 and has a licence. [2 marks]

Working

age ≥ 18 AND hasLicence = Truecombine the two conditions with AND
AND is used because both conditions must hold for the result to be Trueexplain the choice of operator

Common mistakes

  • Thinking OR excludes the case where both are True.

    OR is True when at least one holds, including both.

  • Missing rows from a truth table.

    Two inputs need 4 rows, three need 8 — list them systematically.

  • Using AND when either condition would do.

    AND requires both; OR requires at least one.

  • Forgetting brackets in complex conditions.

    They make the intended order explicit.

Exam tips

  • List truth table rows systematically.
  • Remember OR includes the both-True case.
  • Use brackets in combined conditions.
  • Check whether the question needs one condition or both.

Key terms

AND
True only when both conditions are True.
OR
True when at least one condition is True.
NOT
Inverts a Boolean value.
Truth table
A table of all input combinations and their outputs.

Written and reviewed against the current AQA specification. Spotted an error? Let us know.