1 Cracking the Code Moshe Kam, VP for Educational Activities A Presentation to IEEE TISP workshop in Piura Peru August 2007 Version 001 29 July 2006.

Slides:



Advertisements
Similar presentations
Barcoding For Beginners
Advertisements

1 Cracking the Code Moshe Kam IEEE Educational Activities IEEE TISP workshop in Piura Peru Participant Guide August 2007 Version July 2007.
Math for Liberal Studies. An identification number is a sequence of letters and/or numbers that identifies an object, person, place, or concept The number.
CIP4 Tutorial and Developer Sessions Sunday, November Sofitel Strasbourg Lieven Plettinck JDF 1.3 in Packaging and Labels.
Retail Bar Coding Basics a Tutorial. Is bar coding necessary? Reasons for UPC bar codes. Want to sell your products via retail stores. Products are sold.
Math for Liberal Studies.  None of the methods we have investigated so far can detect transposition errors  In this section we will investigate new.
MAT 1000 Mathematics in Today's World Winter 2015.
MAT 1000 Mathematics in Today's World Winter 2015.
UPC Codes: Universal Product Codes or Universally Producing Confusion?
Identification Numbers
Summary of lecture 4 We are accustomed to count like 1,2,3,4,5,6,7,8,9,10,11,12,… This is called counting in base 10 – the second digit tells us how many.
Bar codes: The little symbol that could Nikki Candelore Discrete Math: Summer ’08 Professor Langston.
BAR CODE TECHNOLOGY AND ITS APPLICATION TO LIBRARY SERVICES I R N GOUDAR HEAD, ICAST NATIONAL AEROSPACE LABORATORIES BANGALORE
PhRMA Presentation to FDA: Bar Codes to Reduce Medication Errors
Barcode UPC ( Universal Product Code)  Commonly known as barcode  “Barcodes are black and white lines of varying widths followed underneath by a series.
Barcodes and ISBN numbers: which are better at detecting errors? Virtually all packaged products have a barcode on so that optical readers can recognise.
Chapter 16: Identification Numbers Lesson Plan
Professor Koon ISE 370 Barcodes. Professor Koon ISE 370 Code Reading Technology  Original Barcode Readers Contact Wand.
© All Rights Reserved Barcodes How does a barcode reader work?
MAT 1000 Mathematics in Today's World Winter 2015.
BAR CODE. HISTORY The first idea about Barcode was developed by Bernard Silver and Norman Joseph Woodland in Bernard SilverNorman Joseph Woodland.
BAR CODE SCANNER A.ANUSHA (06N61A0402). What is bar code? A barcode is a machine readable representation of information. Barcode stores data in widths.
 By the end of this, you should be able to state the difference between DATE and INFORMAITON.
