Parhami

Chapter 1, Numbers and Arithmetic, Sections 1.1-1.6.

Chapter 2, Representing Signed Numbers, Sections 2.1-2.6.

Chapter 17, Floating-point Representations.

Wikipedia

IEEE 754-2008

a. Determine how many digits are necessary to represent all possible values of the

A. sum of 1024 integers
in
the range from 00_{16}
to FF_{16
}each

B. product of 1000 integers in the
range from 0 to 99_{ }each

using

- radix-2 conventional system

- radix-10 conventional system.

b. Represent the following decimal numbers in hexadecimal representation.

85.6328125, 1324.19140625

c. Convert the following octal (radix-8) numbers to hexadecimal (radix-16) notation:

5667321.434214, 335267.67423411

d.
Represent -123.7109375 and
-83.2890625

using the following binary signed number
representations with
*k*
= 8 and
*l*
= 8

- signed
magnitude

- one's complement

- two's
complement

- biased with the base B=128.

e.
Extend all numbers from point d.,
expressed in the respective signed number representations with
*k*
= 8 and
*l*
= 8,
to the numbers with the same value and
the sizes of the integer and fractional part equal respectively to *k' *= 16 and
*l'
*= 16 (see
Lecture 4,
slide 71, "Extending the number of bits of a signed number").

Problem 2 (3 bonus
points)

__Prove__
a formula for an extension of a signed number in the biased
representation with a
*k*-bit
integer part and an
*l*-bit
fractional part to a number with a
*k'*-bit
integer part and an
*l'*-bit
fractional part,
with *
k'
> k* and
*l'
> l*
(see
Lecture 4,
slide 71, "Extending the number of bits of a signed number").

Determine __all__
bits of the ANSI/IEEE standard __single-precision__
representation of the following numbers (**Hint:**
use default rounding scheme if necessary):

_{
}

a. -0.1110110101011001111_{2}
×
2^{-121}

b. -1001.1111000011001011110_{2}
×
2^{-129}

c. (-infinity) / (+infinity)

d. (+infinity) - (-infinity)

e. 0/(infinity)

f. 1111.10111111011_{2 }
×
2^{124}

b. -1001.1111000011001011110

c. (-infinity) / (+infinity)

d. (+infinity) - (-infinity)

e. 0/(infinity)

f. 1111.10111111011

**Problem
4 (2 bonus
points)**

Consider the IEEE 32-bit standard floating-point format.

Can floating-point numbers be compared by treating their representations as signed integers in the signed magnitude representation, even when denormals and +/- infinity are considered?

If your answer
is yes, please prove this property of the floating point representation.

If your answer is no, please provide a counterexample.