Hey Reader, Happy Thursday! I went to Michigan for the last long weekend. Let’s look at how QR codes work this week. I aim to write my newsletter issues in a way one can follow them while traveling on a bus, having a coffee, waiting for food, etc. Let's jump in! How it works: 15-second answerA QR code encodes data, such as a URL, into a grid of black and white squares. When scanned by a phone camera, the code is decoded into readable information. Key components include square markers for edge detection, mode indicators for data type, total character count of information to be decoded, the actual encoded data, stop indicators, and error correction data. How do QR codes work?QR codes and barcodes essentially do the same thing. The barcode encodes the data linearly using black and white stripes. Whereas, QR codes encode data two-dimensionally using black and white squares. What is the basic idea behind a QR code? A QR code encodes a website URL like www [dot] google [dot] com into a series of black and white squares laid out on the square. So, when we scan the QR code from our phone camera, this URL is decoded by the app by converting the black and white squares into a URL. But how is that possible? Let’s take a very simple example and go over this. Let’s say we represent the alphabets A, B, and C as a combination of 1s and 0s. And let’s assume that our camera QR code scanner already knows that each alphabet is represented by 4 numbers. A = 1001 Now if I want to form the word ‘CAB’, then we can write “1111 1001 0010” If we want to encode this, we can represent this numeric string as a series of black and white squares, where black squares represent the number 0 and the white squares represent the number 1. This is what the word CAB looks like in terms of black and white squares. Instead of laying it out in a straight line, if we wind it around like we go over the square board on a snake and ladder game, then we have the QR code ready. But there are more components to a QR code than just encoding the URL which we will see in the next section. Note: The representation we gave for the letters A, B, and C and the way the QR code is generated here is only an example and not the exact method. The original protocol is different. But you get the idea. Now let’s see what are the different components of a QR code and what is it that we are scanning every time. Different components of a QR code When you use your phone’s camera to scan a QR code, it first recognizes three square markers at the corners that help it find the edges of the QR code. All the following information is encoded in the form of black and white squares as we discussed in the previous section.
These are the components that make a QR code possible. And this is why it works as smoothly as butter, every single time. Now you and I know what we’re getting into the next time we come across a QR code! Question of the weekWhat do the green lines around the three corner position marker squares in Figure 3 represent? Reply to this email with your thoughts, and we’ll discuss. That's all folks. Thank you for reading! Have an amazing rest of the week, and take care! Enjoying the Newsletter? Choose an option from the poll below so I can work on it. Thanks much!
Read all the past newsletters, about me, or suggest a gadget for me to write about
|
Understand the inner science, tech, and AI of your gadgets with me, a Carnegie Mellon alumnus. Join 205+ readers every other Wednesday to see the world differently in just 3 minutes—regardless of your background! 🚀
Hey Reader, Happy Wednesday! I'm taking a short break for the first time in the last 2 years of writing this newsletter, so I'm resending one of the most opened and popular newsletters this week. Thank you all for your support! Let’s look at how Airport body scanning technology works this week. It is also called Millimeter wave detection and spot this title written on one of these machines the next time you are at an airport. I aim to write my newsletter issues in a way one can follow them...
Hey Reader, Happy Wednesday! Last week, I finished my swimming classes in India and ‘almost’ learned to swim. Let’s look at how Ships work this week. I aim to write my newsletter issues in a way one can follow them while traveling on a bus, having a coffee, waiting for food, etc. Let's jump in! How it works: 15-second answer Ships float because they are less dense than water. Though made of dense materials like steel, ships have hollow interiors filled with air, reducing their overall...
Hey Reader, Happy Friday! Last week, I came to India to visit my family and friends. I fell sick so I’m sending this newsletter on a Friday instead of the usual Wednesdays. Thank you for the support! Let’s look at how a watch works this week. I aim to write my newsletter issues in a way one can follow them while traveling on a bus, having a coffee, waiting for food, etc. Let's jump in! How it works: 15-second answer A quartz watch uses the piezoelectric effect. A quartz crystal vibrates...