Question: Write a program that prompts the user to enter a double precision floating point value, which you will read in using cin and store in

Write a program that prompts the user to enter a double precision floating point value, which you will read in using cin and store in a double. Then, using only bitwise operators, display the sign, exponent, and mantissa of the number. The format for double precision floating point number is here: https://en.wikipedia.org/wiki/Double-precision_floating-point_format

Sample run:

Enter a double: 7.5

Sign: +

Base: 2 (always)

Exponent: 0x2

Mantissa: 0xf

_________________________________

Enter a double: 125.125

Sign: +

Base: 2 (always)

Exponent: 0x6

Mantissa: 0x3e9

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!