Evolution of Product Identification Standards: From UPC to GTIN to EPC to RFID Richard Randall Business Advisor July 13, 2004 Presented to:
Identification Numbers and Error Detection Meredith Wachs.
Wong Wai Ling, Lam Pui Ki Identification number  clearly identify a person or a thing Check digit  an extra digit for the purpose of error.
Pharmacy Set up Bedside Medication Verification. Pharmacy Toolbox Parameters.
Encoding, Validation and Verification Chapter 1. Introduction This presentation covers the following: – Data encoding – Data validation – Data verification.
Cosc 2150: Computer Organization
Modular Arithmetic, The Codabar System, and applications Tomás Cometto and Daniel Stokley Linear Systems 5/1/06.
Fault Tolerance CDA 5140 Spring 06 Everyday FT. Background Use of check digits for error detection on everyday applications used extensively but most.
Supply Chain Management Technology & Applications Technology: A pervasive factor in Logistics Fulfillment.
Lecture 12.  The ISBN 10-digit uses a reverse weighting system: multiply the first digit by 10, the second by 9, the third by 8 and so on until the check.
Checking data GCSE ICT.
Barcodes What information does this barcode tell the shop?
0 Glencoe Accounting Unit 2 Chapter 7 Copyright © by The McGraw-Hill Companies, Inc. All rights reserved. Unit 2 The Basic Accounting Cycle Chapter 3 Business.
Spring 2015 Mathematics in Management Science Identification Numbers Data Security Check Digits UPCs, Routing Nos, Bar Codes Personal Data.
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.
Cracking the Code: The Barcode Computer barcodes Thirty years ago marked the launch of the Universal Product Code. Requires cooperation between food.
Data and information. Information and data By the end of this, you should be able to state the difference between DATE and INFORMAITON.
AS computing Validation and verification. Introduction It is important to maintain the integrity of any database of information. Any data item must always.
Barcodes! Felipe Voloch These notes and the barcode program are available at /barcode.html.
Verification & Validation. Batch processing In a batch processing system, documents such as sales orders are collected into batches of typically 50 documents.
IGCSE ICT Stock Control.
1 AQA ICT AS Level © Nelson Thornes 2008 Good quality data and information Data terms.
YES ! BARCODE Technology : Behind The Lines ! Barcode Definition  A Barcode is an optical machine-readable representation of data relating to the object.
PROGRAMMING IN PYTHON LETS LEARN SOME CODE TOGETHER!
Check Digits Tanli Su. Introduction -identification numbers are used to easily identify people, products, books, accounts, credit cards, driver's licenses,
Bar Code / QR Code Design Created and Presented by Ms. Steinmetz.
ECE DIGITAL LOGIC LECTURE 15: COMBINATIONAL CIRCUITS Assistant Prof. Fareena Saqib Florida Institute of Technology Fall 2015, 10/20/2015.
Marketing Essentials Chapter 16 Section 2.  After the sale is finalized, the sale is considered closed.  All cash registers provide three basic sales.
This is an individual character that consists of bands of image and space between them, thus illustrating the machine code of letters and numbers in binary.
Barcode/QR Code Technology
MAT199: Math Alive Error corretcing and compression Ian Griffiths Mathematical Institute, University of Oxford, Department of Mathematics, Princeton University.
Various types of barcodes exist today, each of them with unique symbologies and functions. The symbology of any given barcode is, essentially, its technical.
Barcode Vartika Agarwal Accurate institute of management and technology Computer science(3 rd year)
DATA COLLECTION Data Collection Data Verification and Validation.
Digitized Attributes of Products
Chapter 16: Identification Numbers Lesson Plan
Barcode/QR Code Technology
Keeper 8: UPC Codes S.A.S. #12 1 – 3 Credit Cards S.A.S. #
MAT 105 Spring 2008 Chapter 17: Binary Codes.
Credit Cards UPC Codes.
Objectives TO UNDERSTAND THAT CAPTURING DATA IS VALIDATED AND VERIFIED TO CHECK THAT IT IS REASONABLE AND CORRECT.
Name: Form: What Are Bar-codes
Digitized Attributes of Products
Chapter 16: Check Digit Systems, Continued
Communicating Efficiently
Chapter 16: Identification Numbers Lesson Plan
Jim Rafferty :CueCat howstuffworks.com Jim Rafferty
Presentation transcript:

1 Cracking the Code Moshe Kam, VP for Educational Activities A Presentation to IEEE TISP workshop in Piura Peru August 2007 Version July 2006

2 A Note on Sources l This presentation is based on multiple on-line and other archived sources l See bibliography page for a list

3 The History of Bar Codes

4 Bar Code l A machine-readable representation of information in a visual format on a surface l Using dark ink on white substrate l Creating high and low reflectance, which is converted to 1s and 0s l Used for computer data entry through optical scanners l Barcode readers

5 History l Bernard Silver ( ), a graduate student at Drexel Institute of Technology in Philadelphia, overheard the president of a local food chain asking one of the deans to undertake research to develop a system to automatically read product information during checkout. l Silver told his friend, Norman Joseph Woodland, about the food chain president's request l Woodland was a twenty seven year old graduate student and teacher at Drexel l The problem fascinated Woodland and he began to work on it

6 History l Officially, Jordin Johanson, Bernard Silver and Norman Joseph Woodland from Drexel Institute of Technology invented the Bar Code in 1948 l Woodland described how he ‘elongated’ the Morse Code on the sand while at the beach to develop the key idea l Applied for patent in 1949 l Granted 1952 l U.S. patent 2,612,994 l "Classifying Apparatus and Method."

7 Norman Joseph Woodland l Born 1921 l WWII – Technical Assistant at the Manhattan Project l BSME, Drexel 1947 l Lecturer at Drexel l Joined IBM in National US Medal of Technology ceremony

8 First industrial application of automatic identification l Late 1950s: The Association of American Railroad decide to fund automatic identification l 1967: optical bar code l October 10, 1967: car labeling and scanner installation begins l 1974: 95% of the fleet is labeled l l Late 1970s: system abandoned

9 A long road to commercialization l Bar code was not commercialized until 1966 l The National Association of Food Chains (NAFC) put out a call to equipment manufacturers for systems that would speed the checkout process. l l In 1967 RCA installed one of the first scanning systems at a Kroger store in Cincinnati l The product codes were represented by "bull's- eye barcodes", a set of concentric circular bars and spaces of varying widths.

10 A long road to commercialization l 1970: “Universal Grocery Products Identification Code (UGPIC)” l l 1970: The U.S. Supermarket Ad Hoc Committee on a Uniform Grocery Product Code l 1973 the Committee recommended the adoption of the UPC symbol set still used in the USA today l UPC was submitted by IBM and developed by George Laurer

11 A long road to commercialization 1974 l June 1974: one of the first UPC scanner, made by National Cash Register Co., was installed at Marsh's supermarket in Troy, Ohio l June 26, 1974, the first product with a bar code was scanned at a check-out counter l A 10-pack of Wrigley's Juicy Fruit chewing gum l On display at the Smithsonian Institution's National Museum of American History

12 A long road to commercialization US DoD mandates use l September 1, 1981: the United States Department of Defense adopted the use of Code 39 for marking all products sold to the United States military l This system was called LOGMARS

13 Bar Codes Today l $16-billion-a-year business l l 600,000 manufacturing companies l 5 billion scans a day l UPC codes account for half of today's bar code technology

14 The UPC Code

15 The UPC-A Code l UPC version A barcodes (12 digits) l UPC version E shortened version (8 digits) l ISBN-13 barcodes on books l ISSN symbols on non-U.S. periodicals l EAN-13 and EAN-8 are used outside the U.S. l JAN-13 and JAN-8 are used in Japan Vendor number (5) Product number (5) Checksum Digit (1) Prefix (1) A 1 A 2 A 3 A 4 A 5 A 6 A 7 A 8 A 9 A 10 A 11 A 12

16 Restrictions: Prefix (A 1 ) l 0, 1, 6, 7, 8, or 9 for most products l l 2 reserved for local use (store/warehouse), for items sold by variable weight l 3 reserved for drugs by National Drug Code number l 4 reserved for local use (store/warehouse), often for loyalty cards or store coupons l 5 reserved for coupons A 1 A 2 A 3 A 4 A 5 A 6 A 7 A 8 A 9 A 10 A 11 A 12

17 The Checksum Digit

18 Checksum Digit Calculation (A 12 ) l Add the digits in the odd-numbered positions (first, third, fifth, etc.) together and multiply by three l Add the digits in the even-numbered positions (second, fourth, sixth, etc.) to the result l Calculate how much you need to add so that the number become a multiple of 10 l The answer is the checksum digit (A 12 )

19 In symbols l Calculate l 3 (A 1 + A 3 + A 5 + A 7 + A 9 + A 11 ) + A 2 + A 4 + A 6 + A 8 + A 10 = S l How much do we have to add to S to make it a multiple of 10 l If S=2 we need to add 8 to make it 10 l If S=17 we need to add 3 to make it 20 l If S=45 we need to add 5 to make it 50

