YouHaveBO.com

Everything you never 
wanted to know about barcodes

Extrapolated Barcode Specs

Compiled by Nick Johnson.

Interleaved 2 of 5

Interleaved 2 of 5 is a simple 2 of 5 system with a few quirks. The barcode has to contain an even number of digits. This is because with a pair of digits, the first digit is encoded in bars and the second in spaces. There are 2 bar widths, with the wide bars/spaces being between 2 and 3 times the width of the narrow bars/spaces. You may have seen interleaved 2 of 5 barcodes on the tickets you won at the ball toss.

Interleaved 2 of 5 barcodes begin with the start pattern of a narrow bar, narrow space, narrow bar, narrow space. They end with a wide bar, narrow space, narrow bar.

Here is a table of wide & narrow combinations for each of the 10 digits:

0: nnwwn
1: wnnnw
2: nwnnw
3: wwnnn
4: nnwnw
5: wnwnn
6: nwwnn
7: nnnww
8: wnnwn
9: nwnwn

If you were to encode the digits "01", designating bars with capital letters and spaces with lowercase letters, the pattern would be:
NwNnWnWnNw
As you can see, the lowercase letters spell out wnnnw, the code for 1, and the uppercase letters spell out NNWWN, the code for 0.

Putting horizontal bars, called "bearer bars," on the top and bottom of the code helps to prevent scan errors that could occur if the path of the scanner went above or below the symbol.

interleaved 2 of 5 illustration

The optional checksum is calculated the same way UPC checksums are calculated. The odd numbered digits are multiplied by 3 and added to the even digits. The checksum is equal to the number that would have to be added to this sum to equal the next even multiple of 10.

Note that by "odd" and "even" I mean "positionally-odd" and "positionally-even"; the odd-numbered digits are in the first, third, fifth, and so-on positions, and the evens are in the second, fourth, sixth, etc.

Odd numbers of digits can be resolved by adding a 0 to the left of the number (123 becomes 0123).



Codabar
Codabar
Code 2 of 5
Code 2 of 5
Code 3 of 9
Code 3 of 9
Interleaved 2 of 5
Interleaved 2 of 5
Postnet
Postnet
UPC
UPC
Code 128
Code 128
Code 16k
Code 16k




Vi Powered Lynx Now! Powered by FreeBSD
Thu Jul 24 11:03:09 PDT 2008   barcode/i25.src
Updated: Thu Aug 18 2005 9:31.35   Viewed: never

Copyright © 1998-1999 by Nick Johnson. All rights reserved.