MAT 105 Fall 2008 Bar Codes.

Slides:



Advertisements
Similar presentations
Chapter 16: Check Digit Systems
Advertisements

Math for Liberal Studies.  Many of the ID numbers we have studied need to be represented in a way that is readable by machines  While computers can.
CSE 111 Representing Nonnumeric Data in a Computer.
MAT 105 Spring  We’re probably most familiar with seeing bar codes on the products we buy in the grocery store  However, machine-readable codes.
Mathematics in Management Science
Chapter 16: Identification Numbers Lesson Plan
MAT 1000 Mathematics in Today's World Winter 2015.
Positional Number Systems
Math for Liberal Studies.  A binary code is a system for encoding data made up of 0’s and 1’s  Examples  Postnet (tall = 1, short = 0)  UPC (dark.
Barcodes! Felipe Voloch These notes and the barcode program are available at /barcode.html.
Satellites (They really are fun). General Information Satellites are a combination of binary patterns that enable encrypted messages to be transferred.
1)Glue Standards for Unit 4 onto page 91 2) Page 93 Make the following table on the WHOLE sheet of paper :
Please Note: Do not complete answer sheets for the following exams:
AP CSP: Creating Functions & Top-Down Design
3.3 Fundamentals of data representation
DATA COLLECTION Data Collection Data Verification and Validation.
Regular Expressions 'RegEx'.
Please Note: Do not complete answer sheets for the following exams:
Digitized Attributes of Products
How to Use the Earthquake Travel Time Graph (Page 11
Polynomial Functions.
Binary Arithmetic Binary arithmetic is essential in all digital computers and in many other types of digital systems. Addition, Subtraction, Multiplication,
Error Correcting Code.
Programming Mehdi Bukhari.
Debugging and Random Numbers
FE – FI – FO – FIM Bars An Introduction to Facing Identification Marks and POSTNET bar coding on Envelopes.
Chapter 16: Identification Numbers Lesson Plan
Coding Schemes and Number Systems
2018 AP® Preadministration Session
Multiplication Pages
Topic 3: Data Binary Arithmetic.
2018 AP® Preadministration Session
MAT 105 Spring 2008 Chapter 17: Binary Codes.
Patterns and Algebraic rules
Significant Figures As you learned in a previous tutorial, an appropriate measurement for the length of the rectangle below is 3.76 cm. Because the “3”
Fractions.
GDSS – Digital Signature
Writing Methods AP Computer Science A.
Similar and Congruent Triangles
Credit Cards UPC Codes.
UPC, Bar codes, Zip + 4 (Post Net) Sol: DM.11
Dr. Clincy Professor of CS
Personalize Practice with Accelerated Math
DONE Need password feature
Key Words and Introduction to Expressions
Fundamentals of Data Representation
Digitized Attributes of Products
Mr Barton’s Maths Notes
Fractions Pages 8 – 59.
CS 101 – Sept. 4 Number representation Integer Unsigned √ Signed √
Patterns and Algebraic rules
Similar and Congruent Triangles
2013 AP® Preadministration Session
2018 AP® Preadministration Session
Any combination of the prime factorization.
2012 AP® Preadministration Session
Chapter 16: Check Digit Systems, Continued
How to Use the Earthquake Travel Time Graph (Page 11
How to Use the Earthquake Travel Time Graph (Page 11
Chapter 16: Identification Numbers Lesson Plan
ECE 352 Digital System Fundamentals
Please Note: Do not complete answer sheets for the following exams:
2017 AP® Preadministration Session
Starter.
ECE 352 Digital System Fundamentals
ECE 352 Digital System Fundamentals
Digital Representation of Data
Presentation transcript:

MAT 105 Fall 2008 Bar Codes

Bar Codes We’re probably most familiar with seeing bar codes on the products we buy in the grocery store However, machine-readable codes show up in many different places We’ve already seen the numbers printed on checks using magnetic ink; these numbers are readable by both machines and people

POSTNET The POSTNET code can be found on most mass-mail address labels, including junk mail and magazines POSTNET stands for POSTal Numeric Encoding Technique The code looks like this The sequence of light and dark bars represents the ZIP+4 of the address

Reading the Code There are 52 bars in total, some “tall” and some “short” The first and last bars are always tall; these are called guard bars and simply indicate where the code begins and ends The remaining 50 bars represent 10 digits (5 bars each): the ZIP + 4, plus a check digit

10 Digits, 10 Codes The codes are read using this chart: 0 – 1 – 2 – 3 – 4 – 5 – 6 – 7 – 8 – 9 –

Translating the Code Let’s translate this POSTNET code Using the chart (and remembering to ignore the very first and very last bars), we see that the code represents the digits 5555512372 The ZIP+4 represented here is 55555-1237, and the check digit is 2

POSTNET Check Digits The check digit is chosen so that the sum of all the digits (including the check digit) ends in a zero Sometimes POSTNETs don’t have 10 digits If the “plus 4” part of the ZIP code is missing, there will be 6 total digits (5 digit ZIP code plus check digit) Sometimes there are 2 additional digits (called the “delivery point”) when the ZIP+4 isn’t enough information

Try It Yourself If you look at a piece of junk mail that has a POSTNET code on it, check to make sure that you can translate the sequence of tall and short bars into the ZIP code shown on the label

POSTNET Errors You may have noticed that in the POSTNET code, all of the bar patterns have exactly two tall bars and three short bars This allows the system to not only detect, but also correct errors

An Example Consider the POSTNET bar code shown here Show that this code has an error Use the check digit to correct the error lılıılılıılllııılııılıllııılıllııllııılıllılııılııll We can tell that the code is 44076-?3294 Using the check digit, we can tell that the unknown digit must be 1

UPC Bar Codes We have already discussed the 12 digit UPC How is the pattern of light and dark vertical bars related to this code? The bars represent those digits in a way that can be read by scanners (such as those in the supermarket)

Looking at a Bar Code The light and dark bars represent patterns of 0’s and 1’s Light = 0, Dark = 1

Zooming In 10101111010011001001…

The Parts of the UPC Bar Code Similar to the guard bars at the beginning and end of the POSTNET bar code, the UPC bar code has certain features that help the scanner determine how to read the code One problem that scanners encounter is that bar codes on different products have different sizes

Breaking It Down The bar code breaks down like this: 101 – the code starts with this alternating pattern to help the scanner determine how wide each bar is First 6 digits – each digit is represented by 7 bars 01010 – this code separates the left-hand side of the code from the right-hand side Last 6 digits – each digit is again represented by 7 bars 101 – the code ends like it begins, with another “guard” pattern

Binary Coding The code for translating digits 0-9 into light and dark bars is binary Binary means we only have two options: 0 or 1, light or dark The POSTNET code is also binary: tall or short

Rules for Encoding UPC Bar Codes Use the following table to determine how to translate from digits 0-9 to sequences of 0’s and 1’s Notice that the rules are different for “left side” digits versus “right side” digits Digit Left-side Right-side 0001101 1110010 1 0011001 1100110 2 0010011 1101100 3 0111101 1000010 4 0100011 1011100 5 0110001 1001110 6 0101111 1010000 7 0111011 1000100 8 0110111 1001000 9 0001011 1110100

Why Different Rules? Why would we use different rules for the left side and the right side? Notice that all the left-side digits have an odd number of 1’s and the right-side digits have an even number of 1’s This allows the scanner to read the code even if the code is upside down!

Reading a Code Use the table from the previous slide to decode this UPC bar code Answer: 0-71662-01402-5