Revise Computing
Revision notesQuestionsFor schools
Log inStart revising free
Revision notesQuestionsFor schoolsLog in
GCSE Computer Science/Supplementary programming practice/Arithmetic Operators

Operator precedence

301.2 Arithmetic Operators

Practise exam questions

Arithmetic Operators — Note 4 of 4

Apply BIDMAS to expressions.

What you need to know

Python follows BIDMAS (Brackets, Indices, Division/Multiplication, Addition/Subtraction). Operations like **, *, /, +, - are evaluated in that order, just like in maths.

What to know

  • Brackets () are evaluated first
  • Then ** (indices/powers)
  • Then * / // % (left to right)
  • Then + - (left to right)
  • Use brackets to make order explicit and clear

Code examples

Precedence example
python
print(2 + 3 * 4)     # 14, not 20
print((2 + 3) * 4)   # 20
print(10 - 2 ** 3)   # 2 (10 - 8)
← Previous noteExponentiation301.2 Arithmetic OperatorsNext topic →Declare variables301.3 Variables and Constants

Back to Arithmetic Operators

Specification notes for programming are in Paper 2.

Arithmetic Operators

Note 4 of 4

  1. 1Arithmetic operators
  2. 2DIV and MOD
  3. 3Exponentiation
  4. 4Operator precedence
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).