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

Arithmetic-Modulo

The document explains Arithmetic Modulo, also known as Clock Arithmetic, which calculates the remainder when one number is divided by another. It includes examples of finding modulo for both positive and negative numbers, as well as its applications in verifying check digits for barcodes, credit cards, and ISBNs. Additionally, it provides exercises for verifying congruences and calculating least residues.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views

Arithmetic-Modulo

The document explains Arithmetic Modulo, also known as Clock Arithmetic, which calculates the remainder when one number is divided by another. It includes examples of finding modulo for both positive and negative numbers, as well as its applications in verifying check digits for barcodes, credit cards, and ISBNs. Additionally, it provides exercises for verifying congruences and calculating least residues.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 62

Arithmetic Modulo

Arithmetic Modulo (mod)


Is an operator that seeks for a reminder
when two numbers are divided.
Also called as Clock Arithmetic
Denoted by the symbol b mod m = a
k mod m = r

Residue = is the answer of modulo operator


Illustration:

Km
Illustration:

K  m = Quotient
Illustration:

K  m = Quotient + remainder
Illustration:

K  m = Quotient + remainder

K mod m = remainder
Finding Arithmetic Modulo(Positive
#’s)

5 mod 3
Finding Arithmetic Modulo(Positive
#’s)

5 mod 3

Answer : 2
Finding Arithmetic Modulo(Positive
#’s)

32 mod 7
Finding Arithmetic Modulo(Positive
#’s)

32 mod 7

Answer : 4
Finding Arithmetic Modulo(Positive
#’s)

25 mod 5
Finding Arithmetic Modulo(Positive
#’s)

25 mod 5

Answer : 0
Finding Arithmetic Modulo(Positive
#’s)

175 mod 10
Finding Arithmetic Modulo(Positive
#’s)

175 mod 10
Answer : 5
Finding Arithmetic Modulo(Positive
#’s)

14 mod 20
Finding Arithmetic Modulo(Positive
#’s)

14 mod 20

Answer 14
Finding Arithmetic Modulo(Positive
#’s)

(35 – 7) mod 3
Finding Arithmetic Modulo(Positive
#’s)

(35 – 7) mod 3

Answer : 1
Finding Arithmetic Modulo(Positive
#’s)

20 – 45 mod 7
Finding Arithmetic Modulo(Positive
#’s)

20 – 45 mod 7
Answer : 17
Finding Arithmetic Modulo (negative #’s)
- k mod m

Steps:
Finding Arithmetic Modulo (negative #’s)
- k mod m

Steps:
a. /k/ mod m = r’
Finding Arithmetic Modulo (negative #’s)
- k mod m

Steps:
a. /k/ mod m = r’
b. r = m – r’
Finding Arithmetic Modulo
(negative #’s)

- 6 mod 4
Finding Arithmetic Modulo
(negative #’s)

- 6 mod 4

Answer : 2
Finding Arithmetic Modulo
(negative #’s)

- 32 mod 5
Finding Arithmetic Modulo
(negative #’s)

- 32 mod 5

Answer: 3
Congruence of Arithmetic
Modulo

K mod m  r
iff (if and only if) the difference of K – r or r –
k is
divisible by m
Example : Verify the congruence of
the A. Modulo

18 mod 2  2
Answer :

True, it is congruence
Example : Verify the congruence of
the A. Modulo

400 mod 7  25
Answer :

False, It is not congruence


Example : Verify the congruence of
the A. Modulo

35 mod 4  3
Answer :

True, it is congruence
APPLICATION OF MODULO
CHECKING OF CHECK DIGITS
CHECK DIGIT- is a single digit that is added
to a bar code and used for verifying
accuracy.
It a form of redundancy check used for
error detection on identification numbers,
such as bank account numbers, which are
used in an application where they will at
least sometimes be input manually.
Samples of Check digits
Universal Product Code (UPC) – it composed
of 12 digits
Samples of Check digits
Samples of Check digits
International Standard Book Code (ISBN)
Sample of Check Digits
Credit Card No/ Acct no. – it is composed of
16 digits code
Formulas for Checking Check
digits
Formulas for Checking Check
Digits
Examples:
Determine the check digit for a new
product given that the first 11 digits are 8-
21345-67132- _____?
Examples:
Determine the check digit for a new
product given that the first 11 digits are 8-
21345-67132- _____?
Examples:
Determine the check digit for a new
product given that the first 11 digits are 8-
21345-67132- _____?

Answer : 4
Examples:
.Determine the check digit of book with an
ISBN-10 first 9 digits of 0-17-316444- ?
Examples:
.Determine the check digit of book with an
ISBN-10 first 9 digits of 0-17-316444- ?
Examples:
.Determine the check digit of book with an
ISBN-10 first 9 digits of 0-17-316444- ?

Answer: 7
Examples:
Verify if the given Credit Card identification
number 4301-1234-8888-3751 is valid.
Examples:
Verify if the given Credit Card identification
number 4301-1234-8888-3751 is valid.
D16 = 10 –
(8+3+0+1+2+2+6+4+1+6+8+1+6+8+6+
7+1+0)mod 10
D16 = 10 – 70 mod10 = 10 – 0 = 10 = 1+0 = 1
Examples:
Verify if the given Credit Card identification
number 4301-1234-8888-3751 is valid.
d1= 10 – (8+3+0+1+2+2+6+4+1+6+8+1+6+8+6+7+1+0)
D16
mod 10
D16 = 10 – 70 mod 10 = 10 -0 = 10 = 1+0 = 1

ANSWER: it is valid since based on the


computation the correct check digit is 1
More samples:
Verify if the following numbers are correct
1. UPC 3-12024-82931-5
More samples:
Verify if the following numbers are correct
1. CREDIT CARD 3219-1245-7542-9273
Application of the modulo in
calculating time
What is the day of week if today is March
8(Monday) and moving 300 days from
now?
Application of the modulo in
calculating time
What is the day of the week 250 days ago
from today?
Application of the modulo in
calculating time
What is the time 645 hours from
11o’clock ?
Application of the modulo in
calculating time
At what day of the week will April 30, 2024
fall?
ASSIGNMENT:
I. Verify if the following congruence are true.
1.) 4 19 (mod 3)

2.) 3 20 (mod 3)

3.) 9 33 (mod 4)

4.) 5 20 (mod 4)

5.) 11 30 (mod 5)


ASSIGNMENT:
II. Solve the least residue of the following.
1.) 50 (mod 3)

2.) 50 (mod 4)

3.) 55 (mod 7)

4.) 34 (mod 4)

5.) 75 (mod 5)
Assignment
6. 45 – 45 mod 7

7. (36-79) mod 14

8. (16 mod 5) + 4
Assignment:
Determine the check digit of the following UPC.

1.) 3-12345-67890-

2.) 4-15902-74212-
Assignment:
B. Determine the check digit of the following
Credit Card.
1.) 3212-3921-8282-128

2.) 3219-1245-7542-927
C. Determine the check digit of the following
ISBN.
1.) 123-456-789-333-

2.) 432-748-909-001-

You might also like