Modulo Arithmetic and Casting Out Nines
Modulo Arithmetic and Casting Out Nines
Modulo Arithmetic and Casting Out Nines
– Estimate answer
– Modulo arithmetic
Generating passwords
Checking with Modulo Arithmetic
707649 mod 9 = (7+7+6+4) mod 9 = 2+4 = 6
435342 mod 9 = 3
707649 - 435342 = 272307
272307 mod 9 = 3
(6 - 3) mod 9 = 3
The difference checks!
Casting out Nines
Reduces complicated arithmetic to single digit operations
Example:
20/8 = 2 rem 4