A barcode contains a total of 95 blocks. The 95 blocks are divided into 3 parts. Left Guard , Center Guard and Right Guard. Barcodes are written in 12 of these blocks. The information is encoded between each black and white bar bar and the space between them. The codes are decoded using a scanner device called a barcode reader. It works using lasers. The reader reads from left to right while reading. Binary bits are stored in bar-patterns and those bits point to certain characters. The scanner device transmits the binary sequences to the computer and the computer translates them into our intelligible language. Again , barcodes are created with barcode generator software. The software first inputs the data as a string then converts them to binary and generates the output using the barcode's algorithm. A one-dimensional barcode can hold about 20 characters and a two-dimensional barcode can hold about 2000 characters. Two-dimensional barcodes have error correction, so even if some part of it is lost, the scanner can scan it. The digits below the barcode are called EAN-13 . One digit precedes 12 digits of UPC-A and creates EAN-13 code. To use a barcode for an international product, you need to purchase a barcode from an organization called GS1 . They generate unique barcodes that allow the product to be scanned by any country. The first bit of the barcode indicates the company and the first 3 digits indicate the country in which the company is located. The 12th digit is given to the scanner to verify that the entire code has been read correctly. This is called check digit. There are no specific rules for determining the digits between the company prefix and the 12th digit. These are all in a central database that allows scanners to detect the product anywhere in the world. Two types of scanning technology are used for barcode scanning. One is laser type barcode scanner and the other is image type barcode scanner. The laser type scanner projects the laser over the barcode and its receiver detects and processes the reflected light. The black bars of the barcode absorb light and the white bars reflect light. This is how a laser barcode scanner works. And when we scan the barcode using the phone's camera, the camera actually takes a picture of the whole barcode and then decodes the image with the help of some image processing algorithms. This can be done by the processor inside the device.