Question: Write a C program which interprets the bits of a floating point number to extract the three fields in the number and print them in

Write a C program which interprets the bits of a floating point number to extract the three fields in the number and print them in hexadecimal and binary. Print them in the form , where a is the integer portion of the value, b is the fractional portion, and c is the exponent. These floating point numbers are similar to scientific notation: Here 1 is the integer portion, 25 is the fractional portion, and 3 is the exponent.

Ill write a separate document describing floating point numbers in more detail. In this document I will stick to what you need to do. I will provide you some sample output, which you must substantially follow. You can format things differently, but you cannot add or remove information.

I will provide some debug output, which is not what I want you to turn in. It might help to see some intermediate values so that you can tell if you are on the right track.

Sample Output

Enter a value: 123.24

-1.1110 1100 1111 0101 1100 001 * 2^(0000 0110)

Enter a value: -1042.3023

+1.0000 0100 1001 0011 0101 100 * 2^(0000 1010)

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!