When a barcode is scanned, the string of vertical lines are interpreted by the computer and then output as text.
The point-of-sale system can recognize that string of text and will know to bring up certain details — like the name and price of that item — as a result.
That relationship between the barcode and that item had to be established beforehand. The barcodes were generated either by the business itself, or in concert with an organization known as GS1, which licenses barcodes to companies all around the world.
How to read a 489 Hong Kong barcode
There are few things that are so everyday but in which we pay less attention. The barcode accompanies any packaged product, but we don't pay much attention to it because it doesn't go with us: it identifies the product in the box and serves to get us charged.
But if we dedicate a few seconds to that succession of lines of different thickness, blank spaces and numbers, we would obtain some information about what we are buying, which never hurts.
In reality, there are several types of barcodes, but in our environment the European Article Number (EAN) system is used, also called International Article Number (IAN), which is managed by a global organization called GS1, based in Brussels, which includes to more than a hundred countries.
The most widely used EAN code is EAN-13, so called because it includes 13 digits, each with its function. The first two or three serve to indicate the country that grants the code, but this does not mean that it is the country of origin of the product, since it refers to its marketing (Spain is 84). The next four or five numbers are the company code; Technically, they identify the owner of the brand, whose number is assigned by the Association of Manufacturers and Distributors (AECOC). The next five digits are the product code.
In total, the reference to the country, the company and the product add up to 12 numbers. The thirteenth is the so-called check digit. To calculate it, the previous odd digits are added and multiplied by three, the even numbers are added, the top ten is found and the result obtained is subtracted. In this way it is guaranteed that all the numbering is correct and that each product has a different code.
The configuration of the bars, with different thicknesses and spaces, is equivalent to the numbers that the code has below, so it can be read automatically or, in case there is a problem, the digits can be entered manually.
As an expert in quality in the food industry explains, the EAN-13 barcode can be requested online, but you have to be careful because not all the sites that provide it are reliable. It is necessary to verify that the company that offers this service complies with the GS1 standard.
In practice, although all this is irrelevant to the consumer, the code stores a lot of information that technology allows you to read in an instant and that today is essential in logistics.
In addition, in this way everything that is bought and sold at retail is controlled, including sales and the stock of each store. Nothing arrives at an establishment without its barcode, although there are also items for which supermarkets have their own codes, for example, when we buy fruit.
A shortened version
However, if you look at some products, a 13-digit barcode does not always appear. There is also a shortened version, which is EAN-8. Generally, it is used for small items that are sold loose.
In this way, space is saved, although some information is lost. Specifically, the eight numbers are used to identify the country and product and add the check digit. It is not all the information, but it is just as practical.
In addition, in other countries there are other formats. In the United States and Canada, the UPC is used, so it is not uncommon for products to arrive with this system. In this case, it is 12 digits that basically offer very similar information regardless of the country.
How to read barcodes… without a barcode reader
Or at least how to try
Barcodes are generated in such a way that "direct reading" by a human being is not a priority. However, that does not prevent us from knowing its exact mechanism. The process takes a few milliseconds for a computer, but that "beep!" casual represents an important amount of information that includes country, company name, product, and a final check to verify the correct reading of the code.
Brief history of the barcode
As with many other inventions, the history of the first barcode for application on general consumer products dates back to the late 1940s. There are several names associated with its creation, but the first on the list are Norman Joseph Woodland and Bernard Silver. Both patented an initial version based on a circular design, and according to Woodland himself, inspired by Morse code.
Woodland ended up under the wing of IBM, which showed great interest in the system (even tried to buy the patent), but admitted that the necessary processing power was not yet available. 70 years later, barcodes are printed on just about anything you can imagine. Food, medicine, tools, clothing… if it is sold by unit, package or weight, chances are you will see one.
How do barcodes work
Now, the magic question is… how do they work? How can a laser extract numbers from such thin lines? Obviously, if there is a problem with the reading, we always have the possibility to enter the numbers by hand, but it all starts with a standard, and that's when the GS1 organization, whose headquarters are in Brussels, intervenes.
With more than 100 offices around the world and a million and a half registered companies, you basically have to deal with them if you need barcodes for your products. The two most popular formats are UPC-A and EAN-13. UPC-A is supposed to be used in the United States and Canada, but the magic of international trade makes it very easy to find copies of both formats.
Let's take the case of UPC-A: Any code has 95 bars (yes, 95) that can be black or white, with three separation pillars that mark the beginning, the middle, and the end. The pillars consume 11 bars (the pattern is 3-5-3), leaving a total of 84 bars to store the information. Those 84 bars are divided into twelve groups (one per number) of seven bars. The configuration of the bars establish the codification of the group, and by extension, the digit that is to be represented. Wikipedia did the heavy lifting by posting an accurate graph with each possible combination:
The differences are subtle, but critical
There's something weird about that picture, right? One expects to see that the encoding for each digit is the same on both sides of the code, but it doesn't work like that. In fact, the trained eye will probably detect a subtlety: The white bars on the left half are always even, while on the right half they are odd. Because? Because it guarantees the reading process even when the code is upside down, something that happens very often. If the reader recognizes that the white bars on the left side appear as odd, he automatically knows that he should start reading on the right side.
What does the number itself tell us? Once again we stay on UPC-A ground, and we discover that the first three digits represent the country. If you have some codes nearby that you want to explore, you can click here to enter the official GS1 prefix table, or alternatively use this international identity finder (typing the code is enough, but there is a limit of searches per day) . The rest of the code includes the company and the product.
This is where GS1 makes its money: The big players in each market have a huge number of products, so they require the "country + company" section of the code to be short, or they won't be able to generate barcodes. for your entire catalogue. On the other hand, those companies with small offers (ten products or less) can access a much cheaper prefix.
An example of UPC-A code on a Logitech mouse: 09785506395-3
The closure of this article belongs to the last digit of the UPC-A barcode, which is essentially the checksum, a control that confirms the correct reading of the code. How is it calculated? First we add the six digits in the odd positions of the code, and multiply by three. Then we add the five digits in the even positions. Then we add the results of both operations. The last step is to take that number and add the check digit, which should make the result a multiple of 10. Let's try our Logitech mouse code:
(0 + 7 + 5 + 0 + 3 + 5) = 20
(20 x 3) = 60
(9 + 8 + 5 + 6 + 9) = 37
(60 + 37) = 97
(97 + 3) = 100