How does a barcode work?
A barcode essentially is a way to encode information in a visual pattern that a machine can read. The combination of black and white bars (elements) represents different text characters which follows a set algorithm for that barcode type. If you change the sequence of elements you get different text. A barcode scanner reads this pattern of black and white that is then turned into a line of text your computer can understand.
What is a 1D (linear) barcode? What is a 2D barcode?
A 1D (linear) code is the typical “picket fence” style barcode that people are most familiar with. There are several versions of 1D codes and some encode only numbers while others can encode any keyboard character. All the information in the code is organized horizontally from left to right. These types of codes can be read by any type of barcode scanner. 2D barcodes are a bit more complex as they organize information vertically and horizontally. This allows 2D codes to hold much more information and take up less space than a 1D code. 2D codes require an imager scanner to be read properly.
What is a UPC barcode?
You are probably familiar with the barcodes you see on most packaged products. These barcodes are in the UPC-A code format.
Example of a UPC barcode: