CH09-COA10e
CH09-COA10e
William Stallings
Computer Organization
and Architecture
10th Edition
83 = (8 * 10) + 3
The number 4728 means four thousands, seven hundreds,
two tens, plus eight:
83 = (8 * 101) + (3 * 100)
+ (6 * 10-3)
Most significant digit
The leftmost digit (carries the highest value)
( . . . a3a2a1a0.a-1a-2a-3 . . . )r
02 = 010
12 = 110
Decimal notation
to binary notation:
Integer and fractional
parts are handled
separately
Converting
Between Binary
© 2016 Pearson Education, Inc., Hoboken, NJ. All rights reserved.
and Decimal
For the integer part, recall that in binary notation, an integer represented by
bm-1bm-2 . . . b2b1b0 bi = 0 or 1
N = 2 * N1 + R0 R0 = 0 or 1
N1 = 2 * N2 + R1 R1 = 0 or 1
so that
If next
N2 = 2N3 + R2
we have
Continued . . .
N=
© 2016 Pearson Education, Inc., (N3 * NJ.
Hoboken, 23)All
+ rights
(R2 *reserved.
22) + (R1 * 21) + R0
Integer
Because N >N1 > N2 . . . , continuing this
sequence will eventually produce a quotient Nm-1 s
= 1 (except for the decimal integers 0 and 1,
whose binary equivalents are 0 and 1,
respectively) and a remainder Rm-2, which is 0 or
1. Then
= (2
© 2016 Pearson Education, Inc., Hoboken, NJ. 10 * 16 ) + (1210 * 160) = 44
1
All rights reserved.
+
Table 9.3
Decimal,
Binary, and
Hexadecimal
In most computers,
binary data occupy It is extremely easy to
It is more compact some multiple of 4 bits, convert between
than binary notation and hence some binary and
multiple of a single hexadecimal notation
hexadecimal digit
Chapter 9
Convertingbetween
The decimal system binary and decimal
Integers
Positional number Fractions
systems
Hexadecimal
The binary system
notation