2-DIGIT PARITY PATTERN & ENCODING
If the supplemental bar code encodes 2 digits of data, the parity of the characters is
calculated by taking the value of the 2-digit supplemental bar code, dividing by 4, then
using the remainder as a lookup value in the following table:
| REMAINDER |
CHARACTER 1 PARITY |
CHARACTER 2 PARITY |
| 0 |
Odd |
Odd |
| 1 |
Odd |
Even |
| 2 |
Even |
Odd |
| 3 |
Even |
Even |
That is to say, if the 2-digit value is "34", the value 34 is divided by 4. This
results in the value 8 and a remainder of 2. Since the remainder is 2, the first character
is encoded with even parity and the second character is encoded with odd parity. If, when
the bar code is scanned, the parity doesn't match the parity that is expected for the value
scanned, it is assumed a scanning error ocurred.
Thus, encoding the value "34" as a 2-digit UPC Supplemental bar code would be as
follows:
- Left-guard bars, encoded as 1011.
- 1st Digit [3] encoded as even parity, 0100001.
- Inter-character separator, encoded as 01.
- 2nd Digit [4] encoded as odd parity, 0100011.
This results in the following bar code, with each "section" from the four steps just
listed indicated in alternating colors so that each portion may be easily discerned:

5-DIGIT PARITY PATTERN & ENCODING
If the supplemental bar code encodes 5 digits of data, the checksum method is more complex
and somewhat similar to that used in EAN-13.
First, a checksum value must be calculated for the bar code.
- Consider the right-most digit of the message to be in an "odd" position, and
assign odd/even to each character moving from right to left.
- Sum the digits in all odd positions, and multiply the result by 3.
- Sum the digits in all even positions, and multiply the result by 9.
- Sum the totals calculated in steps 2 and 3.
- The check digit is the digit in the units position of the value calculated
in step 5 (i.e., if the result in step 4 was 37, the check digit is 7).
The check digit calculated above is then used to look up the parity pattern in the
following table:
CHECK DIGIT |
PARITY PATTERN FOR EACH CHARACTER |
| 1 |
2 |
3 |
4 |
5 |
| 0 |
Even |
Even |
Odd |
Odd |
Odd |
| 1 |
Even |
Odd |
Even |
Odd |
Odd |
| 2 |
Even |
Odd |
Odd |
Even |
Odd |
| 3 |
Even |
Odd |
Odd |
Odd |
Even |
| 4 |
Odd |
Even |
Even |
Odd |
Odd |
| 5 |
Odd |
Odd |
Even |
Even |
Odd |
| 6 |
Odd |
Odd |
Odd |
Even |
Even |
| 7 |
Odd |
Even |
Odd |
Even |
Odd |
| 8 |
Odd |
Even |
Odd |
Odd |
Even |
| 9 |
Odd |
Odd |
Even |
Odd |
Even |
Using the value "51234" as an example, we first must calculate the check digit:
| Barcode |
5 |
1 |
2 |
3 |
4 |
| Position |
O |
E |
O |
E |
O |
| Weighting |
3 |
9 |
3 |
9 |
3 |
| Calculation |
5 * 3 |
1 * 9 |
2 * 3 |
3 * 9 |
4 * 3 |
| Weighted Sum |
15 |
9 |
6 |
27 |
12 |
Adding the above weighted sums 15 + 9 + 6 + 27 + 12 = 69. Thus the checksum digit is 9
and thus, consulting the parity table above, the five characters must be coded using the
parity pattern "Odd/Odd/Even/Odd/Even".
Thus, encoding the value "51234" as a 5-digit UPC Supplemental bar code would be as
follows:
- Left-guard bars, encoded as 1011.
- 1st Digit [5] encoded as odd parity, 0110001.
- Inter-character separator, encoded as 01.
- 2nd Digit [1] encoded as odd parity, 0011001.
- Inter-character separator, encoded as 01.
- 3rd Digit [2] encoded as even parity, 0011011.
- Inter-character separator, encoded as 01.
- 4th Digit [3] encoded as odd parity, 0111101.
- Inter-character separator, encoded as 01.
- 5th Digit [4] encoded as even parity, 0011101.
This results in the following bar code, with each "section" from the four steps just listed
indicated in alternating colors so that each portion may be easily discerned:

© Copyright 2006 BarCodeIsland.com, Inc. All Rights Reserved.
Information provided "as-is" without warranty. Please see details.
Contact us for usage and copy permission.