Next: What if things go
Up: Coding in the non-Electrical
Previous: The USPS Bar Code
- The USPS bar code is defined by the following:
- Bits are represented as long (``1'') and short (``0'') vertical dashes.
- The code aims to represent the digits 0, 1,
,
9.
- Each digit is represented by 5 bits (dashes).
- Each code word of 5 bits contains exactly 2 long dashes.
digit |
binay code |
bar code |
1 |
00011 |
| | | | | |
2 |
00101 |
| | | | | |
3 |
00110 |
| | | | | |
4 |
01001 |
| | | | | |
5 |
01010 |
| | | | | |
6 |
01100 |
| | | | | |
7 |
10001 |
| | | | | |
8 |
10010 |
| | | | | |
9 |
10100 |
| | | | | |
0 |
11000 |
| | | | | |
- A long dash is added on either side of the bar code.
- An additional digit is appended. This digit is computed by:
- adding all digits in the ZIP code,
- determining the difference to next largest multiple of 10.
- Example: The bar code below encodes: 22030 4444 00 7.
- The last digit is 7, because 2+2+0+3+0+4+4+4+4+0+0+7=30.
Figure 2.18:
USPS bar code for 22030-4444-00. The check digit is 7.
|
Next: What if things go
Up: Coding in the non-Electrical
Previous: The USPS Bar Code
Prof. Bernd-Peter Paris
1998-12-14