Week 9 Lecture Notes

Week 9 Lecture Notes - March 3: Lecture 25 Announcements...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
March 3: Lecture 25 Announcements Assignment 5 due (3/11) at 11:55 Last day to sign up for extra credit experiments is 3/12 Error-Detecting Codes Binary Checksum Credit Cards/Luhn Algorithm UPC ISBN: book numbers ISBN : Ex : 1-57586-216-? Method 1 of validating its code 1. Moving right to left : multiply each number by its place in the sequence, starting from 1 2. Sum the results 3. Check that sum(mod 11) = 0 Thus, in 1-57586-216-? (?x1)+(6x2)+(1x3)+(2x4)+(6x5)+(8x6)+(5x7)+(7x8)+(5x9) +(1x10) = 247 + ? Sum = 247 + ? convert to nearest factor of 11, thus 253 Thus, ? = 6 because 247+6 (mod 11) = 0 Method 2 of validating its code 1. Moving left to right : multiply each number by its place in the sequence, starting from 1 BUT NOT including the check digit, which is the last digit on the right side 2. Sum the results 3. Compute sum(mod 11) = N; N = check digit
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Thus, in 1-57586-216-? (1x1)+(5x2)+(7x3)+(5x4)+(8x5)+(6x6)+(2x7)+(1x8)+(6x9 Sum = 204 N = 204(mod 11) =
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 04/03/2008 for the course LIGN 17 taught by Professor Kehler during the Winter '08 term at UCSD.

Page1 / 5

Week 9 Lecture Notes - March 3: Lecture 25 Announcements...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online