Tuesday, October 4, 2016

Math and Bar Codes

Bar Code, Bar Code Label, Product, Id  We see bar codes all around us.  On food, qr codes, business cards, airline boarding passes, everywhere.  Have you ever wondered about how to read a bar code or the math behind them?  I hadn't until I ran across something on them and then, yes it got me to wanting to learn more about them.

To start with, how do you read the information?  What does it contain.  I found this lovely Prezi which does a lovely job of introducing UPC codes in understandable language. 


 this lovely pdf that explains how the black and white stripes convey information based on the width of the stripes.  The article starts with reading a UPC code found on items in the grocery store.  The 12 digit code contains information on the manufacturer and the inventory of the number.  You learn to read the code based on the stripes. It goes on to explain the check code in the sequence. 

The check code is used to determine if this is a valid UPC code. The total of all the numbers after being run through the algorithm must total a multiple of 10 or it is not valid.  The code reader goes through this every time a bar code is read.  The pdf includes 15 exercises so students can practice reading bar codes.

At Cut The Knot, there is a series of articles covering Bar Codes from encoding (both types), an applet which allows the student to explore reading bar codes on food, to three types of bar codes including ISBN numbers seen on books and textbooks.  This allows students to learn more about bar codes.

Finally, from Oregon State University, a work sheet on finding information from bar codes and creating bar codes.  This worksheets gives real scenarios such as the scanner goes down and the clerk has to type the code in by hand, can you find the mistake?  Or is it a valid number? 

Tomorrow I'm exploring QR codes in more detail. Although they are a type of bar code, they are enough different one cannot read them quite as easily.