02-NumberSystems
02-NumberSystems
1
Numbers
3
Numbers
4
Unsigned Binary Numbers
5
Unsigned Binary Numbers
6
Unsigned Binary Numbers
7
Converting Binary to Decimal
8 + 4 + 0 + 1 + 0 + 0.25 =
13.25
(1101.01)2 = (13.25)10
8
Converting Decimal to Binary
10
Octal and Hexadecimal Numbers
11
Numbers with Different Bases
Decim
Decim alal Binary
Binary Octal
Octal Hex
Hex
00 0000
0000 00 00
11 0001
0001 11 11
22 0010
0010 22 22 You can convert between base-10
33 0011
0011 33 33
base-8 and base-16 using
44 0100
0100 44 44 techniques
55 0101
0101 55 55 like the ones we just showed for
66 0110
0110 66 66
converting between decimal and
77 0111
0111 77 77
binary
88 1000
1000 10
10 88
99 1001
1001 1111 99
10
10 1010
1010 12
12 AA
1111 1011
1011 13
13 BB
12
12 1100
1100 14
14 CC
13
13 1101
1101 15
15 DD
14
14 1110
1110 16
16 EE
15
15 1111
1111 17
17 FF
12
Binary and Octal Conversions
• Converting from octal to binary: Replace each octal digit
with its equivalent 3-bit binary sequence
(673.12)8 = 6 7 3 . 1 2
= 110 111 011 . 001 010
= (110111011 .001010)
2
15
Number Systems Summary
• Computers are binary devices
– We’re forced to think in terms of base 2.
– We learned how to convert numbers between binary,
decimal, octal and hexadecimal
• We’ve already seen some of the recurring themes
of architecture:
– We use 0 and 1 as abstractions for analog voltages.
– We showed how to represent numbers using just these
two signals.
16