Wide and narrow elements
The two-width construction used by Code 39, Codabar, and the 2-of-5 family - every bar and every space is either narrow or wide. No module grid required.
What are wide and narrow elements?
A family of older 1D symbologies encodes data using just two element widths rather than the module-counted grids that EAN/UPC and Code 128 use. Every bar and every space in the symbol is either:
- Narrow - one unit wide (the X-dimension).
- Wide - N units wide, where N is typically 2 or 3. The exact value (2.0, 2.25, or 3.0) is the wide-to-narrow ratio and is set by each symbology's spec or print profile.
Decoding is a comparison, not a measurement: the scanner only needs to decide "is this element more like a narrow or more like a wide?" That self-calibrating property is why these symbologies were the first to scan reliably on cheap 1970s and 80s hardware - no precise module clock required.
Diagram - the Code 39 letter "A"
Why "2 of 5"?
The 2-of-5 family of symbologies is named after the same property. Each character is built from five elements - and exactly two of those five are wide. Hence "2 of 5".
- Industrial 2 of 5 and Standard 2 of 5 only encode data in the five bars - the spaces are all narrow, used purely as separators. Two of the five bars are wide.
- Interleaved 2 of 5 (and therefore ITF-14 ) puts data in both bars and spaces - one digit is carried by the bars of a character pair, and the next digit by the spaces interleaved between them. Each half still follows the same 2-wide-of-5 rule.
Code 39 uses the same vocabulary but on a 9-element character (5 bars + 4 spaces) with 3 wides per character. Its original name - "3 of 9 Code" - reflects exactly that.
Symbologies that use two-width construction
| Symbology | Elements / character | Wides / character | Typical ratio |
|---|---|---|---|
| Code 39 | 9 (5 bars + 4 spaces) | 3 | 2.0 - 3.0 (typically 2.5 or 3.0) |
| LOGMARS | 9 (5 bars + 4 spaces) | 3 | 3.0 (mandatory) |
| Codabar | 7 (4 bars + 3 spaces) | 2 or 3 (varies by character) | 2.25 - 3.0 |
| Interleaved 2 of 5 / ITF-14 | 5 per character (interleaved bars + spaces) | 2 | 2.0 - 3.0 (ITF-14 typically 2.5) |
| Industrial 2 of 5 | 5 bars (spaces all narrow) | 2 | 2.0 - 3.0 |
| Standard 2 of 5 | 5 bars (spaces all narrow) | 2 | 2.0 - 3.0 |
| Code 11 | 5 (3 bars + 2 spaces, mostly) | 1 or 2 (slight variant - not pure 2-of-5) | 2.0 - 3.0 |
Code 11 is the odd one out: it follows the wide/narrow approach but doesn't fit the "N of M" pattern cleanly - the number of wides per character varies (1 or 2 of 5 elements). The decoder still relies on the same two-width discrimination, just without a fixed count to verify against.
Two-width vs module-counted - why the distinction matters
- Scanner only decides narrow-vs-wide per element - no module clock.
- Tolerant of print stretch and skew - the ratio matters, not absolute width.
- Self-checking: every character must have the correct count of wides, so any single misread fails the check.
- Less dense: a single Code 39 digit takes 13-16 modules of width compared to 7 for EAN-13.
- Every bar and space measured in modules ; widths range across 1, 2, 3, or 4 modules.
- Requires scanner to estimate the module width from the guard pattern or quiet zone.
- More compact - more information per millimetre of barcode.
- Less tolerant of print defects in marginal-quality print.