Week 01 02
Week 01 02
4
Number Systems
Decimal Numbers
Binary Numbers
11012 =
537410 =
1's column 1's column
10's column 2's column
100's column 4's column
1000's column 8's column
Carnegie Mellon
Number Systems
Decimal Numbers
1000's column
10's column
1's column
100's column
Binary Numbers
8's column
2's column
1's column
4's column
11012 = 1 × 23 + 1 × 22 + 0 × 21 + 1 × 20 = 1310
one one no one
eight four two one
5
Carnegie Mellon
Powers of two
20 = 28 =
21 = 29 =
22 = 210 =
23 = 211 =
24 = 212 =
25 = 213 =
26 = 214 =
27 = 215 =
6
Carnegie Mellon
Powers of two
20 = 1 28 = 256
21 = 2 29 = 512
22 = 4 210 = 1024
23 = 8 211 = 2048
24 = 16 212 = 4096
25 = 32 213 = 8192
26 = 64 214 = 16384
27 = 128 215 = 32768
8
Carnegie Mellon
24 × 1 + 23 × 0 + 22 × 0 + 21 × 1 + 20 × 1 =
9
Carnegie Mellon
24 × 1 + 23 × 0 + 22 × 0 + 21 × 1 + 20 × 1 =
16 × 1 + 8 × 0 + 4 × 0 + 2 × 1 + 1 × 1 =
16 + 0 + 0 + 2 + 1 = 1910
10
Carnegie Mellon
11
Carnegie Mellon
12
Carnegie Mellon
13
Carnegie Mellon
Result is 01011112
14
Carnegie Mellon
15
Carnegie Mellon
Hexadecimal Numbers
Binary numbers can be pretty long.
18
Carnegie Mellon
Hexadecimal Numbers
Binary numbers can be pretty long.
19
Carnegie Mellon
Hexadecimal Numbers
Binary numbers can be pretty long.
Hexadecimal Numbers
Binary numbers can be pretty long.
22
Carnegie Mellon
256 × 4 + 16 × 10 + 1 × 15 =
23
Carnegie Mellon
10010110
most least
significant significant
bit bit
byte
10010110
nibble
CEBF9AD7
most least
significant significant
byte byte
24
Carnegie Mellon
Powers of Two
210 = 1 kilo ≈ 1000 (1024)
25
Carnegie Mellon
26
Carnegie Mellon
27