Modular addition
Modular addition means you add two numbers and then reduce the result to its remainder modulo a chosen number. The final answer should be the simplified remainder, not the ordinary sum.
Method
- Add the numbers first. Compute the sum normally.
- Reduce modulo the given number. Divide the sum by the modulus and keep the remainder.
- Write the simplified result. If the remainder is 0, the answer is 0 modulo that number.
Example pattern
If you have something like 0 + 8 mod 7, first find 60 + 8 = 68. Then reduce 68 modulo 7: since 68 = 7 9 + 5, the remainder is 5. So the modular sum is 5.
Quick checks
- The answer must always be between 0 and one less than the modulus.
- You can also reduce each addend first, then add and reduce again. This often makes large numbers easier to handle.
- Recheck by comparing your remainder to the original sum.
Common mistake
Do not stop at the ordinary sum. The task is complete only when the result is simplified modulo the required number.