The Tools of Calculation

Test yourself on Operators with exam style questions, marked instantly.

Flashcards that come back just before you would forget them.

A revision plan that remembers what you know and shows what to do next.

See which topics you have nailed and which need another look.

Quiz yourself on OperatorsGet your flashcardsBuild my revision planTrack my progress

The Tools of Calculation

Operators are the verbs of programming - they DO things to data. Arithmetic operators do maths (+, -, *, /). Comparison operators ask questions (==, !=, <, >). Logical operators combine conditions (AND, OR, NOT). Master these and you can make computers calculate anything!

Three groups of operators. Arithmetic: + addition 5 + 3 = 8, - subtraction 9 - 4 = 5, * multiplication 3 * 4 = 12, / division 10 / 4 = 2.5, MOD remainder 10 MOD 3 = 1, DIV integer division 10 DIV 3 = 3, ^ exponentiation 2 ^ 8 = 256. Comparison, each example giving True: == equal to, != not equal to, < less than, > greater than, <= less than or equal to, >= greater than or equal to. Boolean: True AND False gives False, False OR True gives True, NOT True gives False.

The figure uses OCR style for comparisons: == for equal to and != for not equal to. AQA writes = for equal to and ≠ for not equal to. The exponent ^ is on OCR and Edexcel only. DIV and MOD are on all three boards.

Make this stick

Signing in gives access to all PrepWise features.

PrepWise is a trading name of A3M Quality Solutions Limited, registered in England and Wales, company number 14959172. Registered office: 202 Stroud Road, Gloucester, GL1 5LA. ICO registration ZC267069.