21 l Add the digits in odd- numbered positions l SO = = 28 l Multiply by 3 l SO3 = 28 times 3 =84 l Add the digits in even- numbered positions (but not the 12 th ) l SE = = 18 l Add SO3 to SE l S= = 102 l How much you need to add so that S become a multiple of 10 l To get to 110 we need to add 8 l So the checksum digit is

23 l Add the digits in odd- numbered positions l SO = = 29 l Multiply by 3 l SO3 = 29 times 3 =87 l Add the digits in even- numbered positions (but not the 12 th ) l SE = = 16 l Add SO3 to SE l = 103 l How much you need to add so that S become a multiple of 10 l To get to 110 we need to add 7 l So the checksum digit is ?

24 l Add the digits in odd- numbered positions l SO = = 29 l Multiply by 3 l SO3 = 29 times 3 =87 l Add the digits in even- numbered positions (but not the 12 th ) l SE = = 16 l Add SO3 to SE l = 103 l How much you need to add so that the number become a multiple of 10 l To get to 110 we need to add 7 l So the checksum digit is

25 Activity 1 Detect the Fake Products!

26 Activity 1: detect the fake products! l You are given four products l Some of them are original l Some of them are cheap imitations l The imitators did not know about calculating the checksum digit properly l Which one of the products are original and which are fake?

27 Rolex Watch Wrangler Jeans A DVD Player A Personal Digital Assistant

28 Rolex Watch Wrangler Jeans A DVD Player A Personal Digital Assistant

29 Watch – authentic or not?

30 Jeans – authentic of not?

31 PDA – authentic or not?

32 DVD Player – authentic or not?

33 The UPC bar code as an Error Detecting Code

34 The UPC barcode detects single errors l If any one of the digits is corrupted, then there will be an error in the checksum digit calculation and we will know that an error has occurred

35 Detecting an error l If there is an error of +m (m>0) in A 2 A 4 A 6 A 8 A 10 then the checksum digit does not calculate correctly l If is New_A 2 = Old_A 2 + m where m>0 l If the check digit A 12 is greater than or equal to m (Old_A 12 ≥ m) l New_A 12 = Old A 12 -m l If the check digit A 12 is less than m (A 12 < m) l New_A 12 = 10 - (m- Old_A 12 ) This material is for the teacher

36 Detecting an error l If there is an error of +m in A 1 A 3 A 5 A 7 A 9 A 11 then the checksum digit does not calculate correctly l If is New_A 1 = Old_A 1 + m where m>0 l If the checksum digit A 12 is greater than or equal to 3m (A 12 ≥ 3m) l New_A 12 = Old A m l If the checksum digit A 12 is less than 3m (A 12 < 3m) l New_A 12 = 10 - (3m - Old_A 12 ) This material is for the teacher

37 New_A 1 = Old_A 1 + m ConditionChange in A 12 Old_A 12 ≥ 3mNew_A 12 = Old A m 0 < 3m – Old_A 12 ≤10New_A 12 = 10 – (3m – Old_A 12 ) 10 < 3m – Old_A 12 ≤20New_A 12 = 20 – (3m – Old_A 12 ) 20 < 3m – Old_A 12 New_A 12 = 30 – (3m – Old_A 12 ) This material is for the teacher

38 Activity 2 The Checksum Digit

39 Activity 2: effect of error on the checksum digit l Use code to draw the value of the checksum digit against all possible values of l A 2 (A 2 = 0, 1, 2, 3, 4, 5, 6, 7, 8, 9) l A 3 (A 3 = 0, 1, 2, 3, 4, 5, 6, 7, 8, 9)

40 Value of digit A 2 Value of checksum digit

41 Value of digit A 3 Value of checksum digit

42 Activity 3 Properties of the Code

43 Activity 3: Answer a few questions… l Based on activity 2 – does it appear that if there is a single error in one of the digits, this code will detect it? l If there is a single error in one of the digits, will this code tell us which digit is wrong? l Prove your answer!

