Download presentation

Presentation is loading. Please wait.

1
**Chapter 16: Check Digit Systems, Continued**

MAT 105 Spring 2008 Chapter 16: Check Digit Systems, Continued

2
A New Method The methods we’ve been using so far are not great at detecting transposition errors Since these errors are relatively common, we want to find a system that can detect all possible transpositions The method we will use involves a weighted sum

3
**UPC (Universal Product Code)**

Here is an example of a UPC from a typical product Notice that there are 12 digits: a single digit, two groups of 5, and another single digit check digit category of goods manufacturer ID product ID

4
Parts of the UPC The first number represents the general “category of goods” Most fixed-weight products are in category 0 Coupons are in category 5 The next 5 digits identify the manufacturer For example, Coca-Cola is 49000 The next 5 digits identify the particular product For example, a 12 oz. can of Diet Coke is 01134 The last digit is the check digit

5
**Computing the Check Digit**

Instead of adding all of the digits together, we do something a little more complex Multiply the first digit by 3 Add the second digit Multiply the third digit by 3 Add the fourth digit etc. The check digit is chosen so that this sum ends in 0 Notice that we include the check digit in our sum!

6
**Weighted Sums This is called a weighted sum**

In a weighted sum, we multiply the digits by “weights” before adding them together In this case, the weights are: 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1

7
**Examples Show that 0-58200-48826-7 is valid**

Show that is invalid The UPC system detects all substitution errors and 89% of all other kinds of errors

8
**Another System: Bank Routing Numbers**

9
**What’s a Routing Number?**

A routing number uniquely identifies a bank If you have direct deposit on your paychecks, your employer asks you for your routing number (or for a cancelled check to read the number from) Also listed on your checks are your account number and the specific check number

10
**Check Digits on Checks Routing numbers are 8 digits long**

The 9th digit is a check digit The check digit is the last digit of the weighted sum of the first 8 digits with weights 7, 3, 9, 7, 3, 9, 7, 3

11
Examples Show that is a valid routing number (this is the routing number for a bank in Texas) Our weighted sum is 7*1 + 3*1 + 9*1 + 7*0 + 3*0 + 9*0 + 7*0 + 3*2 = 25 The last digit of the weighted sum is 5, so the routing number is valid!

12
Another Example Show that is a valid routing number (this is the routing number for PSECU) Show that is not valid What kind of error was committed?

13
**Why Are More Complex Systems Better?**

The bank routing number check digit system is fairly complex, but it is better than the UPC system The UPC system cannot detect jump transpositions at all, but the routing number system can The more errors a system can detect, the better More complex systems can detect more errors

14
**Codabar The system used by credit cards is called Codabar**

A credit card number is 16 digits long The first 15 digits identify the credit card, and the 16th digit is the check digit

15
The Codabar Process Add the digits in the odd-numbered positions (1st, 3rd, 5th, etc.) Double this sum Add to this total the number of odd-position digits that are above 4 (add the number of digits, not the digits themselves) Add the remaining (even position) digits The check digit is chosen so that the total ends in 0

16
**An Example Consider the credit card number 4128 0012 3456 7890**

Let’s check to make sure this credit card number is valid using Codabar

17
**Running Through the Process**

Add the digits in the odd-numbered positions Double this sum Add to this total the number of odd-position digits that are above 4 Add the remaining (even position) digits The check digit is chosen so that the total ends in 0 = 31 31 x 2 = 62 = 65 = 100

18
**Finding the Check Digit**

What if the company is trying to determine which check digit should be appended to a given ID number? _ What should the check digit be?

19
Benefits of Codabar The Codabar method detects all substitution errors and 98% of all other common errors This is important since credit card numbers are one of the more universal ID numbers we use on a daily basis

20
**ISBN: International Standard Book Number**

An ISBN is a 10-digit number For example, the ISBN for our textbook is 0 – 7167 – 5965 – 9 check digit Indicates that the book was published in an English-speaking country publisher ID book ID

21
Weighted Sums Again For an ISBN number, we compute a weighted sum with weights 10, 9, 8, 7, 6, 5, 4, 3, 2, 1 The check digit is chosen so that the sum is evenly divisible by 11

22
**An Example Let’s check the ISBN 0-7167-5965-9**

We compute our weighted sum to be 253, which is evenly divisible by 11 Which check digit would you need for ISBN _ ?

23
An 11th Digit Since we’re using division by 11, sometimes we’ll need an 11th digit When the check digit would need to be 10, we use the letter X instead

24
Benefits of ISBN The ISBN system detects all substitution errors and all transposition errors Since valid ISBN’s were running out, new books are published using a new 13-digit system with a different way of computing the check digit You might explore these ideas in the third writing assignment

Similar presentations

OK

Barcode UPC ( Universal Product Code) Commonly known as barcode “Barcodes are black and white lines of varying widths followed underneath by a series.

Barcode UPC ( Universal Product Code) Commonly known as barcode “Barcodes are black and white lines of varying widths followed underneath by a series.

© 2018 SlidePlayer.com Inc.

All rights reserved.

To ensure the functioning of the site, we use **cookies**. We share information about your activities on the site with our partners and Google partners: social networks and companies engaged in advertising and web analytics. For more information, see the Privacy Policy and Google Privacy & Terms.
Your consent to our cookies if you continue to use this website.

Ads by Google

Business template free download ppt on pollution Ppt on two point perspective images Ppt on mobile device management Ppt on central nervous system Ppt on life study of mathematician salary Ppt on business cycle phases order Marketing ppt on product Ppt on natural resources for class 9 download Well made play ppt on apple Ppt on eia report format