Assume we are using the simple model for floatingpoint repre

Assume we are using the simple model for floating-point representation as given in the text (the representation uses a 14-bit format, 5 bits for the exponent with a bias of 15, a normalized mantissa of 8 bits, and a single sign bit for the number):

a) show how the computer would represent the number 100.0 and .25 using this floating-point format.

b) Show how the computer would add the two floating-point numbers in the first part a by changing one of the numbers so they are both expressed using the same power of 2.

c) Show how the computer would represent the sum in part b using the given floating-point representation. What decimal value for the sum is the computer actually storing? explain.

Solution

Ans a :

100.0 =

0.25 =

Ans b:

After addition by using part (a) :

.11001 * 27 i.e. .11001 * 27

+ .1 * 2-1   i.e. .000000001 * 27

_____________________

= .110010001 * 27

________________________

Ans c :

The Answer from part (b) that is the sum is represented as :

It is .11001 * 27 = 1100100 = 100

0 1 0 1 1 1 1 1 0 0 1 0 0 0
Assume we are using the simple model for floating-point representation as given in the text (the representation uses a 14-bit format, 5 bits for the exponent wi

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site