Coursework Question 1:
IEEE754 binary floating point converter in C (32bit)
Options
- Decimal to IEEE 754 Binary Floating Point
- IEEE 754 Binary Floating Point
LIMITATIONS:
MAX : 3.4E+38
MIN : 1.17e-30
not able to be higher or lower than the min/max value for option 1
Questions:
-
Ask users to type in a decimal number from the keyboard input,then convert this decimal number into IEEE 754 binary floating point (single precision). Print out the conversion results on the screen in the formats as follows:
a) The input of decimal number is:
b) After conversion, the 1-bit sign bit is:
c) The8-bitactualexponentis:
d) The 8-bit biased exponent is:
e) The 23-bit fraction is:
f) IEEE754 binary floating point: -
Ask users to type in a 32-bits binary number in IEEE754 binary floating point format (single precision) from the keyboard input, then convert this IEEE 754 binary floating point number (single precision) into the decimal number format. Print out the results on the screen in the formats as follows:
a) IEEE 754 floating point input:
b) Before conversion, the 1-bit sign bit is:
c) The8-bitbiasedexponentis:
d) The 8-bit actual exponent is:
e) The 23-bit fraction is:
f) After conversion, the decimal number is: