AlgoScope

Modular Arithmetic

MathematicsbeginnerNumber Theory

Arithmetic on a clock with m positions. Reduce at every step and nothing ever grows past m.

Result · step 8 of 9Number Theory Basics: Adding on a clock of 12
0✓01✓12✓23✓344556677889✓910✓1011✓11i

One step to 4.

Open in the player →or start at step 8

What you will see

A clock face with m positions; addition rotates around it.

How number theory basics works →

Cost

SpaceO(1)

How you work with it here

play it through, step one change at a time, run it on your own input.

Screen readers: Numbers announce their value and role; each step announces the arithmetic performed.

Reduced motion: Values crossfade; no travelling digits.

Taught by the same lesson

Number Theory Basics covers these too, in the same run.