Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Q Search Problem 4 (20 points) Show the IEEE 754 binary representation for the following floating-point numbers in single and double precision. Give your results
Q Search Problem 4 (20 points) Show the IEEE 754 binary representation for the following floating-point numbers in single and double precision. Give your results in hexadecimal format. State so if there is overflow or underflow 1) 19 ten 2) -7/6 ten. 3) 0.3 ten 4) 63.50 ten Problem 5 (10 points) IEEE 754-2008 contains a half precision that is only 16 bits wide. The leftmost bit is the sign bit; the exponent is 5 bits wide and has a bias of 15; the mantissa is 10 bits long and a hidden 1 is assumed. Write down the bit pattern for representing -3.4375x10-1 using the half precision format 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 (-gfraction x 223)x2epn-2) (You can ignore special cases including 0). Print each field as unsigned hexadecimal (%X) and the decimal value in scientific notation (4%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
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