| Codabar was developed was developed in 1972 by Pitney Bowes, Inc. It is a discrete, self-checking symbology that may encode 16 different characters, plus an additional 4 start/stop characters. This symbology is used by U.S. blood banks, photo labs, and on FedEx airbills.
A typical Codabar barcode is:
|Since Codabar is self-checking, there is no established checksum digit. Should a specific application wish to implement a checksum digit for additional security, it is up to the implementer to define and handle same. However, keep in mind that other applications that read your barcode will interpret your checksum digit as part of the message itself.|
|ENCODING THE SYMBOL|
|In the following text, we will discuss the encoding of the barcode by considering that the number "1" represents a "dark" or "bar" section of the barcode whereas a "0" represents a "light" or "space" section of the barcode. Thus the numbers 1101 represents a double-wide bar (11), followed by a single-wide space (0), followed by a single-wide bar (1). This would be printed in the barcode as:|
|STRUCTURE OF A CODABAR BARCODE|
|A Code 11 Barcode has the following structure:
1. One of four possible start characters (A, B, C, or D), encoded from the table below.
2. A narrow, inter-character space.
3. The data of the message, encoded from the table below, with a narrow inter-character space between each character.
4. One of four possible stop characters (A, B, C, or D), encoded from the table below.
|CODABAR ENCODING TABLE|
This table indicates how to encode each digit of a Codabar barcode. Note that the "Width Encoding" column is expressed as "0" (narrow bar or space) or "1" (wide bar or space) while the "Barcode Encoding" column represents how the barcode will actually be encoded as described above in "Encoding the Symbol."
For example, the character 0 is defined as "0000011" by Codabar. This means a "Narrow bar, narrow space, narrow bar, narrow space, narrow bar, wide space, wide bar". We convert this to 101010011 in the "Barcode Encoding" column which is consistent with the method we've used to express barcode formats in other documents on this site.
| NOTE 1: Since the first and last element of every character is always a bar, a narrow space is appended at the end of each character to separate the last bar of a character from the first bar of the character that follows.
NOTE 2: Codabar is interesting in that there are always 4 bars and 3 spaces of varying sizes, but the total size (width) of a character varies depending on the character being encoded..
| We will now code the example barcode from above, A40156B. Of course, the "A" refers to the 'A' Start/Stop character and the 'B' refers to the 'B' Start/Stop character.
1. The 'A' START/STOP character: 1011001001.
2. An intercharacter space encoded as 0.
3. The digit "4": enocded as 101101001.
4. An intercharacter space encoded as 0.
5. The digit "0": enocded as 101010011.
6. An intercharacter space encoded as 0.
7. The digit "1": enocded as 101011001.
8. An intercharacter space encoded as 0.
9. The digit "5": enocded as 101101001.
10. An intercharacter space encoded as 0.
11. The digit "6": enocded as 100101011.
12. An intercharacter space encoded as 0.
13. The 'B' START/STOP: enocded as 1010010011.
This is shown in the following graphical representation where the barcode has been sectioned-off into areas that reflect each of the 13 components just mentioned. However, the inter-character spacing are not numbered, only the actual characters.
|STRUCTURE OF FEDEX AIRBILL BARCODES|
|FedEx airbills have barcodes that are encoded using Codabar. Presumably to insure complete accuracy, FedEx has chosen to implement a checksum digit even though it is technically not necessary with Codabar.
A FedEx airbill number has the format of XXXX-XXXX-XXXY with an additional 4-digit "Format ID" (ZZZZ).
The X's represent digits of the airbill number. They are presumably sequential and probably unique. The Form ID (ZZZZ) is included in the barcode but isn't technically part of the airbill number--you can perform airbill tracking with just the first 12 digits. The "Y" character seems to be a checksum value.
The barcode itself consists of a 'C' Start Code, followed by the 16 digits of data XXXXXXXXXXXYZZZZ, followed by a final 'D' Stop Code.
At this point, it hasn't been determined the formula used to calculate the checksum digit. The checksum digit (Y) forms part of the airbill number and is embedded in the middle of the barcode data, but may or may not include the "ZZZZ" Form ID data in the checksum calculation.
NOTE: If you have information regarding the process that FedEx uses to calculate the check digit, please let us know so we can add this information to this page.