0% found this document useful (0 votes)
496 views3 pages

Validating Universal Product Codes

The document discusses Universal Product Code (UPC) validation through checksum calculation. It provides examples of both valid and invalid UPC codes. The checksum is calculated by multiplying each UPC digit by its place value and summing the results. If the total is divisible by 10, the code is valid. For the sample product code 5-02003-91562, the checksum calculation determines the check digit should be 1, making the full valid UPC code 5-02003-91562-1.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
496 views3 pages

Validating Universal Product Codes

The document discusses Universal Product Code (UPC) validation through checksum calculation. It provides examples of both valid and invalid UPC codes. The checksum is calculated by multiplying each UPC digit by its place value and summing the results. If the total is divisible by 10, the code is valid. For the sample product code 5-02003-91562, the checksum calculation determines the check digit should be 1, making the full valid UPC code 5-02003-91562-1.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

CAN DO

PROB#1: Which of the following is a valid and correct UPC? Show why the other numbers are
invalid.

a. 0-51000- 02562-4

0 5 1 0 0 0 0 2 5 6 2 4

3 1 3 1 3 1 3 1 3 1 3 1

0 5 3 0 0 0 0 2 15 6 6 4

41

From the congruence equation: 41 = 0 modulo 10


Since the sum (41) is not divisible by 10 that is 41/10 = 4.1
Therefore, an error is detected and the given UPC is incorrect and invalid.

b. 0-51000-02526-4

0 5 1 0 0 0 0 2 5 2 6 4

3 1 3 1 3 1 3 1 3 1 3 1

0 5 3 0 0 0 0 2 15 2 18 4

49

From the congruence equation: 49 = 0 modulo 10


Since the sum (49) is not divisible by 10 that is 49/10 = 4.9
Therefore, an error is detected and the given UPC is incorrect and invalid.

c. 0-51000-02526-5

0 5 1 0 0 0 0 2 5 2 6 5

3 1 3 1 3 1 3 1 3 1 3 1

0 5 3 0 0 0 0 2 15 2 18 5

50

From the congruence equation: 50 = 0 modulo 10


Since the sum (50) is divisible by 10 that is 50/10 = 5
Therefore, the given UPC is correct and valid.

d. 7-16829-13104-6

7 1 6 8 2 9 1 3 1 0 4 6

3 1 3 1 3 1 3 1 3 1 3 1
21 1 18 8 6 9 3 3 3 0 12 6

90

From the congruence equation: 90 = 0 modulo 10


Since the sum (90) is divisible by 10 that is 90/10 = 9
Therefore, the given UPC is correct and valid.

e. 3-23900-00127-5

3 2 3 9 0 0 0 0 1 2 7 5

3 1 3 1 3 1 3 1 3 1 3 1

9 2 9 9 0 0 0 0 3 2 21 5

60

From the congruence equation: 60 = 0 modulo 10


Since the sum (60) is divisible by 10 that is 60/10 = 6
Therefore, the given UPC is correct and valid.

f. 0-71649-36650-2

0 7 1 6 4 9 3 6 6 5 0 2

3 1 3 1 3 1 3 1 3 1 3 1

0 7 3 6 12 9 9 6 18 5 0 2

77

From the congruence equation: 77 = 0 modulo 10


Since the sum (77) is not divisible by 10 that is 77/10 = 7.7
Therefore, an error is detected and the given UPC is incorrect and invalid.

PROB#2: Consider the product identification number 5-02003-91562. Generate the check digit.

5 0 2 0 0 3 9 1 5 6 2 x

3 1 3 1 3 1 3 1 3 1 3 1

15 0 6 0 0 3 27 1 15 6 6 1x

79 + 1x

From the congruence equation: 79 + 1x = 0 modulo 10


Using Trial and error: try a value of x where the sum is divisible by 10.
⮚ Say x = 1: 79 + 1(1) = 0 modulo 10
80 = 0 modulo 10
Since the sum (80) is divisible by 10 that is 80/10 = 8
Thus, the check digit is 1.

UPC with check digit = 5-02003-91562-1

You might also like