Question: Needs to be in c++ format problem 4: 1) 19 ten. 2) -7/6 ten. 3) 0.3 ten. 4) 63.50 ten. Problem 6 (20 points) Write
Needs to be in c++ format
problem 4:
1) 19 ten.
2) -7/6 ten.
3) 0.3 ten.
4) 63.50 ten.

Problem 6 (20 points) Write a C/C++ program to extract the sign bit, exponent field, and the fraction field of a 32-bit hexadecimal number (in the IEEE 754 standard) and then compute the corresponding floating- point in decimal using formula (-I)'g x(1+fraction2-23)x2ep -127)(You can ignore special cases including 0). Print each field as unsigned hexadecimal (%X) and the decimal value in scientific notation ("%E"). Then apply your program on the four representations from Problem 4 above (single precision only) and include your running results. You need to attach a copy of your program or submit it electronically. Program hint: You may find the following union structure convenient. union ieee754_hex { unsigned int hex; struct unsigned int fraction:23; unsigned int exponent:8; unsigned int s:1
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
