Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Chapter 2
Data representations in Computer Systems
Text Books :
-- W. Stallings, Computer Organization and Architecture: Designing for Performance,
8’th Edition, Prentice -Hall, Inc
-- Computer System Architecture by M. Moris Mano ,3rd Edition Published by
Prentice Hall International
1439/1440
Computer Design & Organization
Contents
3
Computer Design & Organization
4
Computer Design & Organization
5
Computer Design & Organization
6
Computer Design & Organization
9 × 10 2 + 4 × 10 1 + 7 × 10 0
5 × 10 3 + 8 × 10 2 + 3 × 10 1 + 6 × 10 0
+ 4 × 10 -1 + 7 × 10 -2
7
Computer Design & Organization
1×24+1×23+0×22 +0×21+1×20
= 16 + 8 + 0 + 0 + 1 = 25
> When the radix of a number is something other
than 10, the base is denoted by a subscript.
— Sometimes, the subscript 10 is added for
emphasis:
110012 = 2510
8
Computer Design & Organization
Octal(base 8)
Hexadecimal
• We normally convert to base 10
(base16)
because we are naturally used to the decimal number system.
• We can also convert to other number systems
9
Computer Design & Organization
10
Computer Design & Organization
11
Computer Design & Organization
12
Computer Design & Organization
Hexadecimal representation
13
Computer Design & Organization
14
Computer Design & Organization
Example
16
Computer Design & Organization
Example
18
Computer Design & Organization
19
Computer Design & Organization
Example
position 7 6 5 4 3 2 1 0
Bit pattern 1 0 0 1 1 1 0 1
contribution 24 23 22 20
-
> The magnitude is 0011101 with a value 24+23+22+20= 29
> Then the number represented by 10011101 is –29.
20
Computer Design & Organization
Exercise 1
21
Computer Design & Organization
22
Computer Design & Organization
23
87611 = 87610 + 1
Computer Design & Organization
24
Computer Design & Organization
25
Computer Design & Organization
26
Computer Design & Organization
27
Computer Design & Organization
28
Computer Design & Organization
29
Computer Design & Organization
0+0=0 0+1=1
1+0=1 1+1=0
30
Computer Design & Organization
31
Computer Design & Organization
32
Computer Design & Organization
33
Computer Design & Organization
34
Computer Design & Organization
35
Computer Design & Organization
36