Codabar (USD-4, NW-7, and 2
of 7 code)
Barcode Basics >
Different Types of
Barcodes > Codabar
Codabar can encode the digits 0 through
9, six symbols (-:.$/+), and the start/stop characters A, B, C, D, E, *, N, or T. The
start/stop characters must be used in matching pairs and may not appear elsewhere in the
barcode. Codabar is used in libraries, blood banks, the overnight package delivery
industry, and a variety of other information processing applications.
There is no checksum defined as part of the Codabar standard, but some
industries (libraries, for example) have adopted their own checksum standards. Many
libraries use the following system which includes 13 digits plus a checksum; here is a
description of the method used by Ameritech Library Services (Provo, Utah).
- Digit 1 indicates the type of barcode: 2 = patron, 3 = item (book)
- Digits 2-5 identify the institution
- The next 8 digits (00010 586) identify the individual patron or item
- Digit 14 is the checksum
To calculate the checksum, start with the total set to zero and scan the 13 digits from
left to right:
- If the digit is in an even-numbered position (2, 4, 6...) add it to the total.
- If the digit is in an odd-numbered position (1, 3, 5...) multiply the digit by 2.
If the product is equal to or greater than 10, subtract 9 from the product.
Then add the product to the total.
- After all digits have been processed, divide the total by 10 and take the remainder.
- If the remainder = 0, that is the check digit. If the remainder is not zero, the
check digit is 10 minus the remainder.