Modulo in one line

The expression a mod n asks for the remainder after removing full groups of nn from aa.

One common identity is a=nq+ra = nq + r, with quotient qq and remainder rr.

Where it shows up

  • Clock arithmetic and repeating schedules
  • Programming loops, indexing, and cyclic layouts
  • Number theory and divisibility checks