Open In App
Related Articles

GATE | GATE CS 1996 | Question 25

Improve
Improve
Improve
Like Article
Like
Save Article
Save
Report issue
Report

Consider the following floating point number representation \"floating_p\"       The exponent is in 2\’s complement representation and mantissa is in the sign magnitude representation. The range of the magnitude of the normalized numbers in this representation is a). 0 to 1 b). 0.5 to 1 c). 2-23 to 0.5 d). 0.5 to (1-2-23)

(A)

a

(B)

b

(C)

c

(D)

d



Answer: (D)

Explanation:

Normalized numbers are of the form: 1.xxxx xxxx… …xxxx {ignoring sign and exponent part}. They always have a Leading 1 before decimal point. While storing such a number in this floating point representation two cases can be there:

  • Case 1: We can store most significant 1 in mantissa along with other bits as (while MSB of mantissa is a sign bit as ‘S’) : Minimum Mantissa=> S100 0000 0000 0000 0000 0000 = 1.00 0000…0000 = 1 Maximum Mantissa=> S111 1111 1111 1111 1111 1111 = 1.1111…1111 = 2 – 2-22
  • Case 2: We can ignore to do so assuming an implicit MSB as 1. Minimum Mantissa=> S000 0000 0000 0000 0000 0000 = 1.000 0000…0000 = 1 Maximum Mantissa=> S111 1111 1111 1111 1111 1111 = 1.1111…1111 = 2 – 2-23

Thus none of the options matches. If instead of Normalized numbers they had asked for Normalized mantissa then following would have been the approach: minimum value of magnitude of Mantissa=> “S100 0000 0000 0000 0000 0000” (ignoring (-1)s as a multiple of the number as only magnitude has been asked)

= 0.100 0000 0000 0000 0000 0000
= 1*2-1
= 0.5
and
maximum value of Mantissa=>
“S111 1111 1111 1111 1111 1111”
= 0.111 1111 1111 1111 1111 1111
= [(223)- 1] * 2-23
= 1-2-23 

In this case option (D) would be the answer. 



Quiz of this Question
Please comment below if you find anything wrong in the above post

Last Updated : 20 Nov, 2018
Like Article
Save Article
Previous
Next
Share your thoughts in the comments
Similar Reads