Homework Solution: Consider the largest single precision floating point number,…

    Floating Point “Question” 1)Consider the largest single precision floating point number, 1.11…1 x 2127. What will happen the “gap” at that number if you change the type to double precision? DO NOT discuss the largest double precision number – just the largest single precision represented as a double type. 2)Now, consider the smallest single precision floating point number, 2-149. What will happen the “gap” at that number if you change the type to double precision? DO NOT discuss the smallest double precision number – just the largest single precision represented as a double type.

    Expert Answer

     
    Solution: 1) Before proceeding let's discuss double precision an

    Unarranged Subject-matter “Question”

    1)Deem the largest one nicety unarranged subject-matter enumerate, 1.11…1 x 2127. What achieve bechance the “gap” at that enumerate if you modify the premonition to wrap nicety? DO NOT sift-canvass the largest wrap nicety enumerate – fair the largest one nicety represented as a wrap premonition.

    2)Now, deem the lowest one nicety unarranged subject-matter enumerate, 2-149. What achieve bechance the “gap” at that enumerate if you modify the premonition to wrap nicety? DO NOT sift-canvass the lowest wrap nicety enumerate – fair the largest one nicety represented as a wrap premonition.

    Expert Retort

     

    Solution:

    1)

    Before transaction let’s sift-canvass wrap nicety and how the premonition, advocate, and Mantissa is categorized in it.

    So wrap nicety is 64-bit unarranged subject-matter and the details are given below:

    So when largest one nicety enumerate achieve be represented as wrap nicety it achieve behold enjoy this,

    Sign Biased Advocate Mantissa
    0 10001111110 1111111111111111111111100000000000000000000000000000

    So the Bias restraint wrap nicety enumerate is +1023

    and Biased Advocate= Actual advocate+Bias= 127+1023= 1150 (int binary: 10001111110)

    and in the mantissa, succeeding 23 1’s complete the bits achieve be padded with 0’s.

    2)

    So the lowest one nicety enumerate 2^-149 achieve be represented as shown below:

    Sign Biased Advocate Mantissa
    0 01101101010 0000000000000000000000000000000000000000000000000000

    So the Bias restraint wrap nicety enumerate is +1023

    and Biased Advocate= Actual advocate+Bias= (-149)+1023= 874 (int binary 01101101010)