0% found this document useful (0 votes)
222 views

Notes 1 Modulo Arithmetic

Here are the solutions: 1) 95 mod 8 = 7 2) 168 mod 15 = 3 3) -77 mod 12 = 11 4) -202 mod 22 = 20 5) (80 + 59) mod 15 = 4 6) (360 - 32) mod 9 = 7 7) (3 - 12) mod 4 = 1 8) (25 - 72) mod 7 = 3 9) 82 mod 7 = 1, so it was Monday 10) 93 = 24(3) + 21, so it will be 4am

Uploaded by

julesgico30533
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
222 views

Notes 1 Modulo Arithmetic

Here are the solutions: 1) 95 mod 8 = 7 2) 168 mod 15 = 3 3) -77 mod 12 = 11 4) -202 mod 22 = 20 5) (80 + 59) mod 15 = 4 6) (360 - 32) mod 9 = 7 7) (3 - 12) mod 4 = 1 8) (25 - 72) mod 7 = 3 9) 82 mod 7 = 1, so it was Monday 10) 93 = 24(3) + 21, so it will be 4am

Uploaded by

julesgico30533
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 17

MODULAR

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.

Every time we go past 12 on the clock we start


counting the hours at 1 again. Here, we are using
Modulo 12.

How can you easily find the sum in clock arithmetic?


Days of the Week Arithmetic
If Monday is the first day of the week, the days
may be coded 1 to 7, for Monday through
Sunday. So 2 days after Thursday would be:
4 + 2 = 6 which is Saturday
and 10 days after Tuesday is
2 + 10 = 5 which is Friday

Here, we are using Modulo 7 to find a new


numerical day of the week.
Using days of the week,

3+6= 2
5+7= ?
17 - 1 = 2
25 - 4 = ?

How can you find the answer easily?


Situations that repeat in cycles
(such as the 12-hour clock and
the 7 days of the week)

are represented mathematically


by using

Modular Arithmetic
When we divide two integers we will have an
equation that looks like the following:

𝐴
= 𝑄 𝑟𝑒𝑚𝑎𝑖𝑛𝑑𝑒𝑟 𝑅
𝐵

where, A is the dividend


B is the divisor
Q is the quotient
R is the remainder
Sometimes, we are only interested in what
the remainder is when we divide A by B.

Hence, using modulo, we may rewrite the


statement as

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 = ?

• Days of the Week


10 mod 7 = 3
17 mod 7 = ?
24 mod 7 = ?
To find the value of A mod B = R:
❖ Express A mod B = R as
A = B(k) + R where 0 ≤ R < B
(meaning, R cannot be negative)
Example:

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,

87 = 12(7) + 3 try to check this with


your calculator

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

1. If today is Thursday, what day of the week


is 1000 days from now?

The day repeats every 7 days. So it will be Thursday again


994 days from now (7 x 142). We shall now count 6 days (the
remainder) from Thursday:

Solution: 1000 mod 7 = 7(142) + 6


Thursday + 6 days → Wednesday!
If it is 10am, what time is it 520 hours
from now?

The time repeats every 24 hours. So it will be 10am again after


504 hours (24 x 21). We then count 16 hours (the remainder)
from 10 am:

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?

You might also like