Barcode symbologies
Jump to navigation
Jump to search
Single dimension codes (linear)
Numeric codes
- UPC
- Universal Product Code
- UPC A, UPC E
- used by North American Distribution Industry
- EAN
- European Article Numbering system
- EAN 8, EAN 13
- JAN
- Japanese Article Numbering system
- JAN 8, JAN 13
- Character set: 0-9
- Interleaved 2 out of 5
- aka Material Handling Institute standard USD-1
- USD-1
- Uniform Symbol Description 1
- Character set: 0-9
Alphanumeric
- Codabar
- Two versions:
- MHI standard USD-4
- American Blood Commission (ABC) standard
- Character set: $+-./0123456789: and ABCD (used for Start/Stop codes only)
- 3 of 9 code
- aka MHI standard USD-3
- aka Code 39
- Character set: (SPACE) $%+-./ and 0-9 and A-Z and “*” (used for start/stop codes only)
- Extended 3 of 9 code
- provides full 128 character ASCII set
- aka Extended code 39
- Characters $/+% followed by a upper-case letter can represent other ASCII characters
- ASCII 000 (NULL): %U
- ASCII 001-026: $A-$Z
- ASCII 027-031: %A-%E
- ASCII 032 (space): (space)
- ASCII 033–044 !”#$%&’()*+, : /A-/L
- ASCII 045 -: - (also /M ??)
- ASCII 046 .: . (also /N ??)
- ASCII 047 /: /O
- ASCII 048-57 (0-9): 0-9 (also /P-/Y)
- ASCII 058 :: /Z
- ASCII 059 ;: %F
- ASCII 060-064 <=>?@ : %G-%J, %V
- ASCII 065-090 A-Z: A-Z
- ASCII 091-096 [\]^-` : %K-%O, %W
- ASCII 097-122 a-z: +A-+Z
- ASCII 123-126 ??}~: %P-%S
- ASCII 127 (DEL): %T (also %X, %Y, %Z)
Full ASCII (7-bit)
- Code 128
- ISO/IEC 15417:2007
- 108 symbols (103 data, 3 start, 2 stop); 3 black bars and 3 white spaces, each 1–4 modules wide; each symbol is 11 modules wide; sum of bar module widths must be even within each symbol
- Overall code must be a minimum of 34 modules wide (54 modules including quiet zones) or 10 bars minimum (for ‘null’ data, if allowed?)
- Total module width: 34 + 11n
- Total module width, including quiet zones: 54 + 11n
- Total number of bars: 10 + 3n
- Data length <=
(NumBars - 10 )/3
- Possible Code 128 if
(NumBars - 10) mod 3 == 0
- Data length <=
- Note: invisible characters (control characters and FNC1–4 count but will not show up in input or output text length)
- shifts between three code sets (A, B, and C) to enable representing all 7-bit ASCII characters
- Code sets A and B cover 128 characters; code set C represents digits more efficiently
- Format:
- 1. Start symbol (A: 211412, B: 211214, or C: 211232; 211133 is ‘reverse stop’ symbol indicating barcode is upside down, so either way code always starts with ‘211’!)
- 2. Encoded characters
- 3. Check symbol (weighted sum, modulo 103, of all symbols up to check position)
- 4. Stop symbol (233111 or 211133 reverse)
- 5. Final bar (2 modules wide)
- Character sets:
- 128A (Code set A): ASCII 00-95; 0–9, A–Z, control codes (except 127, ␡), special characters (<space> !”#$%&’()*+,-./:;<=>?@[\]^_), and FNC1–4
- 128B (Code set B): ASCII 32-127; 0-9, A-Z, a-z, ␡, special characters (from code A, plus `{|}~), and FNC1–4
- 128C (Code set C): digits 00-99 and FNC1 (each group of two digits is stored with one of 100 different symbol patterns)
- If an odd number of digits is to be encoded, shift to Code A or Code B prior to the final digit
- Code A and code B use the same symbols to encode characters common to both codes
- FNC4 causes next character to shift by adding (or subtracting) 128 from the ASCII value. FNC4FNC4 acts as a ‘shift lock’ until that double code occurs again.
- 10 module quiet zone required at beginning and end of code
- Shifting between code sets:
- From A: code 98(shift->B), 99(->C), 100(->B)
- From B: code 98(shift->A), 99(->C), 101(->A)
- From C: code 100(->B), 101(->A)
- FNC characters
- Code A: code 96 (FNC3), 97 (FNC2), 101 (FNC4), 102 (FNC1)
- Code B: code 96 (FNC3), 97 (FNC2), 100 (FNC4), 102 (FNC1)
- Code C: code 102 (FNC1)
- GS-128
- Subset of Code 128
- Formerly known as UCC/EAN-128
Two dimensional codes (linear, stacked)
PDF417
- PDF417
- Portable Data File with 4 bars (both light and dark, per symbol/codeword) and 17 units (modules) long)
- Symbol Technologies, c. 1991
- ISO 15438
- Rows: 3–90
- Row hight at least 3 times minimum width (module width?)
- One unit spacing between elements:
- Base 929 encoding
- 900 codewords for data; 29 for special functions
- Each pattern:
- 4 dark bars
- 4 light bars
- 17 units total
- always starts with a dark bar
- always ends with a light bar (i.e. whitespace)
- Three sets of bar patterns for each codeword: 0, 3, and 6
- these clusters are alternated between rows
- this allows any single row to be identified to a ROW mod 3
- Encoding modes:
- Binary / byte: 6 bytes per 5 code words, then one byte per code word for excess bytes
- Numeric: n digits encoded in
[n/3]+1
codewords
- Maximum 44 digits in 15 codewords
- Text: Each codeword encodes 2 Base 30 digits, which represent printable ASCII (plus CR, LF, HT) with four submodes:
- Uppercase: A-Z, SPACE, ->LOWER, ->MIXED, ->NextDigitPunctuation
- Lowercase: a-z, SPACE, ->NextDigitUPPER, ->MIXED, ->NextDigitPunctuation
- Mixed: 0-9, CR, TAB, SPACE, « &,:#-.$/+%*=^ », ->PUNCT, ->LOWER, ->UPPER, ->NextDigitPunctuation
- Punctuation: « ;<>@[\]_`~!,:-.$/“|*()?{}’ », CR, TAB, LF, ->UPPER
- Between 2–512 error detection and correction codewords added, using a Reed-Solomon ECC
- 51 square modules needed to represent 10 bits, compared to 8 modules for 8 bits with codes such as DataMatrix or QR codes, or 4 times as much area for the same amount of data (excluding metadata and space used for ECC)
- Quiet zone, left
- Start pattern
- 811111121 (11111111010101000)
- Left Row Indicator
- 17 units
- Encodes row number and ECC level
- Data Codewords
- 16 + 1 units each
- Quantity: 1–30 per row
- Right Row Indicator
- 16 + 1 units
- Stop Pattern
- 18 units
- 711311121 (111111101000101001)
- Quiet zone, right
Two dimensional codes (square)
Aztec
Maxicode
QR code
- Max characters, numeric: 7,089 (3.33 bits/char)
- Max characters, alpha: 4,296 (5.5 bits/char)
- Max characters, binary: 2,953 bytes (8 bits/char)
- Dots per side (min 21): 17 + (4 x version number)
Character sets:
- Numeric (10 characters): 0–9
- Alphanumeric (44 characters): 0–9, A-Z, (space), $%*+-./:
- Binary: ISO/IEC 8859-1 (LATIN-1)
4 error correction levels:
- Level L: 7% data loss allowed
- Level M: 15% data loss allowed
- Level Q: 25% data loss allowed
- Level H: 30% data loss allowed
9 Modes:
- 0000 | 00 : End of message
- 0001 | 01 : Numeric
- 0010 | 02 : Alphanumeric
- 0011 | 03 : Structured append
- 0100 | 04 : Byte encoding
- 0101 | 05 : FNC1 in first position
- 0110 | 06 : (unassigned??)
- 0111 | 07 : Extended Channel Interpretation (ECI)
- 1000 | 08 : Kanji encoding
- 1001 | 09 : FNC1 in second position
- 1010 | 10 : (unassigned?)
- .... | .. : (unassigned?)
- 1111 | 15 : (unassigned?)
Two dimensional codes (rectangular)
Two dimensional codes (other)
References
- TEC-IT
See also
- “Elements Of A Bar Code System” (HP application note 1013, part number 5953-7732)