Modular Arithmetic Calculator
Calculate modular arithmetic operations: a mod m, modular addition, and modular multiplication.
A Mod M
2
Fórmula
## Modular Arithmetic ### Definition **a mod m** gives the remainder when a is divided by m. For example, 17 mod 5 = 2 because 17 = 3 × 5 + 2. ### Key Properties - (a + b) mod m = ((a mod m) + (b mod m)) mod m - (a × b) mod m = ((a mod m) × (b mod m)) mod m ### Applications Modular arithmetic is used in cryptography (RSA), hash functions, clock arithmetic, and check digit algorithms (ISBN, credit cards).
Ejemplo Resuelto
Calculate modular operations with a = 17, b = 8, m = 5.
- 0117 mod 5 = 2 (17 = 3×5 + 2)
- 028 mod 5 = 3 (8 = 1×5 + 3)
- 03(17+8) mod 5 = 25 mod 5 = 0
- 04(17×8) mod 5 = 136 mod 5 = 1
Preguntas Frecuentes
What is modular arithmetic?
Modular arithmetic deals with remainders. "a mod m" is the remainder when dividing a by m. Think of it like clock arithmetic: 14:00 mod 12 = 2:00.
What is congruence?
Two numbers are congruent modulo m if they have the same remainder when divided by m. Written as a ≡ b (mod m). For example, 17 ≡ 2 (mod 5).
Where is modular arithmetic used?
It is fundamental to cryptography (RSA, Diffie-Hellman), computer science (hash tables), error detection (checksums), and everyday life (clock times, days of the week).
Aprender