Frequently Asked Questions

A plain-language introduction to why barcodes exist, and how they are printed, scanned, and decoded.

Why Barcodes?

So you don't know much, or anything, about barcodes or barcoding technology. To start with, let's ask a very important question: why barcodes? Many times the key to understanding a technology is to understand why it came about.

The first publication I ever read concerning barcodes was one written by someone at NCR (National Cash Register) titled "Keyless Data Entry." This was around 1973. The publication described a method of entering data into a point-of-sale system without having to use keys. Cash registers had by then become data terminals attached to a main computer in large retail and grocery stores — which is why they were no longer even called cash registers. When the clerk "rang up" your items, this new cash register did a lot more than total up your bill and calculate your change.

Actually, the clerk didn't even enter the price of the items anymore, but rather a series of numbers that described what the item was. This number was sent to the computer. The computer looked up the price, sent it back to the point-of-sale system, and also subtracted the product from the store inventory. When inventory got low enough, the computer could process the paperwork to order more products. The computer also compiled various reports for store management so they knew all about their inventory: which products were fast-moving, which were slow-moving, and a lot of other things about how their store was running. Of course, the key to accurate transactions and accurate information for management all relied on the clerk entering those numbers accurately.

It didn't take long to realize that human beings are not very good at reading a series of numbers from an object and entering them correctly on a keyboard. A lot of mistakes get made, especially when the clerk is expected to do this hundreds or even thousands of times a day.

People just aren't good at this kind of thing. Somehow, a method had to be devised to mark the necessary information on each product in a manner that some type of "machine" could read accurately, provided the clerk just held the item so the machine could see the special marking. It would also be necessary for this special marking to be added to the product at very little or no cost.

How Barcodes are Printed and Read

Now that you know the WHY, let's talk about the HOW. There are two important "how's" in barcoding: HOW the barcode symbol is made and placed on an object, and HOW the barcode is "read" and translated into regular numbers or letters. Barcodes are usually made up of black bars printed on a white background. Other colors can be used, but we're trying to keep it simple here.

The bars are either wide or narrow, and the spaces between the bars are likewise either wide or narrow. There are codes where more than two different widths are used, but, as noted, we're keeping this simple. The length of the bars has no significance other than making it easier for the scanner to find the code.

Barcodes are printed using normal printing processes. Since most items identified by a barcode already have some type of printed package or tag, the barcode can be added as part of the normal printing process.

Barcodes are "read" using some type of optical pickup. There are many different types of optical pickups, or "scanners," as they are usually called. We'll consider the simplest of these: the barcode wand. The wand is a pen-shaped scanner. It is held like a pen, with the scanning optics in the tip. The wand is passed over the code with the tip in contact, like drawing a line through the bars. There are two basic components to any scanner: a light source and a light detector. The light source projects a spot of light onto the barcode. The detector looks at this illuminated area through a narrow aperture, about the width of one of the narrow bars.

If the scanner is looking at a white space, it receives a reflection. If it is looking at a black bar, it receives little or no reflected light. White surfaces reflect light; black surfaces absorb most of the light. As the wand is passed over the code, the detector sees the white spaces and black bars. Here's the important part: when the wand passes over a wide space, the detector sees light for a longer time than when it passes over a narrow space. The same applies to the bars — a wide bar causes the detector to be dark for a longer time than a narrow bar. If we could see the electrical signal generated by the photodetector, it would look something like figure one.

The top signal represents the electrical output from the photodetector, while the bottom signal has been processed in preparation for decoding. Notice that bars generate a positive signal, while spaces generate a signal close to zero. So we can tell a bar from a space by the signal level. Notice also that there are both wide and narrow pulses, and spaces between the pulses. These represent the bars and spaces in the code.

Next, this signal is analyzed by a microcomputer circuit programmed for the specific job of decoding barcodes. First the microprocessor times the duration of each of the pulses and divides them into two categories: wide and narrow. From this signal the microcomputer can reconstruct the original barcode as patterns of bars and spaces. In each type of barcode, each character is represented by a specific pattern of bars and spaces.

Also, the number of bars and spaces in each character is always the same. So the microcomputer can divide the entire code into individual characters and then translate each individual pattern into the character it represents. Finally, the microcomputer sends the decoded information to some other device that will use it. This is usually done using some type of computer data transfer protocol, such as RS-232.

The Codes

The types of barcodes in use today can be roughly divided into two categories: retail and industrial.

For more information about types of barcodes, see Linear Symbologies and 2-Dimensional Symbologies.