I understand the code itself is a different make up of black/white grids to get your phone to recognize a linked site. But at some point won’t we completely run out of possible image combinations making them obsolete or is it something that regenerates a new site to QR connection? (On mushrooms so I might not have asked this very well lmao)
Basically will we run out of QR codes and if not how is there an endless supply?
In: Technology
The thing about QR codes is they aren’t just a short code that links to the URL, they are the entire URL. It’s the equivalent of converting the URL into binary and then drawing the resulting 1s and 0s as black and white squares.
Therefore as long as we don’t “run out” of URLs we won’t run out of QR codes.
So one thing to keep in mind: QR codes are just a way of writing something (such as a url to a website) in a way a computer can easily make sense of it reliably. That is to say, QR codes are not “linked” to anything, they’re just a different way to write. You can use a QR code generator yourself to try it out and note same input always gives same QR code.
Now to answer your question, QR code combinations, that is to say, all the ways we can arrange the black and white squares to make unique messages, depending on standard, amount to more than there are atoms in the universe, so, in theory yes, in practice no.
QR code is more of an font than anything else. It doesn’t link to anything. It’s just a text written out in this specific “font”.
You can use QR codes for many different things than just urls. You can have ones with text, image, game,….
You can fit in them about 4296 alphanumeric characters, so that should give you a lot of combinations.
Think about a UPC code, those stripes you see on packages at the store. How those work is the thickness of the stripe encodes information, black lines are 1 and white lines are 0, so the computer scans it and sees something like 0001010100010101010110111010100101. That’s just a number, and computers are good at taking numbers and looking on a list to see what the number is for.
The QR code is like a two-dimensional version of that same thing. Because it’s 2D, they can pack more 1s and 0s into the same space, so it can include letters and other stuff instead of just numbers, which is why it’s used instead of a really long bar code.
QR codes are just zeroes and ones, black and white that can be converted from binary to text. You can cover up some of the code because some of the bits in the image are for redundancy and you can use some fancy math to fix the code. There are different sizes of QR codes so you can fit more content in them.
It is basically just the link or any other piece of text as ones and zeroes plus some extra to repair the text.
QR can store arbitrary information. Small black squares represent 1, white squares 0. This way you can directly construct binary numbers from it. These binary numbers can be a text (see ASCII table that converts 2 digit hex number – which is 2×8 binary digits – to a single character like ‘a’ or ‘X’). That’s how you can encode an URL or any other text into QR code.
However, you and me, we can create our own system, e.g.:
0000 …hello
0001 …something bad happen
0010 …I will come to you
0011 …do nothing
0100 …how are you?
0101 …good
0110 …bad
0111 …afraid
…etc.,
and then we can encode a message (one or more of these) into one QR code. So – we can create an app for us that will take that text, convert it to those numbers & those numbers it will put into QR code. On other phone, the same app could scan the QR, get those number from it and then convert those back to the original text.
QR codes can be big and store a lot of information. See
[https://en.wikipedia.org/wiki/QR_code#Design](https://en.wikipedia.org/wiki/QR_code#Design)
Interesting thing is also that QR codes are immune to damage or imprecise reading by the camera. Simple idea behind error correction codes is that you put there some additional information that helps in guessing what was the original, i.e. let’s encode just two words: “yes” and “no” like this:
00000 …yes
11111 …no
…then the message:
00100 00001 00111 11110 01001 10111
was probably “yes yes no no yes no”. If you receive e.g. “00111” it is more likely that it was “11111” than “00000”.
Answering the “can we run out of qr codes” part.
Could we? Yes. How many combinations are there? Yes.
There are bigger qr grids, different encoding methods, different ways to do error correction… So you can create different qr codes that contain the same data after coversion.
There are also useless qr codes: like creating a code for the text AAAAAAAAAAAAAAAAAA. So there are millions of qr codes that are already wasted.
Or unreadable codes, imagine a checkerboard pattern. You can’t read that (even if it had eyes and the 010101010 connecting lines between the eyes. Yes all qr have, by definition, lines of alternating black and white dots between the “eyes” of the code). A checkerboard pattern wouldn’t have a header to tell the size, encoding and error correction used. There a million of patterns that would not result in a complaining qr code.
Yet, there’s still millions of ways to create different URL addresses, presentation cards, mail addresses, WiFi info and all the other stuff a qr can contain like, even a game… https://youtu.be/ExwqNreocpg
QR code is simply a “pixelised” version of a string of characters.
Basically you start with the string you want to put: HTTP://REDDIT.COM then convert that into binary. To do so, you use the [ASCII table](https://www.asciitable.com/). This is a standard dating from the early computers that map each characters to a number. The result would be: 01001000 01010100 01010100 01010000 00111010 00101111 00101111 01010010 01000101 01000100 01000100 01001001 01010100 00101110 01000011 01001111 01001101.
You then add some more zero to fill up the space for the desired QR code size. You can’t have unused space, so you fill it up.
Then you take that, and encapsulate it into the QR stuff, which add some more informations and length and also some error detection and recovery data. The error recovery and detection stuff add more bits that allow to detect and fix some of the errors. It do so by adding some redundant data and some cleaver stuff.
Now, you pass those 1 and 0 into some encoding scheme. Basically what it do is prevent too many of the same value to be in a row, for example (not sure of the exact encoding), it can say that if there is more than 3 of the same values in a row then you invert the next bit. So if you have 1111000 you get like 11100010. This prevent a long space that is all black or all white and help to figure out the bits.
And finally you generate the white and black dots, with the QR decoration stuff in the corners and center. The decorations in the corners are to identify the orientation of the QR code, so it read it the right way. Also, the decoration in the center actually destroy some of the data in the QR code, but that data is recovered via the error detection and recovery mechanism. It therefore reduce the reliability of the QR code, but since it work many do use it. It just mean that damage to some other places in the code will probably make it fail to decode, while it may have been able to be recovered if that center part was not there, as it would have more recovery data present.
So will you run out of QR code? No, because the code contain the information itself and is generated based on that, and is not an ID of some sort. And this is also why there is different QR code size, some contain little information, so can be small, others is huge because it contain alot of informations.
Latest Answers