Technology

How a QR code stores text

A QR code is a square of black and white modules. The pattern is a short piece of text, written so a camera can read it even if part of the square is damaged.

A printed QR code.
Photograph by Pavanaja. CC BY-SA 4.0. Wikimedia Commons. A printed QR code.

The square is a grid. Each small module is on or off, like a bit. The bits encode characters: an address, a ticket number, a line of text. A larger grid holds a longer message. The code is not a photograph of anything. It is a sentence in a stiff visual alphabet.

Three big squares in the corners tell the camera where the code is and which way is up. Smaller patterns tell it the size of the grid and keep the timing. Without those finder patterns, a page of random modules would be a puzzle. With them, a phone can lock on quickly, in ordinary light, at an angle.

A grid, not a picture

The message is not written once and hoped for. Extra modules carry a check, so that if a corner is torn or a module is misread, the original text can often be rebuilt. How much damage is tolerable depends on the level of that extra information. More checking means less room for the message.

What you do with the text is a separate step. If the text is a web address, the phone offers to open it. The code did not fetch the page. It only handed over the address. A code on a poster can point anywhere the printer chose, which is why the address itself deserves a glance before you follow it.

Finding it and checking it

Codes can be printed small because the camera, not the eye, does the reading. They fail when the print is blurred, when the contrast is too low, or when a logo covers the patterns the camera needed. A quiet zone of plain paper around the square is part of the design.

The same idea, in an older and narrower form, is the barcode on a tin. QR is the square version, built to hold more and to be read by a camera rather than a laser.

A grid, not a picture

A QR code is a square of black and white modules. The pattern is a short piece of text, written so a camera can read it even if part of the square is damaged. The square is a grid. Each small module is on or off, like a bit.

Put those two statements side by side. The first sets the condition. The second says what happens once that condition is met. How a QR code stores text needs both. Drop the first and the second has nothing to explain. Drop the second and the first is only the scene.

Finding it and checking it

Each small module is on or off, like a bit. The bits encode characters: an address, a ticket number, a line of text.

The order is the explanation. What the first sentence names has to be there before the result in the second sentence can show up. The piece does not ask you to accept the result first and hunt for a cause afterwards.

A check you can make

The bits encode characters: an address, a ticket number, a line of text. A larger grid holds a longer message.

A fair check is sequential. Confirm the first statement. Then see whether the second is the result of it, rather than a separate fact parked in the same piece. If the result shows up without the condition, this account does not cover what you are looking at.

The limit of the claim

A larger grid holds a longer message. The code is not a photograph of anything.

The two statements do different jobs. One says what is there, what it is made of, or what acts on it. The other says the change that follows. The title names the change. It is not an inventory of parts.

The same steps, in order

The code is not a photograph of anything. It is a sentence in a stiff visual alphabet.

Nothing in the second statement cancels the first. It carries the first forward or marks the limit of it. Remember only the result, and the cause goes missing. Remember only the cause, and you will not know what the piece says happens next.

Why the order matters

It is a sentence in a stiff visual alphabet. Three big squares in the corners tell the camera where the code is and which way is up.

Read them as one path. Start at the first full stop and do not skip to the outcome. The words between the two statements are the mechanism. The title is the name of that path, not a second claim.

Condition, then outcome

Three big squares in the corners tell the camera where the code is and which way is up. Smaller patterns tell it the size of the grid and keep the timing.

The first statement can be true and still not finish the job. The second statement is the job finishing. Hold both, and the paragraph above stops being a list. It becomes the reason the title is worded as it is.

What the title is naming

Smaller patterns tell it the size of the grid and keep the timing. Without those finder patterns, a page of random modules would be a puzzle.

If you wanted a shorter version, it would be those two sentences and nothing else. Everything added around them is there so the dependence is obvious: the second does not happen unless the first has happened.

What has to come first

Without those finder patterns, a page of random modules would be a puzzle. With them, a phone can lock on quickly, in ordinary light, at an angle.

Put those two statements side by side. The first sets the condition. The second says what happens once that condition is met. How a QR code stores text needs both. Drop the first and the second has nothing to explain. Drop the second and the first is only the scene.

The result that follows

With them, a phone can lock on quickly, in ordinary light, at an angle. The message is not written once and hoped for.

The order is the explanation. What the first sentence names has to be there before the result in the second sentence can show up. The piece does not ask you to accept the result first and hunt for a cause afterwards.

A check you can make

The message is not written once and hoped for. Extra modules carry a check, so that if a corner is torn or a module is misread, the original text can often be rebuilt.

