Contact FutureLearn for Support
Skip main navigation
We use cookies to give you a better experience, if that’s ok you can close this message and carry on browsing. For more info read our cookies policy.
We use cookies to give you a better experience. Carry on browsing if you're happy with this, or read our cookies policy for more information.

2 and 3 Dimensional Barcodes

UPC-A and EAN-13 are among the most used barcode systems. UPC-A is the primary barcode system for the United States, while EAN-13 is dominant in Europe. There is not that much difference between the systems. EAN-13 has a more complicated way of encoding the first seven digits, and you can read about that in detail here.

2d barcodes

Many times, we want much more information to be encoded. Perhaps we want to encode letters as well as numbers, or the address of a website. In 1994, the Japanese Denso Wave company designed a two-dimensional barcode for the automobile industry. Since they did not patent the code and made it accessible for public use, the 2d encoding, known as QR code became very popular and dominates the two-dimensional barcode systems. The basic idea of two-dimensional barcodes is that instead of using linear bars which encode one bit each, why not use a system that divides a given square into ‘dots’ or pixels, where each pixel is a bit. That way, much more information can be stored. This is exactly what Denso Wave did. Here is the QR code of “Yossi Elran”.
QR code
You can design your own QR code here. If you encode more information in QR codes, the image becomes more complex. Compare the previous QR code with the code for “Dr. Yossi Elran instructs the Future Learn course on math puzzles”:
QR code.

The structure of QR codes is rather complicated and beyond the scope of this course, but if you want to delve into it, here is a good place to start.
Generally speaking, a QR code has 5 definitive regions.
QR structure
(By Bobmath - This image was derived from  QR Code Structure Example 2.svg:, CC BY-SA 3.0,

  • Version information. Different versions of QR codes can encode different amount of information
  • Format information. Information about the encoding itself. The black and white dots on the code are not the direct information bits. The actual information is transformed using what’s known as a mask. The format information tells us the specifications of this mask, as well as information about error correction. Format information is critical for correct deciphering of the barcode, so it is duplicated and placed in at least two separate parts of the barcode.
  • Date and error correction. Most of the area of the barcode are the ‘masked’ information bits. There is also an area set aside for error correction. This is similar to the checksum digits in 1-d barcodes. Error correction bits are slightly more sophisticated as they enable us to reconstruct the barcode even if some of it is damaged or missing!
  • Required patterns. You’ve seen the large squares in the corners. These and some other features are required in all barcodes for correct positioning with respect to the scanner and other reasons.
  • Quiet zone. The outskirts of the barcode should be distinguishable from its immediate environment.

3d barcodes

The immediate question one asks after learning about 1d and 2d barcodes, is, is there a 3d barcode, so that even more information can be stored?
The answer is yes - and no! There are 3d barcodes, but they are only 3d in the structural sense. They have height as well as length and width. However, they were not designed for more information. Rather, they are a way of using the scanning of height for cases when we want to apply barcodes to rough surfaces. A kind of ‘3d’ barcode that is really 2d are color QR codes.
The use of color instead of just black and white allows for much more information to be stored. Still, a true 3d barcode is sure to be invented in the near future, if it hasn’t already!


Feel free to ask me any questions or comment!

Share this article:

This article is from the free online course:

Maths Puzzles: Cryptarithms, Symbologies and Secret Codes

Weizmann Institute of Science