How do barcodes work?

How do barcodes work?

You've all seen these strange looking groupings of lines printed on the labels of products. Barcodes are mostly used to keep track of containers and products in production lines but also to record the price of goods in grocery stores and make self-checkout possible.

There are two kinds of barcodes: 1-D or one-dimensional are inline barcodes that most of us are familiar with. 2-D barcodes allow the coding of much more information and usually appear as a series of squares, dots or other symbols that look like a crazy puzzle.

Barcodes are typically read or decoded by laser scanning devices or optical scanners that scan a code and produce numbers or letters that are human reading. That's why they call barcodes machine-readable. You've seen these things. They flash a red light on the code and go 'Beep'.

I once created computer programming to print barcodes using lasers. In order to do this, I had to learn all about barcodes, and I soon found out that they are digital and involve math.

1-D barcodes consist of a series of parallel lines and spaces of varying thicknesses. Most products in super markets employ Universal Product Code or UPC. Most use UPC-A and it can decode 12 digits. These codes have either wide or thin bars and spaces, and that makes them easier to print and read. UPC-A codes are easy to identify because the have the longer guide bars that extend down on both sides and in the middle. The human readable parts are tucked up in between the guide lines.

A very common industrial barcode symbology is Code 39. It can only detect uppercase letters and numerical digits plus some special characters (*, space, - $, %, . , / and +). Each character of a Code 39 has nine elements (either bars or spaces) Three of the nine (hence the name) are wide (either bars or spaces). The ratio between wide to narrow can be 1:2 to 1:3. There are 43 unique characters that can be decoded and each consists of nine unique elements. Each character is separated from its next neighbor by a narrow space. The * character is used as a start and stop character. Code 39 doesn't use check digits. A check digit is a mathematical process that sums up the binary value of each character in the code and uses a checksum calculation (usually a division that results in a modulus). The problem with Code 39 is that it's not very high resolution (it takes one character for each digit or letter).

There are many more 1-D barcode symbologies: Code 128, EAN13, I-2 of 5, Codabar, Code 11, Code 93 to name a few. They each have good points and things that are not good.

The real action now is 2-D barcodes. The first of these is PDF417, but it not nearly as popular as Data Matrix, Maxi-Code, Aztec and QR-Code. All of these are square and look like gibberish. They have the ability to store a lot of information in a small area.

One of the more common two-dimension 2-D) barcodes is Data Matrix, which can contain a lot of information and include all of the ascii (American Standard Code for Information Interchange) code numbers, letters and symbols.  A data matrix code consists of black and white cells that appear as squares or rectangles. They look kind of like a crossword puzzle without the numbers. What's so special about this particular 2-D barcode is that it can suffer damage and still decode the full message. This is the result of redundancy built into the symbology, and it involves a lot of complicated math. Describing how a Data Matrix code is printed and decoded would take a book.

The thing to remember is that barcodes have made automation of a lot of tedious work possible, including scanning your food and item purchases in stores.

Thanks for reading.

Bạn đang đọc truyện trên: AzTruyen.Top