Notes 1 Modulo Arithmetic
Notes 1 Modulo Arithmetic
ARITHMETIC
Examine the following:
8 + 2 = 10
3+5= 8
6+7= 1
10 + 9 = 7
8+8= 4
Where can you find this kind of addition?
Clock Arithmetic
If you went to sleep at 10 o'clock
and you slept for 8 hours, then
the time you woke up would be at
6 o'clock.
This can be written as 10 + 8 = 6.
3+6= 2
5+7= ?
17 - 1 = 2
25 - 4 = ?
Modular Arithmetic
When we divide two integers we will have an
equation that looks like the following:
𝐴
= 𝑄 𝑟𝑒𝑚𝑎𝑖𝑛𝑑𝑒𝑟 𝑅
𝐵
A mod B = R
which means, R is the remainder
when A is divided by B
• Clock Arithmetic
13 mod 12 = 1
19 mod 12 = ?
28 mod 12 = ?
1) 87 mod 12
Divide 87 by 12 and get the whole number part of the quotient
which is 7. Now, 12(7) = 84. We need 3 to make it 87. Hence,
Therefore, 87 mod 12 = 3
2) 74 mod 5
74 = 5(14) + 4
74 mod 5 = 4
3) 128 mod 13
128 = 13(?) + ?
128 mod 13 = ?
4) 237 mod 10
237 = 10(?) + ?
237 mod 10 = ?
5) -28 mod 13
-28 = 13(-3) + 11 try to check this with
your calculator
-28 mod 13 = 11
❖ Keep in mind that R cannot be negative, so we chose
k = -3 instead of k = -2.
6) -37 mod 6
-37 = 6(?) + ?
-37 mod 6 = ?
APPLICATIONS OF MODULAR ARITHMETIC
Solution:
520 = 24(21) + 16
10am + 16 hours → 2am
Answer the following:
1) 95 mod 8
2) 168 mod 15
3) -77 mod 12
4) -202 mod 22
5) (80 +59 ) mod 15
6) (360 – 32) mod 9
7) (3 – 12) mod 4
8) (25 – 72) mod 7
9) If today is Monday, what day of the week was it 82 days ago?
10) If it is 5am right now, what time will it be 93 hours from now?