It's 10 o'clock and you wait 5 hours — it's 3, not 15, because the clock wraps around at 12. Modular arithmetic makes that wrap-around rigorous, and it's the math behind everything from calendars to encryption.
Arithmetic that wraps around
We write a ≡ b (mod n) when n divides a − b — equivalently, a and b leave the same remainder on division by n. A 12-hour clock computes mod 12: five hours after 9 o'clock is 14 ≡ 2. The magic is that congruence respects arithmetic: you may add, subtract, and multiply congruences just like equations.
Last digit of 7¹⁰⁰? Work mod 10: 7² ≡ 9, 7³ ≡ 3, 7⁴ ≡ 1. Powers of 7 cycle every 4, and 100 = 4·25, so 7¹⁰⁰ ≡ 1 — last digit 1.
A number is congruent mod 9 to the sum of its digits (because 10 ≡ 1 mod 9). That is why the old bookkeeper's trick of casting out nines catches arithmetic slips.
Each letter slides 3 places down the alphabet. Only 26 keys exist — that's why Caesar is easy to crack.
The Caesar cipher is modular arithmetic on letters: each letter's position shifts by k, mod 26. Encryption is addition; decryption is subtraction.
- Days of the week cycle mod 7. Pick a known anchor: say, January 1 of this year and its weekday.
- Count the days from the anchor to your birthday this year (watch the month lengths).
- Reduce that count mod 7 and step the weekday forward by the remainder.
- Verify against a calendar.
What you should see: You computed a weekday with pure mod-7 arithmetic — the core idea inside every perpetual-calendar algorithm.