📄 Paper 1 · 4.1 Fundamentals of Programming
⭐ Pro
4.1.1c Arithmetic, Relational & Boolean Operations
AQA 7517 · A-Level Computer Science · ~15 min read

Arithmetic Operators

AQA 7517 requires knowledge of the following arithmetic operators used in pseudocode and high-level languages:

OperationAQA PseudocodeExampleResult
Addition+7 + 310
Subtraction-10 - 46
Multiplication*5 * 630
Real Division/7 / 23.5
Integer Division (quotient)DIV7 DIV 23
Modulus (remainder)MOD7 MOD 21
Exponentiation^2 ^ 8256

DIV and MOD — Exam Essentials

DIV returns the integer quotient (whole number part) of a division: 17 DIV 5 = 3

MOD returns the remainder after integer division: 17 MOD 5 = 2

Key applications of MOD in exam questions:

  • Even/odd check: IF n MOD 2 = 0 THEN n is even
  • Wrap-around: e.g. clock arithmetic — hour MOD 12 wraps hours back into 0–11
  • Checksum validation: ISBN-10, parity checks use modular arithmetic

Relational Operators

Relational operators compare two values and evaluate to a Boolean (True or False):

OperatorMeaningExampleResult
=Equal to5 = 5True
Not equal to5 ≠ 3True
<Less than3 < 5True
>Greater than7 > 10False
Less than or equal to5 ≤ 5True
Greater than or equal to6 ≥ 7False

Boolean Operators

Boolean operators combine or negate Boolean values/conditions:

OperatorDescriptionExampleResult
ANDTrue only if BOTH operands are TrueTrue AND FalseFalse
ORTrue if AT LEAST ONE operand is TrueTrue OR FalseTrue
NOTInverts the Boolean valueNOT TrueFalse

Truth Tables

ABA AND BA OR BNOT A
TrueTrueTrueTrueFalse
TrueFalseFalseTrueFalse
FalseTrueFalseTrueTrue
FalseFalseFalseFalseTrue

Combining Operators — Operator Precedence

When multiple operators appear in an expression, they are evaluated in this order (BODMAS-style):

  1. Brackets ()
  2. Exponentiation ^
  3. Multiplication, Division, MOD, DIV * / MOD DIV
  4. Addition, Subtraction + -
  5. Relational operators = ≠ < > ≤ ≥
  6. NOT
  7. AND
  8. OR
Exam tip: Know all AQA pseudocode symbols — especially ≠ (not equal), ≤ and ≥. In exam answers, accept <> or ≠ for "not equal to". MOD and DIV are very commonly tested — practise evaluating expressions like 23 MOD 7 (answer: 2) and 23 DIV 7 (answer: 3).
⚠️ Common Mistakes
  • Confusing / (real division, gives decimal) with DIV (integer quotient) — 7/2=3.5 but 7 DIV 2=3
  • Thinking OR requires BOTH to be True — OR is True if at least ONE is True
  • Forgetting that NOT applies to the whole expression after it, not just the next term
  • Evaluating AND and OR with equal precedence — AND has higher precedence than OR
  • Using != instead of in AQA pseudocode (lose presentation marks)
Video coming soon
Click through the slides at your own pace. Use arrow keys or click to advance.
Click slide or press arrow keys to navigate

Worksheet — 4.1.1c Arithmetic, Relational & Boolean Operations

8 questions · instantly marked · AQA 7517 standard

Q1Evaluate the following AQA pseudocode expressions: (a) 17 MOD 5, (b) 17 DIV 5, (c) 2 ^ 10, (d) 7 / 2[4]
✅ Mark scheme
Mark scheme
(a) 2 [1]; (b) 3 [1]; (c) 1024 [1]; (d) 3.5 [1].
Q2A program checks if a number n is even. Write the AQA pseudocode condition using MOD.[1]
✅ Mark scheme
Mark scheme
n MOD 2 = 0 [1] (or equivalent: n MOD 2 ≠ 1)
Q3Complete the truth table for (A AND B) OR (NOT C) where A=True, B=False, C=True.[3]
✅ Mark scheme
Mark scheme
A AND B = True AND False = False [1]; NOT C = NOT True = False [1]; False OR False = False [1]. Overall result: False.
Q4Explain the difference between / (real division) and DIV (integer division) in AQA pseudocode, giving an example where they give different results.[2]
✅ Mark scheme
Mark scheme
/ performs real division and can return a decimal (e.g. 5/2 = 2.5) [1]; DIV returns only the integer quotient, discarding the remainder (e.g. 5 DIV 2 = 2) [1].
Q5Write the truth table (all 4 rows) for A AND (NOT B).[3]
✅ Mark scheme
Mark scheme
T,T→F; T,F→T; F,T→F; F,F→F [1 per correct column for NOT B and final result]. Row answers: T,T: F; T,F: T; F,T: F; F,F: F [1 each for last two rows correct if NOT B column shown].
Q6State the result of each relational expression: (a) 5 ≥ 5, (b) 3 ≠ 3, (c) 10 < 7, (d) 4 ≤ 8[4]
✅ Mark scheme
Mark scheme
(a) True [1]; (b) False [1]; (c) False [1]; (d) True [1].
Q7A programmer wants to check if a score is between 40 and 60 inclusive. Write the AQA pseudocode condition using AND and relational operators.[2]
✅ Mark scheme
Mark scheme
score >= 40 AND score <= 40 [1 each half — award [2] for: score >= 40 AND score <= 60]. Must use ≥/≤ or >= / <=. Penalise if uses OR instead of AND.
Q8State the precedence order for evaluating: NOT, AND, OR (from highest to lowest).[2]
✅ Mark scheme
Mark scheme
Highest: NOT [1]; then AND; lowest: OR [1]. (NOT > AND > OR)
Topic Quiz
Question 1 of 15
You scored
out of 15
Card 1 of 12
Click to reveal definition
🎉
All cards reviewed!
TermDefinition
🎯

Mini Test — Operations

10 questions · 10 minutes

← 4.1.1b Selection & Iteration
3 of 70 · AQA 7517
4.1.1d String Handling →