Microsoft Store
 

Universal Product Code


 

The UPC (Universal Product Code) was the original barcode widely used in the United States and Canada for items in stores. The first item to be placed under a UPC scanner in a retail store was a 10-pack of Wrigley's Juicy Fruit chewing gum at Marsh's supermarket in Troy, Ohio, on June 24, 1974.

Related Topics:
Barcode - United States - Canada - Store - Retail - Wrigley - Juicy Fruit - Chewing gum - Troy, Ohio - June 24 - 1974

~ ~ ~ ~ ~ ~ ~ ~ ~ ~

The UPC (now officially EAN.UCC-12) encodes twelve digits as SLLLLLLMRRRRRRE, where S (start) and E (end) are the bit pattern 101, M (middle) is the bit pattern 01010 (called guard bars), and each L (left) and R (right) are digits, seven bits long each. This is a total of 95 bits. The bit pattern for each numeral is designed to be as little like the others as possible, and to have no more than four 1s or 0s in order. Both are for reliability in scanning.

Related Topics:
Encode - Digit - Bit - Reliability

~ ~ ~ ~ ~ ~ ~ ~ ~ ~

The UPC is only numerals, with no letters or other characters. The first L digit is 0 for ordinary items, 3 for pharmaceuticals, 2 for random-weight items, and 5 for coupons (though stores often ignore this and use 000000 or 999999). The rest of L is the manufacturer code. The first five R digits are the product code assigned by the manufacturer. The last digit R is a check digit, so that errors in scanning or manual entry can be detected. In the UPC-A system, the check digit is calculated as follows:

Related Topics:
Numeral - Letter - Character - Weight - Coupon - Manufacturer - Check digit

~ ~ ~ ~ ~ ~ ~ ~ ~ ~

  • Add the odd-numbered digits (first, third, fifth, etc.) together and multiply by three.
  • Add the even-numbered digits (second, fourth, sixth, etc.) to the result.
  • Subtract the result from the next-higher multiple of ten. The answer is the check digit.
  • For instance, a UPC-A barcode "03600029145X" where X is the check digit, X can be calculated by adding the odd-numbered digits (0+6+0+2+1+5 = 14), multiplying by three (14 × 3 = 42), adding the even-numbered digits (42+3+0+0+9+4 = 58) and subtracting from the next-higher multiple of ten (60 - 58 = 2). The check digit is thus 2.

    ~ ~ ~ ~ ~ ~ ~ ~ ~ ~

    Pharmaceuticals in the U.S. have the remainder of the UPC as their National Drug Control (NDC) number. Random-weight items, such as meats and fresh fruits and vegetables, are assigned a UPC by the store if they are packaged there. In this case, the LLLLL is the item number, and the _RRRR is either the weight or the price, with the first R determining which. Likewise, coupons are supposed to have the coupon code in LLLLL, the amount to be taken off in _RRRR, and whether that amount is a percent or a literal amount encoded in the first R.

    Related Topics:
    U.S. - National Drug Control - Meat - Fruit - Vegetable - Percent

    ~ ~ ~ ~ ~ ~ ~ ~ ~ ~