modaritmetikk
Modaritmetikk, also known as modular arithmetic, is a system of arithmetic for integers, where numbers "wrap around" after reaching a certain value, the modulus. This concept is fundamental in number theory and has applications in various fields, including computer science, cryptography, and error-correcting codes.
In modular arithmetic, two numbers are considered equivalent if they differ by a multiple of the modulus.
The basic operations of addition, subtraction, and multiplication can be performed in modular arithmetic. For instance,
Modular arithmetic is particularly useful in situations where only the remainder of a division is of interest.