AQA · GCSE · Computer Science
Course version: 8525 · Version from Sept 2020
Students should be able to use these operators, and combinations of these…
Full specification wording
Boolean operations in a programming language: Students should be able to use these operators, and combinations of these operators, within conditions for iterative and selection structures.
This criterion is about applying Boolean operators, and combinations of them, inside the conditions that control selection (if, elif, else) and iteration (while, for with a condition).
Checked against the AQA 8525 specification (opens in a new tab) on .
- Point 1 of 4
Study notes
From the checked teaching notes for this specification point.
The idea
This criterion is about applying Boolean operators, and combinations of them, inside the conditions that control selection (if, elif, else) and iteration (while, for with a condition). A condition is an expression that evaluates to True or False, and the operators AND, OR and NOT let you build compound conditions from simpler comparisons. For example, a while loop might continue while count < 10 AND not finished, and an if statement might run when age >= 18 OR has_permission. The skill is choosing the right operator and combining them so the condition matches the intended rule, then predicting whether the branch or loop runs. You must be able to read a compound condition and trace its result, and to write one that expresses a given rule.
What earns the marks
- Identifies that a condition evaluates to True or False and controls whether a selection branch runs or an iteration continues.
- Selects AND when both sub-conditions must be true for the whole condition to be true.
- Selects OR when at least one sub-condition must be true for the whole condition to be true.
- Applies NOT to invert the truth value of a single condition or a parenthesised group.
- Correctly evaluates a combined condition by working out each part and then applying the operators in the right order.
- Writes a compound condition inside an if or while that matches a stated rule.
Common mistakes and how to put them right
Assuming AND means either part can be true.
Put it right: AND requires both sub-conditions to be true.
Forgetting that NOT reverses the result, so treating not x as the same as x.
Put it right: Not x is true only when x is false.
Ignoring brackets and evaluating a mixed AND/OR condition left to right regardless of grouping.
Put it right: Evaluate the bracketed group first, then apply the operators.
Placing a compound condition outside any selection or iteration structure.
Put it right: The condition must sit inside an if, elif, while or similar control structure.
Exam tips
- Trace each sub-condition to True or False before combining them, writing the intermediate values down.
- Check brackets first, then NOT, then AND, then OR when a condition mixes operators.
- Test your answer with a sample set of values to confirm the branch or loop behaves as the rule requires.
Try the lesson
The start of the Boolean operations in a programming language: Students should be able to use these operators, and combinations of these operators, within conditions for iterative and selection structures. lesson, made from checked teaching notes for this specification point.
Have a go first
A condition is written as (age > 16) AND (hasTicket = true). For the whole condition to evaluate to true, what must be the case?
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.
A week of Premium from your first lesson · Then the free plan continues · No card, no charge
Test your understanding of Boolean operations in a programming language: Students should be able to use these operators, and combinations of these operators, within conditions for iterative and selection structures.
Active recall beats re-reading. Take an instant quiz now to test what you’ve learned and lock it into long-term memory.
A week of Premium from your first lesson · Then the free plan continues · No card, no charge