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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started