Modular arithmetic
Math · Discrete Math
Question 1 of 10
0What is ?
Decimals (0.75 or 0,75), fractions (3/4) and mixed numbers (1 1/2) are accepted. Do not use thousands separators.
How to type your answer
- Fractions: 3/4. Mixed numbers: 1 1/2.
- Decimals with a point or a comma: 0.75 or 0,75.
- Negative numbers start with a minus: -3/4.
- Percentages need the % sign: 75%.
Stuck? Read the explanation
Unlocks at a streak of 5 correct answers in a row.
Embed this practice on your site or class page
Paste this HTML into your page. Students practise right there; it is free and needs no account.
Modular arithmetic explained
Modular arithmetic is arithmetic on remainders. It asks what is left over after dividing by a fixed number, which is why it describes clocks, calendars and the days of the week.
The result of is always a whole number from 0 to . Two numbers are congruent modulo n when they leave the same remainder when divided by n, written . To work with large numbers, you can take remainders at any stage: equals , and the same idea works for multiplication. This keeps the numbers small and is the basis of many codes and cryptography methods.
Worked example
Find , and .
- and , so .
- , so .
- and , so .
A common mistake is giving as . Some programming languages return from their remainder operator, but the answer must lie between 0 and , so the correct value is 3.
What you will practise
New numbers every time you practise. Levels: Easy, Medium, Hard. Each answer is followed by a worked explanation.
Example questions
Easy
What is 10 mod 8?
Medium
What is -10 mod 12?
Hard
What is (17 × 39 + 28) mod 20?