need Help Assume we are using the simple model for floating-point representation
ID: 3915085 • Letter: N
Question
need Help
Assume we are using the simple model for floating-point representation as given in this book (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 numbers 100.0 and 0.25 using this
floating-point format.
b) Show how the computer would add the two floating-point numbers in 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?
a.1) 100.0 = _ _ _ _ _ _ _ _ _ _ _ _ _ _
a.2) 0.25 = _ _ _ _ _ _ _ _ _ _ _ _ _ _
b) Adding part a) we get _________________ x 27
c) The sum from part b) in the given floating point notation is _ _ _ _ _ _ _ _ _ _ _ _ _ _
which is equal to ____ _____(base 10)
Explanation / Answer
a.1)100
Bias= 15
100 in binary = 1100100 = (0.1100100)*2^(7)
Exponent = 7+bias= 7+15 = 22
22 in binary 10110
Floating point 14 bit layout
Sign bit( 1 bit )
Exponent( 5 bits )
Mantissa( 8 bits )
0
10110
11001000
Floating point representation is
0 10110 11001000
a.2) 0.25
Bias= 15
0.25 in binary = 0.01 = (0.1)*2^(-1)
Exponent = -1+bias= -1+15 = 14
14 in binary 1110
Floating point 14 bit layout
Sign bit( 1 bit )
Exponent( 5 bits )
Mantissa( 8 bits )
0
01110
10000000
Floating point representation is
0 01110 10000000
Add both numbers,
100+0.25 = 100.25
1100100. 01 = 0.110010001*2^(7)
7+bias= 7+15=22
Floating point 14 bit layout
Sign bit( 1 bit )
Exponent( 5 bits )
Mantissa( 8 bits )
1
10110
11001000
Sign bit( 1 bit )
Exponent( 5 bits )
Mantissa( 8 bits )
0
10110
11001000
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.