Академический Документы
Профессиональный Документы
Культура Документы
Topics
• What is Computer?
• Major Computer Components
• Computer Components Interconnection
• Data Representation
o Bits, Bytes, and Words
o The Decimal Number System
o The Binary Number System
o Converting from Binary to Decimal, Decimal to Binary
o The Hexadecimal Number System
o Converting from Hexadecimal to Decimal, Decimal to
Hexadecimal
CMSC 104, Section 301, Fall 2002 1 Lecture 02, 9/04/02
What is Computer?
Data types:
• Text
• Number
• Image
• Audio
• Video
1 0 0 1 0 0 1 1 X 20 = 1
2 6 2 5 2 4 23 2 2 2 1 2 0 0 X 21 = 0
0 X 22 = 0
20 = 1 24 = 16 1 X 23 = 8
21 = 2 25 = 32 0 X 24 = 0
22 = 4 26 = 64 0 X 25 = 0
23 = 8 1 X 26 = 64
7310
CMSC 104, Section 301, Fall 2002 20 Lecture 02, 9/04/02
Converting from Binary to Decimal (con’t)
Practice conversions:
Binary Decimal
101
1101
101101
44 / 2 = 22 rem = 0
22 / 2 = 11 rem = 0
11 / 2 =5 rem = 1
5/2 =2 rem = 1
2/2 =1 rem = 0
1/2 =0 rem = 1
Done answer = 1 0 1 1 0 0 2
CMSC 104, Section 301, Fall 2002 22 Lecture 02, 9/04/02
Converting From Decimal to Binary (con’t)
Practice conversions:
Decimal Binary
59
82
175
1101000010100110 = ?
3 C 8 B 0 5 1
166 165 164 163 162 161 160
1 A 5 F
163 162 161 160
4096 256 16 1
Recall: A16 = 1010 and F16 = 1510 .
= 1 x 4096 + A x 256 + 5 x 16 + F x 1
= 1 x 4096 + 10 x 256 + 5 x 16 + 15 x 1
= 4096 + 2560 + 80 + 15
= 675110
Binary: 1 0 1 0 0 0 0 1 0 1 0 0 1 1 12
Decimal: 2064710
Hexadecimal: 50A716