Codabar
From Wikipedia, the free encyclopedia
Codabar is a barcode symbology developed in 1972 by Pitney Bowes Corp. ([1]). It is also known as Codeabar, Ames Code, NW-7, Monarch, Code 2 of 7, Rationalized Codabar or USD-4.
Although Codabar has not been registered for US federal trademark status, its hyphenated variant Code-a-bar is a registered trademark ([2]).
It was designed to be accurately read even when printed on dot-matrix printers for multi-part forms such as FedEx airbills and blood bank forms, where variants are still in use as of 2007. Although newer symbologies hold more information in a smaller space, Codabar has a large installed base in libraries.
Unlike the other width-modulated codes, Codabar does not use common wide and narrow element widths to encode the logic 1s and 0s in the characters. Instead, there are a total of 18 different sets of bar and space widths specified by the symbology. This structure was designed to account for the printing errors characteristic of certain early printers, leading to printed symbols which could be easily read. Note that it also provided a constant character length regardless of whether two or three wide elements were used in the character.
[edit] Checksum
Because Codabar is self-checking, the standard does not define a checksum.
The variants of Codabar in commercial and public use will sometimes define a proprietary checksum.
For instance in an all-numeric string, the checksum algorithm might double the odd digits, take modulo 9, sum the results with the even digits, and represent the total in modulo 10. ([3])
[edit] Encoding
The body of a Codabar string can encode the numerals 0 through 9, the symbols dollar, dash, plus sign, colon, slash, and dot.
The alphabet characters A, B, C, D, E, N, and T, and the asterisk are used in matching pairs to mark the beginning and end of the barcode. They do not appear in the body of a Codabar string.
The 25 characters are assigned to only 18 codes comprised of 7 binary identifiers (4 bars and 3 spaces) where 0 is a short element and 1 is a long element.
Char. | Pattern | Bars | Spaces |
---|---|---|---|
0 | lll l | 0001 | 001 |
1 | lll l | 0010 | 001 |
2 | ll ll | 0001 | 010 |
3 | l lll | 1000 | 100 |
4 | lll l | 0100 | 001 |
5 | lll l | 1000 | 001 |
6 | l lll | 0001 | 100 |
7 | l lll | 0010 | 100 |
8 | l lll | 0100 | 100 |
9 | ll ll | 1000 | 010 |
- | ll ll | 0010 | 010 |
$ | ll ll | 0100 | 010 |
: | ll l l | 1011 | 000 |
/ | l l l l | 1101 | 000 |
. | l l ll | 1110 | 000 |
+ | ll l l | 0111 | 000 |
A | ll l l | 0100 | 011 |
B | l l ll | 0001 | 110 |
C | ll l l | 0001 | 011 |
D | ll l l | 0010 | 011 |
T | ll l l | 0100 | 011 |
N | l l ll | 0001 | 110 |
* | ll l l | 0001 | 011 |
E | ll l l | 0010 | 011 |