0% found this document useful (0 votes)
139 views13 pages

UPC Assignment 1 Sample Problems Problems

This document contains examples of calculating the check digit for Universal Product Code (UPC) barcodes. It shows working through the check digit algorithm for 3 sample UPC codes where the check digit is a missing value. The algorithm involves: 1) Summing the digits in odd and even positions separately, 2) Multiplying the odd sum by 3 and adding it to the even sum, 3) Taking the result modulo 10, and 4) Subtracting this from 10 to find the check digit.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
139 views13 pages

UPC Assignment 1 Sample Problems Problems

This document contains examples of calculating the check digit for Universal Product Code (UPC) barcodes. It shows working through the check digit algorithm for 3 sample UPC codes where the check digit is a missing value. The algorithm involves: 1) Summing the digits in odd and even positions separately, 2) Multiplying the odd sum by 3 and adding it to the even sum, 3) Taking the result modulo 10, and 4) Subtracting this from 10 to find the check digit.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 13

UPC Assignment 1 Sample

problems

Consider the following UPC-A


code. Is it a valid UPC?
0 11110 86852-7

Consider the following UPC-A


code. Is it a valid UPC?
0 11110 86852-7
The answer is Yes

How can we get ?


1.
2.
3.
4.
5.

odd-digit sum: 0+1+1+8+8+2=20


even-digit sum: 1+1+0+6+5=13
odd*3+even = 20*3+13=73
mod 10: 73 mod 10 = 3
subtract from 10=10-3=7

Consider the following UPC-A


code. What is the missing digit
(shown as a question mark)?
0 21130 27566-?

Consider the following UPC-A


code. What is the missing digit
(shown as a question mark)?
0 21130 27566-?
The answer is 3

How can we get ?


1.
2.
3.
4.
5.

odd-digit sum: 0+1+3+2+5+6=17


even-digit sum: 2+1+0+7+6=16
odd*3+even = 17*3+16=67
mod 10: 67 mod 10 = 7
subtract from10=10-7=3

Consider the following UPC-A


code. What is the missing digit
(shown as a question mark)?
0 70?30 50606 0

Consider the following UPC-A


code. What is the missing digit
(shown as a question mark)?
0 70?30 50606 0
The answer is 3

How can we get ?


1.
2.
3.
4.
5.

odd-digit sum: 0+0+3+5+6+6=20


even-digit sum: 7+x+0+0+0=7+x
odd*3+even = 20*3+7+x=67+x
mod 10: (67+x)mod 10
checking number is 0, so
(67+x)mod10=0
=>x=3

Consider the following UPC-A


code. What is the missing digit
(shown as a question mark)?
0 787?7 50758 6

Consider the following UPC-A


code. What is the missing digit
(shown as a question mark)?
0 787?7 50758 6
The answer is 8

How can we get ?


1. odd-digit sum:
0+8+x+5+7+8=28+x
2. even-digit sum: 7+7+7+0+5=26
3. odd*3+even = (28+x)*3+26=110+3x
4. subtract from 10:
10-(110+3x)mod10=6
=>(110+3x)mod10=4
=>x=8

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy