The Universal Product Code (UPC) was created through the supermarket business to identify its goods.
The UPC comes in three versions:
Version A: A 12-digit number is encoded.
Version E: Condenses 12-digit codes into 6-digit numbers via a method known as Zero Suppression, enabling labels to fit inside compact packaging.
Version D is restricted to certain applications like credit cards, check guarantee cards, and ATM cards and uses variable length codes.
Table of Contents
UPC is a Continuous code, meaning there are no intercharacter gaps, in contrast to Code 39. There is a 12-digit number on every label. The start and stop guard patterns are the two lengthy bars seen in the figure on the label’s outermost left and right sides. The start and stop guard pattern frames the 12-digit UPC number with a 101 (bar-space-bar) sequence.

The center guard pattern, which consists of two long bars in the center of the label, divides the label’s left and right halves. There is a space between the two long bars and room on either side of the bars (01010). The initial six UPC digits are encoded on the left side of the label using left-hand characters, while the final six UPC digits are encoded on the right side using right-hand characters.
Every character has a pair of binary codes. A character uses left-hand code if it appears in the first six digits of the code; otherwise, it uses right-hand code. The left-hand code’s complement is known as the right-hand code.

Because it indicates how the UPC symbol is used, the first left-hand digit in the UPC is known as the UPC number system character. A check character, or sixth right-hand character, is employed to identify errors. The corresponding seven-bit places for the numbers 0 through 9 are encoded as a mixture of two variable-width bars and two variable-width spaces.
In the picture above, the variable-width code for the UPC letter 4 is also displayed, both in its initial and final digits. Logic 1 is represented by a single bar (one-bit position), and logic 0 by a single space.
Applications of Universal Product Code:
- Inventory Management and Tracking: UPCs facilitate accurate real-time inventory tracking, enabling businesses to optimize stock levels, reduce overstocks, and prevent stockouts.
- Efficient Point-of-Sale (POS) Transactions: UPC scanning at POS terminals streamlines checkout processes, minimizing errors and enhancing customer experience.
- Supply Chain Visibility and Logistics: UPCs enable end-to-end product traceability throughout the supply chain, improving logistics efficiency, reducing loss, and ensuring product authenticity.
- Data-Driven Marketing and Sales Analysis: UPC data analysis provides valuable insights into consumer behavior, sales trends, and product performance, informing marketing strategies and sales forecasts.
- E-commerce Product Identification and Search: UPCs serve as unique product identifiers in e-commerce platforms, facilitating product search, comparison, and accurate product information display.
BAR CODE:
Bar codes are those ubiquitous stickers with black and white stripes that seem to be on every consumer product in every store these days. A bar code consists of vertical white bars (sometimes recognized as gaps) between vertical black bars. The binary 1s and 0s that designate an item are represented by the widths of the bars and gaps and their reflecting qualities. Bar codes may also include data for cost, shipping and receiving, production counting, document and order processing, automated invoicing, inventory management, security access, and many more uses.

The accompanying figure shows how fields of a common bar code are configured. This field consists of a distinct set of bars and spaces to denote where the data field begins. The data characters match the format or symbol of the bar code that is being used. Using an optical scanner, the serial data recorded in the data character field is removed from the card. The scanner replicates the logic conditions that match the variation in reflectivity between the printed bars and the underlying white areas.
Move your cursor smoothly and uniformly across the printed bar to read the information. The photo detector within the scar receives the reflected light and translates it into electrical signals, thereby enabling the decoding of the information.
The modern industry uses several common barcode formats. The type of data being saved, how it is being stored, system performance, and the most widely used format in business and industry, are all considered when choosing a format. Bar codes are often categorized as 2D, discrete, and continuous.
Discrete code: Characters in a discrete bar code have gaps or spaces between them. As a result, each character in the bar code is distinct from the others. One illustration of a discrete bar code is Code 39.
Continuous code: Characters in a constant bar code do not have spaces between them. One example of a continuous bar code is the Universal Product Code (UPC).
2D code: – Unlike traditional linear bar codes, which only store data along one axis, 2D (two-dimensional) bar codes store data in two dimensions. Typically containing one kilobyte or more per data symbol, a two-dimensional bar code offers a greater storage capacity than a one-dimensional bar code.
Applications of Bar Code:
- Inventory Management and Tracking: Barcodes enable efficient, accurate tracking of inventory levels, location, and movement throughout the supply chain.
- Point-of-Sale (POS) Transactions: Barcode scanning at POS systems speeds up checkout, reduces errors, and improves the overall customer experience.
- Asset Tracking and Management: Barcodes help organizations track and manage physical assets like equipment, tools, and IT hardware, optimizing utilization and maintenance.
- Logistics and Supply Chain Optimization: Barcodes streamline shipping, receiving, and warehouse processes, improving visibility and efficiency across the supply chain.
- Data Collection and Analysis: Barcode data can be easily collected and analyzed to gain insights into sales trends, customer behavior, and operational efficiency.
CODE-39:
An ASCII-like alphanumeric code is used in Code 39. 36 distinct codes represent the 10 numerals and the 26 capital letters. Asterisk(*) is the unique start/stop character, and there are 7 more codes used for special characters. Labels, like name badges, are perfect for using code 39 bar codes. Because it was one of the earliest bar codes used for postal routing, it is frequently referred to as USS Code 39.
FORMAT OF CODE-39:
There are 9 vertical elements in a character: five bars and four spaces. Width modulation is used to modify the width of the bar or space based on a logic condition. A narrow element denotes logic 0, and a wide element (bar or space) denotes logic 1.
Every character has a black bar at the start and finish, with white bars alternating in the middle.
Characters in this code are discrete; gaps between them are typically one character wide.
In the code 39 character, three elements need to be logic 1s and the remaining elements need to be logic 0s. In Two logic one must be bars, and one must be a space, out of three.
Related FAQs
1. What is the difference between a UPC and a barcode?
- A UPC is a specific type of barcode, primarily used for retail products in North America. Barcodes are a broader category of machine-readable codes that can represent various data categories.
2. How do UPCs and barcodes improve data communication?
- UPCs and barcodes enable fast, accurate, and automatic data capture, reducing errors and streamlining communication in the middle of the systems (e.g., inventory management, POS).
3. What are the main applications of UPCs and barcodes?
- UPCs and barcodes are used in inventory management, retail checkout (POS), logistics, asset tracking, healthcare, and more.
4. Are UPCs and barcodes secure?
- Although UPCs and barcodes lack inherent security features, their effectiveness in safeguarding data integrity can be bolstered with complementary security measures such as encryption and authentication.
5. What is the future of UPCs and barcodes?
- UPCs and barcodes are evolving with new technologies like 2D barcodes (e.g., QR codes), RFID, and NFC, offering increased data capacity, functionality, and security.