Microsoft Store
 

Modular arithmetic


 

:This article is about an algebra concept. See modulo for other uses.

Related Topics:
Algebra - Modulo

~ ~ ~ ~ ~ ~ ~ ~ ~ ~

Modular arithmetic is a system of arithmetic for integers, where numbers "wrap around" after they reach a certain value — the modulus.

Related Topics:
Arithmetic - Integer

~ ~ ~ ~ ~ ~ ~ ~ ~ ~

One way to understand modular arithmetic is to consider "clock arithmetic": the arithmetic of hours on the clock face. If we begin at 7 o'clock and add 8 hours, then rather than ending at 15 o'clock (as in usual addition), we are at 3 o'clock. Likewise, if we start at noon and count off 7 hours three times (3 × 7), we end up at 9 o'clock (rather than 21). Essentially, when we reach 12, we start over; 12 is called the modulus, and so this is an example of arithmetic modulo 12.

~ ~ ~ ~ ~ ~ ~ ~ ~ ~