Hey Reader, Happy Wednesday! Finally, I’m back in California after my hiatus. I got married in November and wanted to take a long break for the first time since I started writing this newsletter 2 years ago. Also, fortunately, the stars and time aligned for me to travel to Vietnam, Thailand, and India during this break. After all the fun and frolic, I thought now was the right time to get back at it and continue the newsletter marathon. So let's jump in and look at how a barcode you see on every item you buy at the grocery store works this week. I aim to write my newsletter issues in a way that allows one to follow them while traveling on a bus, having coffee, and waiting for food. How it works: 15-second answerBarcodes encode data as binary (0s and 1s) using black-and-white lines of varying thickness. A scanner reads these lines and converts them into a 95-digit sequence. The sequence starts and ends with "101" and includes a middle "01010" divider. The remaining digits are grouped into segments: the left side identifies the manufacturer, and the right side identifies the product. How do Barcodes work?Dropping some barcode facts first as an appetizer for you.
So naturally, I was super curious to know how it works. So here we go! Now I know how and so do you… Step 1: Take a picture of the barcode you see at a store You will see black and white vertical lines of varying thickness as seen in Figure 1. Each white/black line can be x, 2x, 3x, or 4x thick. And you’ll also find a set of numbers at the bottom, which we will return to later. Step 2: Take a horizontal slice of the bar code and inspect the black-and-white gaps Slice the bar code in Figure 1 horizontally and take the strip. You now have a series of black-and-white squares aligned linearly in a row. Note: We can analyze the bar code further without slicing it horizontally. But it’s easier to follow the explanation seeing it as squares instead of long vertical rectangles. Step 3: Convert the white and black gaps into 0s and 1s respectively. The longer the width, the more the 0s and 1s. Starting from left to right, convert the black and white squares to 1s and 0s respectively. The result is a series of 95 digits with just 0s and 1s as seen in Figure 3. Step 4: Arrange the 0s and 1s into groups We now have a 95-digit series composed of just 0s and 1s. Starting from left to right, arrange the numbers into groups as follows.
Step 5: Find the product code number using the left and right side digits Take the 42 digits that we split into 6 groups on both the right and left sides of the barcode. Each of these 7-digit groups represents a number between 0-9. Their respective numbers are shown in Figure 5. Mapping each of the left-side 7-digit groups from Figure 4 gives us the number 51000, which is the company code. Similarly, the right side digits translate to 01251, which is the product code. Thus, we can find out who the manufacturer is and what the product is from this barcode. Every item in a grocery store has a unique product code. So, this is how each product and its manufacturers are uniquely identified. Source: Code by Charles Petzold. Question of the week
Reply to this email with your thoughts, and we’ll have a discussion. Also, I’ll answer this question in the next edition of the newsletter on the 18th of February. Gadget of the weekVacuum robot with an arm: The five-axis robot arm unfolds from the top of the vacuum. It can extend and twist, in a bid to remove obstacles from its path and pick up laundry items weighing less than 300 grams. The arm sports an onboard camera and other sensors to orient itself in space. This robot by Roborock was featured in the Consumer Electronics Show 2025. 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 330+ readers every other Wednesday to see the world differently in just 3 minutes—regardless of your background! 🚀
Hey Reader, Happy Wednesday! Last week, we went to the Cherry Blossom festival in San Francisco. Let’s look at how the Internet works for the next four weeks, starting today. I aim to write my newsletter issues in a way that 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 Internet is physical and fragile. The YouTube video file is stored on a computer in a building (aka data center) somewhere in the world,...
Hey Reader, Happy Wednesday! Last week, I went to Lake Tahoe in California for the long weekend. Let’s look at how a SOS signal 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 SOS is a universal distress signal used in emergencies. It works through Morse code, which combines short (·) and long (—) signals to form letters and words. The letters SOS...
Hey Reader, Happy Wednesday! Last week, I experimented with preparing Chinese cuisine at home for every meal. Let’s look at how Velcro works this week. I aim to write my newsletter issues so 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 Velcro is a hook-and-loop fastener made of two parts: loops and hooks. When pressed together, the hooks latch onto the loops, creating a secure bond. Pulling them apart...