Download as pdf or txt
Download as pdf or txt
You are on page 1of 14

Our lady of Fatima university

COLLEGE OF ARTS AND SCIENCES


Math and Physics Department
Pampanga Campus
MATHEMATICS IN THE
MODERN WORLD
MATM111

CHECK CODES AND CHECK DIGIT

Engr. Ma. Aura Joy Bacani-Pamintuan


• Use coding schemes to encode and
decode different types of information for
identification, privacy and security
purposes.
• Use Modular Arithmetic to create a unique
codes.

Learning Outcomes
CHECK CODES AND CHECK DIGITS
There are several methods in producing identification
numbers which are unique.
In the following methods, modular arithmetic is used to
produce and verify identification numbers.

The examples are;


❖the Universal Product Code (UPC), United States Postal
Services (USPS), the Credit Card, and the International
Standard Book Number (ISBN).
❖Each examples uses their last digit as the check digits to
verify the identification number.
CHECK CODES AND CHECK DIGITS
Universal Product Code (UPC), is mainly used in products
sold in department stores and groceries. The UPC consists of
barcodes with 12 digits where the last one is the check digit.
CHECK CODES AND CHECK DIGITS
The International Standard Book Number (ISBN) is used
on books where usually found at the last page of the book.
ISBN can be ISBN-10 or ISBN-13 where they used 10 digits or 13
digits string of number respectively with the last digit as the
check digit.
CHECK CODES AND CHECK DIGITS
Lastly, the United States Postal Services (USPS) is consist of 11
digits, while the Credit Card uses 16 digits where both of them
uses their last digits as the check digits.
FORMULAS FOR THE CHECK DIGITS

i] UNIVERSAL PRODUCT CODE (UPC)


CHECK DIGIT : d12
d12= 10 – (3d1 +d2 + 3d3 + d4 +3d5 +d6 + 3d7 + d8 + 3d9 + d10
+ 3d11)(mod10)

Ii] INTERNATIONAL STANDARD BOOK NUMBER 9ISBN-10)


CHECK DIGIT : d10
d10 = 11- (10d1 + 9d2 + 8d3 + 7d4 + 6d5 + 5d6 + 4d7 +3d8
+2d9 )(mod 11)
FORMULAS FOR THE CHECK DIGITS

III] INTERNATIONAL STANDARD BOOK NUMBER (ISBN-13)


CHECK DIGIT : d13
d13= 10 – (d1 + 3d2 + d3 + 3d4 + d5 + 3d6 + d7 +3d8 + d9 + 3d10 + d11 +
3d12 )(mod10)

1V] UNITED STATES POSTAL SERVICES (UPS)


CHECK DIGIT : d11
d11 = 9 – (d1 +d2 + d3 + d4 + d5 + d6 + d7 + d8 + d9 + d10 )(mod 9)
FORMULAS FOR THE CHECK DIGITS

V] CREDIT CARD
CHECK DIGIT : d16
d16 = 10 – (2d1 +d2 +2d3 +d4 +2d5 +d6 +2d7 +d8 +2d9 +d10
+2d11 +d12 +2d13 +d14 +2d15 )(mod10)

NOTE : ADD ALL THE DIGITS, TREATING THE TWO-DIGIT NUMBERS AS TWO
SINGLE DIGITS.
CHECK CODES AND CHECK DIGITS

EXAMPLE 1
Determine the check digit for a new product if the first 11 digits are 8-21345-
67132.
SOLUTION:
Let d1 =8, d2 =2, d3 =1, d4 = 3, d5 =4, d6 = 5, d7 = 6, d8 =7, d9 = 1, d10 =3, d11 = 2
d12= 10 – (3d1 +d2 + 3d3 + d4 +3d5 +d6 + 3d7 + d8 + 3d9 + d10 + 3d11)(mod10)
CHECK CODES AND CHECK DIGITS

EXAMPLE 2
Determine the check digit for USPS if the first 10 digits are 12-2133-1321.
SOLUTION:
Let d1 =1, d2 =2, d3 =2, d4 = 1, d5 =3, d6 = 3, d7 = 1, d8 =3, d9 = 2, d10 =1
d11 = 9 – (d1 +d2 + d3 + d4 + d5 + d6 + d7 + d8 + d9 + d10 )(mod 9)
CHECK CODES AND CHECK DIGITS

EXAMPLE 3
Verify if the given Credit Card identification number 4301-1234-8888-3751 is valid.
Solution:
Let d1 = 4, d2 = 3, d3 = 0, d4 = 1, d5 = 1, d6 = 2, d7 = 3, d8 = 4, d9 = 8, d10 = 8, d11 = 8, d12 = 8, d13 =
3, d14 = 7,and d15 = 5.
d16 = 10 – (2d1 +d2 +2d3 +d4 +2d5 +d6 +2d7 +d8 +2d9 +d10 +2d11 +d12 +2d13 +d14
+2d15 )(mod10)
TRY THIS!!!!!!!

1. Determine the check digit of the UPC with digits given 3-12024-82931-___

2. Determine the check digit of the ISBN with digits given 2-7382-9121-___

3. Determine the check digit of the CREDIT CARD with digits given
8219-0290-1200-222___
THANK YOU!
D O YO U H AV E Q U E S T I O N S ?

You might also like