44 Activity 3 (continued) l Can this code always distinguish between a single error (an error in one and only one of the digits) and two errors (simultaneous errors in two digits)? l Prove your answer! l Is it possible that two errors will occur simultaneously and we will not be able to detect them using this code? l Prove your answer!

45 Error Correcting Code What happens if one of the digits is missing?

46 Code: l l 3( )+( )=103 l So to complete to 110 we needed 7 l Now suppose the fourth digit (4) is missing (M) l 025M

47 Code 025M l Can we find M? 3( )+(2+M+7+0+3)+7= 106+M l We know that the only number that would add to 106 to create the nearest multiple of 10 is 4 l = 110 l So if the single digit 4 was missing the code can reconstruct it

48 Second example: Code 02M l Can we find M? 3(0+M )+( )+7= 95+ 3M l This is harder… l What is the closest multiple of 10? l If it is 100 then 3M=5 l No, because M is not an integer l If it is 110 then 3M=15 and M=5 l If it is 120 then 3M=25 and M is greater than 9 and non-integer

49 Second example: Code 02M l Can we find M? 3(0+M )+( )+7= 95+ 3M l This is harder… l What is the closest multiple of 10? l If it is 100 then 3M=5 l No, because M is not an integer l If it is 110 then 3M=15 and M=5 l If it is 120 then 3M=25 and M is greater than 9 and non-integer

50 Third example: Code M06387 l Can we find M? 3(0+5+6+M+6+8)+( )+7= 98+ 3M l What is the closest multiple of 10? l If it is 100 then 3M=2 l No, because M is not an integer l If it is 110 then 3M=12 and M=4 l If it is 120 then 3M=22 and M is not an integer

51 Third example: Code M06387 l Can we find M? 3(0+5+6+M+6+8)+( )+7= 98+ 3M l What is the closest multiple of 10? l If it is 100 then 3M=2 l No, because M is not an integer l If it is 110 then 3M=12 and M=4 l If it is 120 then 3M=22 and M is not an integer

52 Activity 4 Find the Missing Digit

53 Activity 4: Find the Missing Digit 014M M

54 Answers

55 Transposition Error

56 Transposition error l Transposition error occurs when two adjacent digits interchange places Example l becomes l Does the UPC barcode correct transposition errors?

57 Transposition errors l If the digits A i and A i+1 are interchanged then the check sum would l change by either: l 3A i + A i+1 – 3A i+1 – A i = 2(A i – A i+1 ) l or l A i + 3 A i+1 – A i+1 – 3A i = 2(A i+1 – A i ). l Thus, if |A i – A i+1 | = 5, the change would be ±10 and so, the error would not be detected. This material is for the teacher

58 Activity 5 Does the Code Correct Transposition Errors?

59 Activity 5: Transposition Errors Check whether the UPC barcode detect a transposition error of 4-7, 7-1 and 1-6 in the left-hand side code Check whether the UPC barcode detect a transposition error of 2-7, 7-1, and 1-6 in the right-hand side code WHAT ARE YOUR CONCLUSIONS?

60 Summary

61 Summary – what have we learnt today? l The history of bar codes l How barcodes are designed and used l Some properties of UPC bar codes l New terms: l Error Detecting Code l Error Correcting Code

62 References (1) l Bar Code History Page ml ml l Bar Codes _code.htm _code.htm l UPC Bar Code FAQs FAQ/ FAQ/

63 References (2) l Free Barcode Image Generator l Joseph Woodland l Bar Code Symbologies l es.aspx es.aspx l Error Detection Schemes l math.cudenver.edu/~wcherowi/courses/m6409/errschemes. pdf math.cudenver.edu/~wcherowi/courses/m6409/errschemes. pdf

64 References: Wikipedia l _Product_Code _Product_Code l l Joseph_Woodland Joseph_Woodland

65 Questions or comments?