A fair check is sequential. Confirm the first statement. Then see whether the second is the result of it, rather than a separate fact parked in the same piece. If the result shows up without the condition, this account does not cover what you are looking at.

The limit of the claim

Extra modules carry a check, so that if a corner is torn or a module is misread, the original text can often be rebuilt. How much damage is tolerable depends on the level of that extra information.

The two statements do different jobs. One says what is there, what it is made of, or what acts on it. The other says the change that follows. The title names the change. It is not an inventory of parts.

The same steps, in order

How much damage is tolerable depends on the level of that extra information. More checking means less room for the message.

Nothing in the second statement cancels the first. It carries the first forward or marks the limit of it. Remember only the result, and the cause goes missing. Remember only the cause, and you will not know what the piece says happens next.

Why the order matters

More checking means less room for the message. What you do with the text is a separate step.

Read them as one path. Start at the first full stop and do not skip to the outcome. The words between the two statements are the mechanism. The title is the name of that path, not a second claim.

Condition, then outcome

What you do with the text is a separate step. If the text is a web address, the phone offers to open it.

The first statement can be true and still not finish the job. The second statement is the job finishing. Hold both, and the paragraph above stops being a list. It becomes the reason the title is worded as it is.

What the title is naming

If the text is a web address, the phone offers to open it. The code did not fetch the page.

If you wanted a shorter version, it would be those two sentences and nothing else. Everything added around them is there so the dependence is obvious: the second does not happen unless the first has happened.

What has to come first

The code did not fetch the page. It only handed over the address.

Put those two statements side by side. The first sets the condition. The second says what happens once that condition is met. How a QR code stores text needs both. Drop the first and the second has nothing to explain. Drop the second and the first is only the scene.

The result that follows

It only handed over the address. A code on a poster can point anywhere the printer chose, which is why the address itself deserves a glance before you follow it.

The order is the explanation. What the first sentence names has to be there before the result in the second sentence can show up. The piece does not ask you to accept the result first and hunt for a cause afterwards.

A check you can make

A code on a poster can point anywhere the printer chose, which is why the address itself deserves a glance before you follow it. Codes can be printed small because the camera, not the eye, does the reading.

A fair check is sequential. Confirm the first statement. Then see whether the second is the result of it, rather than a separate fact parked in the same piece. If the result shows up without the condition, this account does not cover what you are looking at.

The limit of the claim

Codes can be printed small because the camera, not the eye, does the reading. They fail when the print is blurred, when the contrast is too low, or when a logo covers the patterns the camera needed.

The two statements do different jobs. One says what is there, what it is made of, or what acts on it. The other says the change that follows. The title names the change. It is not an inventory of parts.

The same steps, in order

They fail when the print is blurred, when the contrast is too low, or when a logo covers the patterns the camera needed. A quiet zone of plain paper around the square is part of the design.

Nothing in the second statement cancels the first. It carries the first forward or marks the limit of it. Remember only the result, and the cause goes missing. Remember only the cause, and you will not know what the piece says happens next.

Why the order matters

A quiet zone of plain paper around the square is part of the design. The same idea, in an older and narrower form, is the barcode on a tin.

Read them as one path. Start at the first full stop and do not skip to the outcome. The words between the two statements are the mechanism. The title is the name of that path, not a second claim.

Condition, then outcome

The same idea, in an older and narrower form, is the barcode on a tin. QR is the square version, built to hold more and to be read by a camera rather than a laser.

The first statement can be true and still not finish the job. The second statement is the job finishing. Hold both, and the paragraph above stops being a list. It becomes the reason the title is worded as it is.

What the title is naming

The square is a grid. Each small module is on or off, like a bit.

If you wanted a shorter version, it would be those two sentences and nothing else. Everything added around them is there so the dependence is obvious: the second does not happen unless the first has happened.

What has to come first

Each small module is on or off, like a bit. The bits encode characters: an address, a ticket number, a line of text.

Put those two statements side by side. The first sets the condition. The second says what happens once that condition is met. How a QR code stores text needs both. Drop the first and the second has nothing to explain. Drop the second and the first is only the scene.

The result that follows

The bits encode characters: an address, a ticket number, a line of text. A larger grid holds a longer message.

The order is the explanation. What the first sentence names has to be there before the result in the second sentence can show up. The piece does not ask you to accept the result first and hunt for a cause afterwards.

No correction has been appended to this story. If a line is wrong, tell the newsroom.