If you think about what a UPC code is, it’s just a series of black and white lines, right? Each of those lines can be represented as a binary digit, a 1 or a 0, depending on whether it’s black or white. If you only cared about a binary string, that’s all you’d need. You could make a barcode that was 4 digits long by having 4 lines. If B is 0 and W is 1, then 4 lines of BWWB will be read as 0110. However, this isn’t super convenient, so UPC organises these lines into blocks of 7, and uses the order of the lines to represent a decimal digit. 1110010 for example represents 0.
But, those lines don’t actually need to be very long. The vertical dimension in a UPC code is doing absolutely nothing in terms of the information it delivers, it’s just making it so the line of light from the barcode reader doesn’t need to be perfectly aligned – it’s making it much easier to scan. So, you could squish a barcode down to be potentially even just 1 atom tall if you really wanted to and could invent a reader capable of seeing something that small. With the shift to cameras, which can see the actual image and not just detect the red line bouncing off it, the height of the barcode can be shrunk down immensely. This is pretty much what a QR code is doing – by shifting to squares instead of lines, it can fit a lot more information in, because it frees up the vertical dimension to contain different information to the bits of the code above and below it.
Latest Answers