UPC (Universal Product Code) was the original barcode symbology widely used in America for items in stores, nowadays replaced by EAN.UCC-12, that encodes twelve digits as follows:
where S and E are the bit pattern 101, M is the bit pattern 01010, and L and R are digits, seven bits long each. This is a total of 95 bits.
The first L digit is 0 for ordinary items, 3 for pharmaceuticals, 2 for random-weight items, and 5 for coupons. The rest of L is the manufacturer code. The first five R digits are the product code assigned by the manufacturer. The last digit is a redundancy check.
Each digit has four forms, of which two are used in UPC-A and three in EAN. For 6, the forms are:
0000101 (L in EAN)
The codes for the ten digits are:
Company prefixes are assigned by EAN-UCC.