The Bar and the QR Code

Decoding them for the common people
Representational Image
Representational Image Wikimedia Commons/ Carl Malamud


In some aspects life has become easy, instant, and paperless. It is the age of moving light weight. The days of carrying a wallet and the cash within it are over. No heavy pockets/handbags, no worries of theft. Today we just need a charged (net & battery) smart phone, a scannable code, and a UPI (Unified Payments Interface) linked to our bank account (an instant real-time payment system that helps to transfer cash immediately via a mobile interface between two bank accounts) once we are on the move. It is your thumb, forefinger, and the camera in your smart phone that does the trick. We need nothing more.

In our childhood, a bar would indicate a chocolate bar or that elusive place, and the English alphabets would be learned easily by churning them into two-some of AB, CD, MN, QR, ST. In modern day parlance the bar and QR has erupted beyond the childish claims and the alphabetical duality and transformed into most sighted and used figure in the present era - the barcode and the QR code.

Codes have come up in last few years as the easy way for many tough routines of the past. Two of the common ones are the barcode and the QR code. From the costliest of the brands to the poorest of poor, companies, products, or individuals, each is recognised by a code which like the human fingerprints or the iris is unique for each. We just need to scan these codes by a scanner or mobile app, and it gives you varied information about a product, individual or a company and even links you to their account.

Some of you may be knowing about these codes but a simplified way of understanding is necessary for most.

A barcode is a machine-readable optical label that contains information about the item to which it is attached. A barcode is a method of representing data in a visual, machine-readable form. Barcodes are used to identify products in stores. They provide information to a computer system, which is used to track inventory, item identification, pricing, and other data. Barcodes are also used to time track shipments, verify product authenticity, and manage returns.

In the initial phase, barcodes were parallel lines varying in width, spacing and size, referred to as linear or one-dimensional (1D), scanned by special optical scanners called barcode reader. Some have mathematical numbers mentioned below, the first six numbers of which is the manufacturer’s identification number, the next five digits represent the item’s number, and the last is a check digit which enables the scanner to determine if the barcode was scanned correctly. Two-dimensional (2D) variants were developed, using rectangles, dots, hexagons, and other patterns, called matrix codes or 2D barcodes, though they do not use bars. 2D barcodes can be read using purpose-built 2D optical scanners or by a digital camera connected to a microcomputer.

QR code (quick response) was developed by Mashahiro Hara, an employee of an automobile parts manufacturer Denso in Japan, in 1994. A QR code is two-dimensional version of the barcode that can be scanned using a smartphone camera and a QR code reader app, found on nearly all smartphone devices. After scanning, one will instantly have access to the data the code contains.

Traditional barcodes only store data horizontally, whereas QR codes store data horizontally and vertically. The popularity of the QR code is due to its fast readability and greater storage capacity compared to standard barcodes (holding hundred times more information). The QR code has become one of the most-used types of two-dimensional code.

QR codes are square-shaped images composed of tiny black-and-white pixel patterns. The series of tiny black-and-white squares represent specific bits of information that is otherwise unreadable to humans without scanning the code. A QR code consists of black squares arranged in a square grid on a white background, including some fiducial markers, which can be read by a camera, and processed using Reed–Solomon error correction until the image can be appropriately interpreted. The required data is then extracted from patterns that are present in both horizontal and vertical components of the image. The processor locates the three large distinctive squares (modules) at the corners of the QR code, using a smaller square (or multiple squares) near the fourth corner to normalise the image for size, orientation, and angle of viewing. The small dots throughout the QR code determine the number of rows and columns a code can contain, which are then converted to binary numbers and validated with an error-correcting algorithm. The latest version of the QR code is version 40 which contains 31,329 modules (squares) that help hold, send, and encode data. QR codes use four standardized encoding modes (numeric, alphanumeric, byte/binary, and kanji) to store data efficiently.

Anyone can generate a QR code using many QR code generators available as software or as online tools that are free or require a paid subscription. QR codes have becoming increasingly popular as a quick and easy way to share information with anyone.

QR codes have found their way into almost everything and their uses are myriad.

QR codes can be used to store and share various types of information such as text, URLs, and contact information. QR codes are used in marketing campaigns, and appear in magazines, on sign boards, on buses, on business cards, or on almost any object about which users might want information. On scanning the QR code, one can display text, contact information, connect to a wireless network, or open a web page in the phone’s browser (obviating the need for a user to type it into a web browser), to add a vCard contact to the user’s device, to open a Uniform Resource Identifier (URI), or to compose an email or text message.

QR codes have become common in consumer advertising, it provides a way to access a brand’s website more quickly than by manually entering a URL. Beyond mere convenience to the consumer, it helps the brand as it increases the conversion rate: the chance that contact with the advertisement will convert to a sale.

QR codes are used in storing personal information by organizations. QR codes can be used to store bank account information or credit card information, or they can be specifically designed to work with payment provider applications. In most countries QR code payment is a very popular and convenient method of making payments. Since Alipay designed a QR code payment method in 2011, mobile payment has been quickly adopted in China and around 90% of all payments are made via mobile payment. Bharat QR, a common QR code was launched in 2016 by RBI jointly developed by all the four major card payment companies – RuPay card along with MasterCard, Visa and American Express. It has the capability of accepting payments on the UPI platform and taken the present scene it has overtaken the cash transactions to a dismal low level.

QR codes have been used to establish “virtual stores”, where a gallery of product information and QR codes is presented to the customer, e.g. on a train station wall. The customers scan the QR codes, and the products are delivered to their homes.

After the COVID-19 pandemic QR codes began to be used as a “touchless” system to display information, show menus, or provide updated consumer information, especially in the hospitality industry. Restaurants can present a QR code near the front door or at the table allowing guests to view an online menu, or even redirect them to an online ordering website or app, allowing them to order and/or possibly pay for their meal without having to use a cashier or waiter.

QR codes are also present on all documents as a mode of verifying a particular document be it a certificate, a laboratory test report, a medicine strip, driving licence, Aadhar card, you name it and it is present on that item/document. QR code can used as an admission ticket to an event.

Multimedia QR codes direct users to specific multimedia content like videos, audios, images, documents, and any type of content accessible from the web. Local television stations have also begun to utilize codes on local newscasts to allow viewers quicker access to stories or information.

QR codes can be used to log into websites: a QR code is shown on the login page on a computer screen, and when a registered user scans it with a verified smartphone, they will automatically be logged in.

Serialised QR codes have been used by brands and governments to let consumers, retailers and distributors verify the authenticity of the products and help with detecting counterfeit products, as part of a brand protection program.

We can have certain problems related to these codes with malicious QR codes easily created and affixed over legitimate QR codes, a phenomenon known as “attagging”.

The QR code may not stop at payments and the advertisements, it has been incorporated into currency and to go a bit further a Japanese stonemason has started to engrave QR codes on gravestones, allowing visitors to view information about the deceased, and family members to keep track of visits. It is not far away that it will soon be tattooed on to one’s body to define that person in detail and track him till eternity.

Dr Muzafar Maqsood Wani, Consultant Nephrology, SKIMS, Soura

Disclaimer: The views and opinions expressed in this article are the personal opinions of the author.

The facts, analysis, assumptions and perspective appearing in the article do not reflect the views of GK.

Related Stories

No stories found.
Greater Kashmir