Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Interleaved 2 of 5
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
==Encoding scheme== ITF encodes pairs of digits; the first digit is encoded in the five bars (or black lines), while the second digit is encoded in the five spaces (or white lines) interleaved with them. Two out of every five bars or spaces are wide, giving the name "2 of 5", and each pair has a consistent width. The wide lines form a [[two-out-of-five code]] with consecutive values of 1, 2, 4, 7, and 0, where the code 0 is assigned to the value of 11. This is similar to the [[POSTNET]] bar code. [[File:ITF0123456789withdesc.svg|thumb|right|upright=1.5|Digits 01 23 45 67 89 encoded in ITF: <ul> <li>a = quiet zones</li> <li>ST = start code ''nnnn''</li> <li>0 = ''nnWWn'' (bars)</li> <li>1 = ''WnnnW'' (spaces)</li> <li>2 = ''nWnnW'' (bars)</li> <li>3 = ''WWnnn'' (spaces)</li> <li>4 = ''nnWnW'' (bars)</li> <li>5 = ''WnWnn'' (spaces)</li> <li>6 = ''nWWnn'' (bars)</li> <li>7 = ''nnnWW'' (spaces)</li> <li>8 = ''WnnWn'' (bars)</li> <li>9 = ''nWnWn'' (spaces)</li> <li>SP = stop code ''Wnn''</li> </ul>]] The digits are encoded to symbols as follows: {|class=wikitable style="text-align:center" |+Interleaved 2 of 5 encoding ! Digit !!colspan=7|Bar or space width ! rowspan=12 style="font-size:15%;background:#448;" | ! colspan=5 | Binary word ! Mnemonic (using weights) |- !0 |n||n||colspan=2|W||colspan=2|W||n |0||0||1||1||0 | 4+7=11, replaced by 0 |- !1 |colspan=2|W||n||n||n||colspan=2|W |1||0||0||0||1 | 1+0=1 |- !2 |n||colspan=2|W||n||n||colspan=2|W |0||1||0||0||1 | 2+0=2 |- !3 |colspan=2|W||colspan=2|W||n||n||n |1||1||0||0||0 | 1+2=3 |- !4 |n||n||colspan=2|W||n||colspan=2|W |0||0||1||0||1 | 4+0=4 |- !5 |colspan=2|W||n||colspan=2|W||n||n |1||0||1||0||0 | 1+4=5 |- !6 |n||colspan=2|W||colspan=2|W||n||n |0||1||1||0||0 | 2+4=6 |- !7 |n||n||n||colspan=2|W||colspan=2|W |0||0||0||1||1 | 7+0=7 |- !8 |colspan=2|W||n||n||colspan=2|W||n |1||0||0||1||0 | 1+7=8 |- !9 |n||colspan=2|W||n||colspan=2|W||n |0||1||0||1||0 | 2+7=9 |- ! colspan=8 style="text-align:right;" | Weight: !! 1 !! 2 !! 4 !! 7 !! 0 !!9.5 |} where "n" is a narrow line (bar or space) and "W" a wide line (2.0 to 3.0 times the width of a narrow line). [[Image:Decoding Interleaved 2 of 5.jpg|thumb|Decoding Interleaved 2 of 5. Every pair of digits is color-coded, showing the code and the value for each digit.]] Because digits are encoded by pairs, only an even number of digits can be encoded. Typically an odd number of digits is encoded by adding a "0" as first digit, but sometimes an odd number of digits is encoded by using five narrow spaces in the last digit.{{efn|Note however that the latter strategy causes the last special pair of symbols to be narrower than other pairs.}} A checksum can be added as last digit, which is calculated in the same way as [[Universal_Product_Code#Check_digit_calculation|UPC checksums]]. ===Start / stop and formatting=== Before the actual pairs there is a start code consisting of nnnn (narrow bar β narrow space β narrow bar β narrow space), and after all symbols there is the stop code consisting of Wnn (Wide bar β narrow space β narrow bar). There are specific constraints on the height and width of the bars and the width of the "quiet zones", the blank areas before the start and after the stop symbol;<ref>{{cite web |url=http://www.adams1.com/i25code.html |title=All About Interleaved 2 of 5 Barcode |work=BarCode 1 |first=Russ |last=Adams |date=20 June 2013 |access-date=5 January 2017}}</ref><ref>{{cite web|url=http://www.spatula.net/proc/barcode/i25.src |title=Interleaved 2 of 5 |work=Everything you Never Wanted to Know About Barcodes |first=Nick |last=Johnson |date=18 August 2005 |access-date=August 21, 2007 |url-status=dead |archive-url=https://web.archive.org/web/20070716082337/http://www.spatula.net/proc/barcode/i25.src |archive-date=July 16, 2007 }}</ref> some of the standards that provide requirements for ITF (specifically ITF-14) include [[International Organization for Standardization|ISO]]/[[International Electrotechnical Commission|IEC]] 16390<ref>{{cite web |url=https://www.iso.org/standard/43898.html |title=Information technology β Automatic identification and data capture techniques β Interleaved 2 of 5 bar code symbology specification |publisher=ISO/IEC |access-date=23 October 2024}}</ref> and [[GS1]] General Specifications.<ref>{{cite web |url=https://www.gs1.org/standards/barcodes-epcrfid-id-keys/gs1-general-specifications |title=GS1 General Specifications |date=January 2024 |publisher=GS1 |access-date=23 October 2024}}</ref>{{rp|Β§5.3.2}}
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)