- Code 39 (or Code 3 of 9) differs from most of the other popular bar code symbologies in that it is alphanumeric.
- The Code 39 specification defines 43 characters, consisting of uppercase letters (A through Z), numeric digits (0 through 9) and a number of special characters (-, ., $, /, +, %, and space).
- It is the standard bar code used by the United States Department of Defense, and is also used by the Health Industry Bar Code Council.
Encoding the symbol
- The number "1" represents a "dark" or "bar" section of the bar code whereas a "0" represents a "light" or "space" section of the bar code.
- Thus the numbers 1101 represents a double-wide bar (11), followed by a single-wide space (0), followed by a single-wide bar (1).
Structure of a Code 39 barcode
- A Code 39 bar code has the following structure:
- A start character - the asterisk (*) character.
- Any number of characters encoded from the table below.
- An optional checksum digit calculated as described above and encoded from the table below.
- A stop character, which is a second asterisk character.
Code 39 Encoding table
- Below table note that the "Width Encoding" column is expressed as "N" for narrow and "W" for wide.
- The "Barcode Encoding" column represents how the bar code will actually be encoded as described above in "Encoding the symbol."
- Keep in mind that each character begins and ends with a bar, thus the "bar code encoding" always starts and ends with a "1".
| Check Value | ASCII Char | Width Encoding | Barcode Encoding | Check Value | ASCII Char | Width Encoding | Barcode Encoding |
|---|---|---|---|---|---|---|---|
| 0 | 0 | NNNWWNWNN | 101001101101 | 22 | M | WNWNNNNWN | 110110101001 |
| 1 | 1 | WNNWNNNNW | 110100101011 | 23 | N | NNNNWNNWW | 101011010011 |
| 2 | 2 | NNWWNNNNW | 101100101011 | 24 | O | WNNNWNNWN | 110101101001 |
| 3 | 3 | WNWWNNNNN | 110110010101 | 25 | P | NNWNWNNWN | 101101101001 |
| 4 | 4 | NNNWWNNNW | 101001101011 | 26 | Q | NNNNNNWWW | 101010110011 |
| 5 | 5 | WNNWWNNNN | 110100110101 | 27 | R | WNNNNNWWN | 110101011001 |
| 6 | 6 | NNWWWNNNN | 101100110101 | 28 | S | NNWNNNWWN | 101101011001 |
| 7 | 7 | NNNWNNWNW | 101001011011 | 29 | T | NNNNWNWWN | 101011011001 |
| 8 | 8 | WNNWNNWNN | 110100101101 | 30 | U | WWNNNNNNW | 110010101011 |
| 9 | 9 | NNWWNNWNN | 101100101101 | 31 | V | NWWNNNNNW | 100110101011 |
| 10 | A | NNWWNNWNN | 110101001011 | 32 | W | WWWNNNNNN | 110011010101 |
| 11 | B | NNWNNWNNW | 101101001011 | 33 | X | NWNNWNNNW | 100101101011 |
| 12 | C | WNWNNWNNN | 110110100101 | 34 | Y | WWNNWNNNN | 110010110101 |
| 13 | D | NNNNWWNNW | 101011001011 | 35 | Z | NWWNWNNNN | 100110110101 |
| 14 | E | WNNNWWNNN | 110101100101 | 36 | - | NWNNNNWNW | 100101011011 |
| 15 | F | NNWNWWNNN | 101101100101 | 37 | . | WWNNNNWNN | 110010101101 |
| 16 | G | NNNNNWWNW | 101010011011 | 38 | SPACE | NWWNNNWNN | 100110101101 |
| 17 | H | WNNNNWWNN | 110101001101 | 39 | $ | NWNWNWNNN | 100100100101 |
| 18 | I | NNWNNWWNN | 101101001101 | 40 | / | NWNWNNNWN | 100100101001 |
| 19 | J | NNNNWWWNN | 101011001101 | 41 | + | NWNNNWNWN | 100101001001 |
| 20 | K | WNNNNNNWW | 110101010011 | 42 | % | NNNWNWNWN | 101001001001 |
| 21 | L | NNWNNNNWW | 101101010011 | n/a | * | NWNNWNWNN | 100101101101 |
History
- Code 39 was developed by Dr. David Allais and Ray Stevens of Intermec in 1974.
- Their original design included two wide bars and one wide space in each character, resulting in 40 possible characters.
- Setting aside one of these characters as a start and stop pattern left 39 characters, which was the origin of the name Code 39.



0 comments:
Post a Comment