Modular Arithmetic Calculator — 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).
### 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.
- 17 mod 5 = 2 (17 = 3×5 + 2)
- 8 mod 5 = 3 (8 = 1×5 + 3)
- (17+8) mod 5 = 25 mod 5 = 0
- (17×8) mod 5 = 136 mod 5 = 1