The universal product code (UPC) is a 12-digit number and associated machine-readable bar code used to identify products being purchased in grocery stores. UPCs encode an individual product, but not its price (this part is done by a store's computer after reading the product identifier). The UPC is maintained by the Uniform Code Council of Dayton, Ohio. The first and last digits are separated from the others and written in a smaller font size.
The first six digits are a manufacturer identifier, and the next five digits identify a specific product. The last digit is a check digit obtained from
(1)
|
where (mod 10) indicates taking the remainder after dividing by 10. For example, the UPC for Tropicana Pure Premium orange juice is
(2)
|
where the check digit is
(3)
| |||
(4)
| |||
(5)
| |||
(6)
|
as expected.