Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Beginning ASP.NET 2.0 And Databases

Authors: John Kauffman, Bradley Millington

1st Edition

0471781347, 978-0471781349

More Books

Students also viewed these Databases questions