Question: write a c program. I have also provided some other resources that might help. yes programming in c program. thats all the information i have

write a c program. I have also provided some other resources that might help.
write a c program. I have also provided some other resources that
might help. yes programming in c program. thats all the information i
have if you cant do it please let someone else.thanks Program Description
Write a C program which interprets the bits of a floating point
number to extract the three fields in the number and print them
yes programming in c program.
thats all the information i have if you cant do it please let someone else.
thanks

Program Description 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. Background Our computers store floating point values in a format specified by IEEE standard 754. There is a long history of why this is done, but I go right to the format. Sign Exponent Fraction Integer Single-precision (32-bits) 1 Double-precision (64- Ibits) As you can see in the table, we do not store the integer or base value. All numbers must be normalized when stored, and this forces the integer portion to be '1'in binary. always the same for a normalized value, there is no need to waste a bit to store it. We call the hidden bit We don't store the base of the exponent, as this value is always 2. This is similar to how scientific notation always uses a base of 10 so the three non-zero held in the table are what we extract from the bits in the variable You will be working with 32-bit single precision only included the double precision numbers for comparison Printing a Floating Point Number Printing a value in hexadecimal or binary is tricky. If you run the following code, you will get a different wrong value every time. The behavior is undefined include etdi. You can typecast a pointer or use a union to solve this problem signed long You have to use the value in 2 tot access to the b ordereference atypecast pointer Printing out in binary requires that you teach bitone at a time.starting at the historderemost) and continuing until alle have been printed. For example, the hex value would print 1, then then 1, then to produce the string '1010 if you need to print a value with fewer than 32-bits, shift the desired bits to the high order For m e wanted to print out the fractional portion of a single precision Boating point e r I would need to hit the number places to the left the print23 f wanted to in the exponentid e and then print 8 bits Sample Output Here is representative output (the above with debug stuff turned off): 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) Program Description 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. Background Our computers store floating point values in a format specified by IEEE standard 754. There is a long history of why this is done, but I go right to the format. Sign Exponent Fraction Integer Single-precision (32-bits) 1 Double-precision (64- Ibits) As you can see in the table, we do not store the integer or base value. All numbers must be normalized when stored, and this forces the integer portion to be '1'in binary. always the same for a normalized value, there is no need to waste a bit to store it. We call the hidden bit We don't store the base of the exponent, as this value is always 2. This is similar to how scientific notation always uses a base of 10 so the three non-zero held in the table are what we extract from the bits in the variable You will be working with 32-bit single precision only included the double precision numbers for comparison Printing a Floating Point Number Printing a value in hexadecimal or binary is tricky. If you run the following code, you will get a different wrong value every time. The behavior is undefined include etdi. You can typecast a pointer or use a union to solve this problem signed long You have to use the value in 2 tot access to the b ordereference atypecast pointer Printing out in binary requires that you teach bitone at a time.starting at the historderemost) and continuing until alle have been printed. For example, the hex value would print 1, then then 1, then to produce the string '1010 if you need to print a value with fewer than 32-bits, shift the desired bits to the high order For m e wanted to print out the fractional portion of a single precision Boating point e r I would need to hit the number places to the left the print23 f wanted to in the exponentid e and then print 8 bits Sample Output Here is representative output (the above with debug stuff turned off): 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!