Power Mod Calculator
Calculation Result
About Power Mod
Power Mod (Modular Exponentiation) calculates a^b mod m, which is the remainder when a raised to the power of b is divided by m. This operation is fundamental in cryptography and number theory.
Formula:
a^b mod m = (a × a × ... × a) mod m
Example Calculations:
Base (a) | Exponent (b) | Modulus (m) | Result | Explanation |
---|---|---|---|---|
2 | 3 | 5 | 3 | 2³ mod 5 = 8 mod 5 = 3 |
3 | 4 | 7 | 4 | 3⁴ mod 7 = 81 mod 7 = 4 |
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
- a^b mod m = (a mod m)^b mod m
- If a ≡ b (mod m), then a^n ≡ b^n (mod m)
Applications:
- Cryptography (RSA, Diffie-Hellman)
- Number theory
- Computer science
- Error detection
- Random number generation
Tips:
- Use positive integers for all inputs
- Modulus should be greater than 1
- For large numbers, use the efficient algorithm
- Check for overflow in intermediate calculations
- Verify results with smaller test cases
Advertisement Space