# Interleaved 2 of 5

Interleaved 2 of 5 (ITF) is a continuous two-width barcode symbology encoding digits. It is used commercially on 135 film, for ITF-14 barcodes, and on cartons of some products, while the products inside are labeled with UPC or EAN. ITF was created by David Allais, who also invented barcodes Code 39, Code 11, Code 93, and Code 49.

## 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.
The digits are encoded to symbols as follows:
Interleaved 2 of 5 encoding :
| Digit | Bar or space width | Bar or space width | Bar or space width | Bar or space width | Bar or space width | Bar or space width | Bar or space width | Binary word | Binary word | Binary word | Binary word | Binary word | Mnemonic (using weights) |
| 0 | n | n | W | W | W | W | n | 0 | 0 | 1 | 1 | 0 | 4+7=11, replaced by 0 |
| 1 | W | W | n | n | n | W | W | 1 | 0 | 0 | 0 | 1 | 1+0=1 |
| 2 | n | W | W | n | n | W | W | 0 | 1 | 0 | 0 | 1 | 2+0=2 |
| 3 | W | W | W | W | n | n | n | 1 | 1 | 0 | 0 | 0 | 1+2=3 |
| 4 | n | n | W | W | n | W | W | 0 | 0 | 1 | 0 | 1 | 4+0=4 |
| 5 | W | W | n | W | W | n | n | 1 | 0 | 1 | 0 | 0 | 1+4=5 |
| 6 | n | W | W | W | W | n | n | 0 | 1 | 1 | 0 | 0 | 2+4=6 |
| 7 | n | n | n | W | W | W | W | 0 | 0 | 0 | 1 | 1 | 7+0=7 |
| 8 | W | W | n | n | W | W | n | 1 | 0 | 0 | 1 | 0 | 1+7=8 |
| 9 | n | W | W | n | W | W | n | 0 | 1 | 0 | 1 | 0 | 2+7=9 |
| Weight: | Weight: | Weight: | Weight: | Weight: | Weight: | Weight: | 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).
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.
A checksum can be added as last digit, which is calculated in the same way as 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; some of the standards that provide requirements for ITF (specifically ITF-14) include ISO/IEC 16390 and GS1 General Specifications.$^{:§5.3.2}$

## Applications

ITF is often used for marking product ID numbers or other codes, of various lengths, on item cartons and multi-unit cases. One specific instance of this, standardized by GS1, is the ITF-14 bar code used to mark packages with Global Trade Item Numbers. In these uses, the ITF bar code symbol is usually printed surrounded with a thick black rectangular border called the Bearer Bar. The Bearer Bar surrounds the entire symbol and the quiet zones, abutting the ends of the bars. The purpose of a Bearer Bar is to equalize the pressure exerted by the printing plate over the entire surface of the symbol, and to enhance reading reliability by helping to reduce the probability of misreads occurring when the bar code is scanned at too large an angle so that the scanning beam crosses the top and/or bottom edge of the bar code rather than scanning across all bars, entering through the leftmost bar and exiting through the rightmost bar (or vice versa for a reverse scan). Such a "short scan" which does not extend through all of the bars obviously cannot result in a correct read of the complete bar code, but by the nature of the interleaved 2 of 5 code, it is possible for a short scan that begins in the middle of the bar code to begin with a pattern that corresponds to the required start pattern, or for a short scan that ends in the middle of the bar code to end with a pattern that corresponds to the required stop pattern. In this way the short scan, though incorrect, may appear to be a correct full scan. The Bearer Bar prevents this error, as a short scan will pass through the Bearer Bar as it passes across the top or bottom edge of the bar code. Since the Bearer Bar is much wider than any legitimate black bar, it will ensure that the short scan cannot appear to begin with the correct start pattern and end with the correct end pattern, forcing an invalid scan. The bar code can then be re-scanned, either automatically or manually.
On 135 film (35 mm) canisters, interleaved 2 of 5 is used to identify the manufacturer, the film type, number of exposures and proprietary information using 6 digits. The barcode is located between the electrically read silver and black DX Camera Auto-Sensing Code and the film can exit lip. It is optically scanned by many film-processing machines when the cartridge is inserted for developing.
Identcode and Leitcode are variants of interleaved 2 of 5 with check digits used by Deutsche Post.