Universal Product Code (English: Universal Product Code, UPC) is a commodity bar code developed by the U.S. Uniform Code Council, which is mainly used in the United States and Canada. The European commodity code developed on its basis has developed into the most widely applicable universal bar code.
UPC was born on the basis of the ring code of IBM engineer Norman Woodland. In 1966, the National Association of Food Chains (NAFC) required the development of equipment to speed up the inspection and acceptance of goods. The National Cash Register (the predecessor of IBM) was developed in 1967 to replace Wood The new concentric circle code of the RAND bull’s eye code.
In the summer of 1970, at the request of the National Food Chain Association, Logicon developed the Universal Grocery Products Identification Code (UGPIC) for the food industry, based on the IBM George Laurel design plan  . Soon, the American supermarket Ad Hoc organization made UPC under the suggestion of Logicon. The U.S. Uniform Code Council established the UPC system in 1973 and realized the standardization of the code system. UPC was first tested in the grocery retail industry. On June 25, 1974, the Marsh supermarket in Ohio installed the first UPC scanner manufactured by NCR. Among the 27 products using UPC, the first one scanned by the cashier Sharon Buchanan was a pack of ten Wrigley chewing gums priced at 69 cents. Within ten years, barcode scanners accounted for half of American supermarkets. By 1989, it had reached 62% of all food stores in the United States.
In 1992, the Wellcome Supermarket in Hong Kong (called “Dinghao” in Taiwan) became the first supermarket in Hong Kong to use the UPC system, providing customers with faster and more convenient payment services. According to the 2004-2008 report, the number of branches in Wellcome Supermarket has increased as a result.
UPC can only be used to represent numbers from 0-9. Every 7 modules express a character, and each module has two states: empty (white) and bar (black).
UPC is divided into five versions: UPC-A, B, C, D, and E.
It is used for general-purpose products and is the most widely applicable UPC. There are a total of 113 modules, each of which is 0.33 mm long. The two left and right blanks each consist of 9 modules. UPC-A is a fixed-length code, which can only represent 12 digits. From left to right, it is the start code of 3 modules (101), the system code of 1 bit, the data code of 5 digits on the left, the middle code of 5 modules (01010), and the data of 5 digits on the right. Code, check code, termination code of 3 modules (101). Among them, the module length of the start code, intermediate code, and stop code must be longer than the data code.
Correspondence rule: The data code on the left and the data code on the right have different numerical correspondence rules. The data code on the left contains an odd number of modules, and the data code on the right contains an even number. The logic value corresponding to the black module is 1, and the white module is 0.
|Data code on the left||Data code on the right|
|Value||Logical value||Logical value|
It can be seen that the data code on the left is the inverse of the data code on the right.
The number 4 in the above figure is an example: first make sure it is the right data code, and then read its logical value: 1011100. Converted into bars and spaces are: thin black (1), thin white (0), thick black (111), thick white (00).
Check code: The check code is the last digit of all 12-digit data codes. If the first eleven digits of the data code are named N1-N11 from left to right, the check code is named C. The calculation method of the check code C is as follows:
CC=(N1+N3+N5+N7+N9+N11)×3 +(N2+N4+N6+N8+N10), and then take one digit;
C=10–CC (If the C value is 10, then take 0).
Take the barcode in the figure as an example, CC=(0+6+0+2+1+5)×3+(3+0+0+9+4)=58, C=2
Basically the same as UPC-A. Among them: B code is mainly used for medicine and health; C code is used for industrial departments, the second digit is the system code, and the penultimate digit is the check code; D code is used for warehouse wholesale, and the third digit is the check code.
Short code, the total length is 8 characters. The corresponding rule of numbers between A code and E code is related to the last check code. As follows:
Correspondence law: As for the correspondence between numbers and modules, it is also related to the last digit:
E means even code, O means odd code. The odd code of UPC-E is exactly the same as the odd code of UPC-A.
|odd code||Even code|
|Value||Logical value||Logical value|
Check code: When calculating the check code of UPC-E, first convert it to the corresponding UPC-A, and then calculate the check code according to the same pattern.