Modular arithmetic "wraps" numbers around a circle, like the hand of a clock. Change the modulus and the number, and see the remainder — the foundation of cryptography.

I’ll give you a number a and a modulus n — compute the remainder a mod n (what is left after the full laps).
What just happened?
The hand moved steps around a dial with positions. Each time it reaches the end it returns to the start — only where it finally stops matters. That position is the remainder of the division.
Definition — the modular remainder:
We say that (“a is congruent to r modulo n”) when and give the same remainder when divided by . In short: they differ by a multiple of .
The clock analogy:
A 12-hour clock counts modulo 12. 15:00 is , i.e. 3:00 in the afternoon — one full lap of the dial plus 3 hours. Likewise (two laps and 3).
Why is this used in cryptography?
The Caesar cipher shifts letters modulo 26 (the alphabet “wraps” from Z to A). RSA and the Diffie–Hellman key exchange rely on exponentiation modulo a large number — operations on the circle of remainders are reversible only for someone who knows the key. Without modular arithmetic there is no modern encryption.
Why you need this for the exam:
Problems with remainders, divisibility and periodicity (e.g. “what day of the week in 100 days”, the last digit of a power) you solve with one trick: compute . Write down , compute the remainder — the remainder governs the whole cycle.
Remember: is the remainder of a division — a number on a circle of positions, where . It is the foundation of cryptography.
is the remainder of dividing by — numbers "wrap around" a circle like the hours on a clock.
(just as is in the afternoon)
The notation means that divides . The operations are compatible with remainders — this is the basis of the Caesar cipher and RSA.
Notation: a number, the modulus, the remainder of the division.
3 — just as 15:00 is 3:00 in the afternoon; the remainder of dividing 15 by 12.
It is the basis of cryptography (the Caesar cipher, RSA) and of number theory — operations on remainders.
Teaching? Embed this experiment on your site.
Free widget — paste it on your school site, blog or notes. It links to the full version.