Understanding the construction of the U.P.C. symbol starts with an understanding of the character sets used by the U.P.C. In order to encode the ten decimal digits in bars, a character structure consisting of seven modules of equal width is used for each character. Each charter must start with a white space and end with a black bar. Also each character must have two white spaces and two black spaces or bars. Figure #1 depicts a typical character.
There are twenty bar space patterns that satisfy the rules stated. Using the notation that a “0” represents a white module and a “1” represents black module, the twenty patterns are listed below along with the arbitrary digit assignments used in the U.P.C. code.
|
Odd
Parity
Patterns
|
Decimal
Value
|
Even
Parity
Patterns
|
|
0001101
|
0
|
0100111
|
|
0011001
|
1
|
0110011
|
|
0010011
|
2
|
0011011
|
|
0111101
|
3
|
0100001
|
|
0100011
|
4
|
0011101
|
|
0110001
|
5
|
0111001
|
|
0101111
|
6
|
0000101
|
|
0111011
|
7
|
0010001
|
|
0110111
|
8
|
0001001
|
|
0001011
|
9
|
0010111
|
|
0101
|
Center
pattern
|
|
|
Margin101
|
Guard
bar
pattern
|
|
|
010101
|
Version
E
end pattern
|
|
