Week 2
Week 2
Data
Representation
in Computer
Systems
Objectives (1 of 2)
Suppose we want to
convert the decimal
number 190 to base 3.
We know that 35 = 243 so
our result will be less than
six digits wide. The largest
power of 3 that we need is
therefore 34 = 81, and 81
2 = 162.
Write down the 2 and
subtract 162 from 190,
giving 28.
2.3 Converting Between Bases (4 of 19)
Using the
multiplication method
to convert the decimal
0.8125 to binary, we
multiply by the radix 2.
The first product carries
into the units place.
2.3 Converting Between
Bases (15 of 19)
Converting 0.8125 to
binary
Ignoring the value in
the units place at each
step, continue
multiplying each
fractional part by the
radix.
2.3 Converting Between Bases (16 of 19)
representation:
If the number is positive, just convert it to binary and
11111100
Adding 1 gives us
11111101.
2.4 Signed Integer Representation
(19 of 35)
When
overflow has occurred. If the carry into the sign bit equals
the carry out of the sign bit, no overflow has occurred.
2.4 Signed Integer Representation
(27 of 35)
Signed and unsigned numbers are both useful.
For example, memory addresses are always unsigned.
Using the same number of bits, unsigned integers
signed numbers.