Chapter 2. Zero-Compressed UPC ⇒ UPC-E

Abstract

To allow the use of UPC barcodes on smaller packages where a full 12-digit barcode may not fit, a 'zero-compressed' version of UPC was developed called UPC-E.

This symbology differs from UPC-A in that it only uses a 6-digit code, does not use middle guard bars, and the end bit pattern (E) becomes 010101.

The way in which a 6-digit UPC-E relates to a 12-digit UPC-A is determined by the last (right-hand most) digit. With the manufacturer code represented by X's, and product code by N's then:

Last digitUPC-E equivalent isUPC-A equivalent is
0XXNNN00XX000-00NNN + check
1XXNNN10XX100-00NNN + check
2XXNNN20XX200-00NNN + check
3XXXNN30XXX00-000NN + check
4XXXXN40XXXX0-0000N + check
5XXXXX50XXXXX-00005 + check
6XXXXX60XXXXX-00006 + check
7XXXXX70XXXXX-00007 + check
8XXXXX80XXXXX-00008 + check
9XXXXX90XXXXX-00009 + check

For example a UPC-E barcode with the number 654321 would expand to the UPC-A 065100004327. You can convert UPC-E back to UPC-A using this web utility.

UPC-E check digits are calculated using this expanded string in the same way as used by UPC-A. The resulting check digit is not added to the barcode, however, but is encoded by manipulating the parity of the six digits which are present in the UPC-E - as shown in the following tables:

Check digitParity pattern
0EEEOOO
1EEOEOO
2EEOOEO
3EEOOOE
4EOEEOO
5EOOEEO
6EOOOEE
7EOEOEO
8EOEOOE
9EOOEOE

Digit to be encodedOdd parity patternEven parity pattern
03-2-1-11-1-2-3
12-2-2-11-2-2-2
22-1-2-22-2-1-2
31-4-1-11-1-4-1
41-1-3-22-3-1-1
51-2-3-11-3-2-1
61-1-1-44-1-1-1
71-3-1-22-1-3-1
81-2-1-33-1-2-1
93-1-1-22-1-1-3

Our example code 654321, therefore, would become 1-1-1 4-1-1-1 1-2-3-1 2-3-1-1 1-4-1-1 2-2-1-2 2-2-2-1 1-1-1-1-1-1. The resulting barcode would look roughly like this:

Figure 2.1. MSI exapmle 01234567 mode 10

MSI exapmle 01234567 mode 10