nossi ch 1
TRANSCRIPT
Chapter 1
•Identification Numbers
•Check Digits
•Codes
Identification Numbers
Area Number-Group Number-Serial Numberpg 3-5
Where was the mailing address of your SSN?
ISBN - Find the one for our book
VIN
UPC Codes
First digit - type of item - pg 9 Manufacturer code Product code
Check Digits
An additional digit added to an identification number so that a transmission error may be found.
Check Digits
An additional digit added to an identification number so that a transmission error may be found.
Before we look at how check digits are used we need to look at some special rules.
Did you know that each of these numbers is divisible by 9?
81135
23616
Did you know that each of these numbers is divisible by 9?
8113523616
Do you know why?
If the sum of the digits of a number is divisible by 9, then the number is divisible by 9.81: 8+1=
135: 1+3+5=
23616: 2+3+6+1+6=
Name a number that is divisible by 9.
Ex. 1.3A biology professor has nearly 1000
students in his class. For reasons of confidentiality he wants to assign each student an identification number.
Suggest some ways to assign these identification numbers.
The professor could assign a fourth digit as a check digit. One way to do this is to assign the fourth digit so that the the identification number is divisible by 9.
A 3 digit number that does not contain a 9 could be assigned and then the 4th digit makes the sum of the 4 digits divisible by 9.
If the sum of the 3 digits is already divisible by 9 the 4th digit will be a 0.
This is one example of a check digit.
We will look at more check digits in the next section.
1.1 AssignmentPg 12
(3,9,11,13,15,19,25,26,33)
Section 1.2Modular Arithmetic and Check-
Digit Schemes
Modular Arithmetic and Check-Digit Schemes
How do we know if this is a legitimate VIN number?
Before looking at how to check a VIN for legitimacy, lets look at a simpler example.
Divide 4 by 13
Before looking at how to check a VIN for legitimacy, lets look at a simpler example.
Divide 13 by 4
The quotient is:
3 with remainder 1
Before looking at how to check a VIN for legitimacy, lets look at a simpler example.
Divide 13 by 4
The quotient is 3 with remainder 1
To check: 4 X 3 + 1 = 13
If a number divides evenly and the remainder is zero:
For example: 15/5 = 3
We can say “5 divides 15”
This can be written 5|15
The remainder is the important number.
Division by 7Integer Remainder
. . . , -21, -14, -7, 0, 7, 14, 21, . . . 0
. . . , -20, -13, -6, 1, 8, 15, 22, . . . 1
. . . , -19, -12, -5, 2, 9, 16, 23, . . . 2
. . . , -18, -11, -4, 3, 10, 17, 24, . . . 3
. . . , -17, -10, -3, 4, 11, 18, 25, . . . 4
. . . , -16, -9, -2, 5, 12, 19, 26, . . . 5
. . . , -15, -8, -1, 6, 13, 20, 27, . . . 6
What patterns do you see?
In every row, the difference between the numbers in a row is a multiple of 7
Integer Remainder. . . , -21, -14, -7, 0, 7, 14, 21, . . . 0. . . , -20, -13, -6, 1, 8, 15, 22, . . . 1. . . , -19, -12, -5, 2, 9, 16, 23, . . . 2. . . , -18, -11, -4, 3, 10, 17, 24, . . . 3. . . , -17, -10, -3, 4, 11, 18, 25, . . . 4. . . , -16, -9, -2, 5, 12, 19, 26, . . . 5. . . , -15, -8, -1, 6, 13, 20, 27, . . . 6
The language we will use is:
The two numbers are: “congruent modulo 7”
Because 7 divides the difference between 29 and 15:
7|(29-15) and 29=15 mod 7
(= should be a symbol with 3 lines)
IntegerRemainder
. . . , -21, -14, -7, 0, 7, 14, 21, . . . 0
. . . , -20, -13, -6, 1, 8, 15, 22, . . . 1
. . . , -19, -12, -5, 2, 9, 16, 23, . . . 2
. . . , -18, -11, -4, 3, 10, 17, 24, . . . 3
. . . , -17, -10, -3, 4, 11, 18, 25, . . . 4
. . . , -16, -9, -2, 5, 12, 19, 26, . . . 5
. . . , -15, -8, -1, 6, 13, 20, 27, . . . 6
State 2 more congruence relationships.
See the Example 1.11 on pg 24
See example 1.12 on pg 24
Modular Check Digit Schemes
9 is a popular check digit
Ex. A company uses a mod 9 check-digit scheme for its 5 digit id number. The 5th digit is the check digit.
Determine the check digit for
5368
Determine the check digit for
5368
Add the digits:5 + 3 + 6 + 8 = 22
9|(22 - ?)
9|18, so
9|(22 - 4)
The check digit is 4
Find the missing digit if the 5th digit is the check-digit using mod 9:
73?11
7 + 3 + d3 + 1 = 1 mod 9
Remember, the 5th digit is the check digit
7 + 3 + d3 + 1 = 1 mod 9
11 + d3 = 1 mod 9
What number minus 1 is divisible by 9?
19=1mod 9 or 9|(19-1)
11 + d3 = 1 mod 9
What number minus 1 is divisible by 9?
19=1mod 9 or 9|(19-1)
What does d3 have to equal?
11 + d3 = 1 mod 9
What number minus 1 is divisible by 9?
19=1mod 9 or 9|(19-1)
What does d3 have to equal?
d3 = 8
Example of uses of mod 9 check-digits:
Money Orders
European Currency
Airline tickets use a mod 7 check digit system. Read ex 1.7 on pg 29.
Assignment for sec. 1.2:Pg 32 (9,21,23,25,31,33,35)
Binary CodesMorse CodeUPCBrailleASCII
Section 1.3Encoding Data
A data coding system made up of two states (on/off) or two symbols
Binary Codes
Morse code is one type of a binary code.
See chart on pg 38
Morse Code
A dot is one unit ONA dash is 3 units ONThe circuit is OFF for 1 unit between dots and dashes
Morse Code
Morse Code
The dots and dashes can be converted to black and white squares
Black square = ONWhite square = OFF
Morse Code
The black and white squares can be converted to 1’s and 0’s
1 = ON0 = OFF
See chart on pg 39
Morse Code
Convert the word MATH to Morse Code using 1’s and 0’s
Insert 3 0’s between letters.
Morse Code
Convert a list of 1’s and 0’s into English.
See ex. 1.19 on pg 39
Morse Code
UPC Bar Codes
The first 5 digits are the manufacturer code
The 2nd 5 digits are the product code
UPC Bar Codes
The last digit is a check digit chosen according to the following rule:
3(d1+d3+d5+d7+d9+d11) +1(d2+d4+d6+d8+d10+d12) =
0mod10*The total is divisible by 10
UPC Bar Codes
Braille
Each letter consists of 6 dots.
Each dot is either raised or not raised.
For a combination of 2x2x2x2x2x2 characters
Braille
2x2x2x2x2x2 = 26 = 64
Possible characters
Braille
More than 64 characters were needed for computers so the ASCII code was developed.
ACSII
A bit is a information unit having one of two states:
On or Off1 or 0
ACSII
A groups of 8 bits is called a byte.
This would be a set of 8 1’s and 0’s.
ACSII
ASCII code is an 8-bit code.
See Table 1.14 on pg 48.
ACSII
How many characters could an 8-bit code represent?
ACSII
How many characters could an 8-bit code represent?
28 = 256
ACSII
Pg 51 (1,7,9,11,13,15,17,21,25a,b,29)
Section 1.3 Assignment
Send me an e-mail so that I have your address.
Pg 12 (3,9,11,13,15,19,25,26,33)Pg 32 (9,21,23,25,31,33,35)Pg 51 (1,7,9,11,13,15,17,21,25a,b,29)
Chapter 1 Assignment