Revise Computing
Revision notesQuestionsFor schools
Log inStart revising free
Revision notesQuestionsFor schoolsLog in
GCSE Computer Science/Paper 2/Programming Fundamentals

Arithmetic operators

The common arithmetic operators

2.2.1 Programming Fundamentals

Practise exam questions

Programming Fundamentals — Note 5 of 6

+ - * / MOD DIV ^

What you need to know

Arithmetic operators are the basic mathematical operations used in programming to process numerical data. You need to know addition, subtraction, multiplication, division, exponentiation, integer division (DIV/quotient), and modulus (MOD/remainder). DIV and MOD are particularly useful in programming for tasks like checking odd/even numbers.

What to know

  • + Addition, - Subtraction, * Multiplication, / Division (returns a decimal).
  • MOD (% in Python) returns the remainder of a division, e.g. 7 MOD 2 = 1.
  • DIV (// in Python) returns the integer quotient of a division, e.g. 7 DIV 2 = 3.
  • ^ Exponentiation (** in Python) raises a number to a power, e.g. 12^2 = 144.
  • MOD is useful for checking if a number is even or odd: number MOD 2 == 0 means even, remainder 1 means odd.
  • DIV and MOD together are used for TIME CONVERSIONS: hours = totalMinutes DIV 60, mins = totalMinutes MOD 60.
  • In Python / ALWAYS gives a float, even when it divides exactly: 6 / 2 gives 3.0. Use // when you need a whole-number answer.

Exam technique

  • Tip:'Incrementing a variable' means score = score + 1 (or score += 1 or score++). Note: score =+1 is WRONG — it assigns positive 1, overwriting the value. Also: score + 1 alone does NOT change score.
  • Tip:You may be asked to fill in the missing arithmetic operator, e.g. print(12 __ 2) for exponentiation → ^ or **.
  • Tip:* means multiplication, / means division. DIV is integer/floor division (no remainder). You may be asked to state the PURPOSE of each operator.

Code examples

Arithmetic operators in Python
python
a = 17
b = 5

print(a + b)   # 22  (addition)
print(a - b)   # 12  (subtraction)
print(a * b)   # 85  (multiplication)
print(a / b)   # 3.4 (real division)
print(a // b)  # 3   (DIV / quotient)
print(a % b)   # 2   (MOD / remainder)
print(a ** 2)  # 289 (exponentiation)

Ready to test yourself?

Practise 2.2.1 questions
← Previous noteIteration (count- and condition-controlled loops)2.2.1 Programming FundamentalsNext note →Boolean operators AND, OR and NOT2.2.1 Programming Fundamentals

Back to Programming Fundamentals

Revise another OCR GCSE topic: Data Types, Additional Programming Techniques

Programming Fundamentals

Note 5 of 6

  1. 1Variables, constants, operators, inputs, outputs and assignments
  2. 2Sequence
  3. 3Selection
  4. 4Iteration (count- and condition-controlled loops)
  5. 5Arithmetic operators
  6. 6Boolean operators AND, OR and NOT
Topic overview

© 2026 Revise Computing · revisecomputing.co.uk

Privacy noticeTermsContact

Revise Computing is an independent revision resource. It is not affiliated with, or endorsed by, OCR (Oxford Cambridge and RSA Examinations).