
Barcodes are commonly used when customers buy products. Take an item to the checkout, and the clerk scans its barcode. The product information then appears on a computer connected to the scanner, allowing a quick, accurate transaction. How does this work?

Where barcodes began, and how binary comes in
The barcode was devised in 1948 by Bernard Silver, then a college student, and his friend Norman Joseph Woodland.
Bernard SilverNorman Joseph WoodlandBarcodes use a binary representation—a number system that uses only 0 and 1. To understand the basic idea, look at the simplified barcode diagram below. It has four white lines on a black background.
Ref.Reading stripes as numbers
Call the leftmost white line the reference line, or line 1, and the others lines 2, 3 and 4 in order. If any of lines 2 through 4 can be painted black, there are eight possible patterns.
Figure 1Figure 2Figure 3Figure 4Figure 5Figure 6Figure 7Figure 8Read these as binary numbers. Figure 1 has three white lines besides the reference line, giving 111₂. Its value is 7: 1 × 2² + 1 × 2¹ + 1 × 2⁰ = 7. In Figure 6, only line 3 is white besides the reference line, giving 010₂. Its value is 2: 0 × 2² + 1 × 2¹ + 0 × 2⁰ = 2.
Figure 6Reading all eight patterns this way gives 7, 6, 5, 4, 3, 2, 1 and 0, respectively. The basic principle is to read the code and display the stored information on a computer.
To do this, a scanner shines light on the barcode. Differences in the reflected light are converted into electrical signals and read. Black and white lines are used because the large difference in reflectance makes them easy to distinguish.
ScannerlightSignal
How much information can a barcode represent?
To represent more information in this simplified example, add more white lines. One extra line increases the possible values from 8 (= 2³) to 16 (= 2⁴). Each additional line increases the capacity exponentially, so the original explanation treats capacity as something that can keep expanding. Varying line lengths and widths can also change the values represented.
There is a practical caution here. People sometimes show digital gift vouchers to others with only part of the code covered. If even a small section of the barcode is exposed, someone may stretch that section vertically and use it.
Goongibucks₩100,000 e-gift card7:21 PMDespite that drawback, barcodes can be printed on many materials besides paper, and some can still be read even when partly damaged. They are also inexpensive: the original article gives a production cost of about 5 Korean won per barcode. These advantages help explain why they remain in use.
The numbers below a barcode and the check digit
The original Korean explanation uses a standard 13-digit KAN code, also referred to internationally as EAN Korea. In the example described, the first three digits are the country code (880 for Korea), the next four identify the manufacturer, and the following five make up the product code. The final digit is a check digit, used with the preceding digits to check for errors.
The diagram’s example uses 8801234567893. Add the digits in the even-numbered positions: 8 + 1 + 3 + 5 + 7 + 9 = 33. Multiply by 3 to get 99. Add the remaining odd-position digits, excluding the final check digit: 8 + 0 + 2 + 4 + 6 + 8 = 28. The total is 127. Subtract it from the next multiple of ten, 130, to get the check digit: 3.
One-dimensional barcodes and QR codes
QR codes work on a similar principle. The barcodes discussed so far are one-dimensional, while QR codes are two-dimensional. Where the former use vertical lines, the latter store information both horizontally and vertically. This makes it possible to put information in the code itself and use it in a wider range of fields. Has that answered your question?
Copyright. 사물궁이 잡학지식. All rights reserved
More English articles · Read the original Korean article
Watch the original video below. For English subtitles, turn on captions (CC) and choose English (United States) in the player settings.