Lecture 030211 LIGN

# Lecture 030211 LIGN - Lecture byte group of 3 bits ASCI I 7...

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

03/02/11 Lecture byte – group of 3 bits ASCII: 7 bit representation Partly bit If sum of bit = even, write 0 If sum of bit = odd, write 1 0110110 4 1 bits, so it’s even 0 4(mod 2) = 0 0101010 1 3 1 bits, so it’s odd 1 3(mod 2) = 1 8 bit checksum can represent 2^8 numbers (0 to 2^8 – 1) take sum (mod 256) Luhn Algorithm for Credit Card #s Sample Credit Card #: 4417 12 34 5678 911 3 1 st 6 digits is issuer ID number next 7 digits is account number last digit is the check digits (what implements cred card #s as error detecting codes) step 1: beginning with final digit, moving right to left (start with check digit) and compute a sum… sum will have: for digits in odd positions, write that # for digits in even positions, double that # if doubling is less than 10, write total otherwise subtract 9 from total (number b/w 10 and 18)

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

View Full Document
step 2: add results together to get sum and check sum(mod 10) = 0 3 Same 3 1 1x2 2 1 Same 1 9 18-9 = 9 9 8 Same 8 7 14 – 9 = 5 5 6 Same 6 5 10 – 9 = 1
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### Page1 / 4

Lecture 030211 LIGN - Lecture byte group of 3 bits ASCI I 7...

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

View Full Document
Ask a homework question - tutors are online