Check Codes and Check Digits
Check Codes and Check Digits
Check Codes and Check Digits
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.
d12= 10 – (3d1 +d2 + 3d3 + d4 +3d5 +d6 + 3d7 + d8 + 3d9 + d10 + 3d11)
(mod10)
d10 = 11- (10d1 + 9d2 + 8d3 + 7d4 + 6d5 + 5d6 + 4d7 +3d8 +2d9 )(mod 11)
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)
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 Y O U H AV E Q U E S T I O N S ?