A question about bar codes and qr codes

What information can be coded with each, for instance I know a bar code can be read by machine to mean “peaches canned delmonte 16oz” at the piggly wiggly or “jeans wrangler 33x40” at the local farm fuel feed and sundries and I’ve seen qr codes on all the cars at the auction.

But can I scan a copy of “Where The Sidewalk Ends” and have the computer spit out a barcode or qr code that another computer would read out as the text of that book? Or perhaps a copy of Picasso’s Guernica?

A QR code can contain 4290 alpha numeric characters, so you can encode anything you can fit in there. UPC codes on products only contain the UPC number, the scanner has to do a lookup on a database to find out that it’s a can of peaches and it is priced at $1.29.

A barcode only encodes a number. Usually, that number is printed right under the bar code, so no… no book.

The highest (current) density QR code can store about 7000 numbers, OR about 4300 Alphanumeric characters, OR about 3000 8 bit bytes of data. Enough for perhaps a synopsis, or more usually, a link to a site with the text of the book, but not a book by itself.

Ah, ok. Just wondered because I saw a barcode used as art yesterday (huge, framed and glazed) and it made me wonder.

That number is usually GTIN blocks of which are assigned by GS1 to various retailers to give unique numbers to their products. So the mapping from “024000010623” to “Del Monte Peaches 16OZ” happens externally.

You can look up information about specific codes at: Verified by GS1 | Barcode GTIN GLN Company Lookup Verification . For example, it shows that all codes that start with 02400 are Del Monte products.

Yep. This way than can manage stock and know when to order more as well as change the price on the fly. It’s all in an external database.

Hit save too soon…

Different bar code symbologies have different character sets. Some symbologies only encode numbers, while others include alphabetic and other characters. Some have different modes that determine the character set. So it all depends on which symbology is used.

Aww, man. I was going to explain how you got from a bar code to “peaches canned delmonte 16oz”, but it’s already been done.

Instead, I’ll tell a story related to this. I used to work in IT for a major craft chain which sold puzzles (among other things). Puzzles were sold to us in thematic assortments: landscapes, castles, fantasy, etc.

We actually had two fields to store descriptions - the full description, and a shorter description to be printed on receipts. We usually got the regular description from the vendor, and the system would generate the shorter description. The people who were responsible for putting new items into the database were supposed to verify that the shorter description was good. That didn’t always happen.

Which is how someone in the deep south got a receipt that said something along the lines of “Scenic Castle Ass” This had to be fixed right away, so I did the change. I also searched for other items that could have the problem.

My favorite is still “Fuzzy Kitten Ass”

A barcode can encode anything you want, numbers, letters, etc., but due to the physical presentation, the number of characters is limited. For example, a code 128 barcode has a maximum of 48 characters.

A 2D barcode encodes information vertically as well as horizontally, which allows for more character density. You can see examples on parcel carriers shipping labels like FedEx.

A QR code is just one type of 2D barcode.

Slight correction: typically the UPC/GTIN is assigned by the company that created the product and the retailers just use that UPC/GTIN. In other words, retailers like Macy’s or Amazon don’t typically assign the UPC/GTIN for items purchased from vendors.

But that’s the largest version of the QR code, which looks like this. And with the least amount of error correction.

Which is why QR codes are generally used to communicate a web address or some code (e.g. package tracking number) rather than containing a lot of useful information by itself.

I could answer most of the questions here, but I waited 8 hours to see this thread and they have already been answered. SDMB is just too fucking fast.

I learned about multiple barcodes when I programmed a S100 circuit board to read all of the codes in use at the time, and to drive any dot-matrix printer to print each as well. Quite an experience.

We thought we’d sell thousands, but we only sold 3 of them. I guess the time wasn’t right for mass use.

Give this a scan.

Many years ago I bought my wife a present from my local jewellery store which bore the name of its proprietor, for the sake of the example his name was Ben Cohen. On my visa bill the description appeared as “BEN COHEN JEW”

The last time I renewed my Canadian passport, you filled out the form with Adobe Reader and then printed it for submission. All of the entered data appeared in the QR code so the scanner didn’t even have to OCR the page

Beautifully done.

Since the question’s been answered, here’s a solution that’s got even more information in a compact package: The complete works of Shakespeare encoded inside a .jpg file.

I’ve always wondered how much info is encoded on a barcode. Like the particular batch of canned peaches…where they were distributed to, ect. I’m thinking about something like the Tylenol poisoning. Could you find out where the product came from just from the barcode. Or if you return the canned peaches to a different store…could they say, “nope, wasn’t purchased here!”

From the standard UPC/GTIN-12 code, none of that. Generally the first half of the code is the manufacturer, and the second half is the specific item from that manufacturer.

Manufacturers can choose to put more complex information on their packaging, but that wouldn’t be in the UPC.

Yep. At my last job, one of the things we implemented was new pharmacy software, and we had the option of getting linear or 2D barcode readers. Linear (Code 128, I believe) readers could read the NDC code off the bottles, while the 2d codes had room for a lot more- lot number and expiration date, for example.