In: Electrical Engineering
Recall that a float is stored in the following format:
±sign 1.mantissa • 2^exponent?127
where sign is 1 bit, exponent is 8 bits, and mantissa is 23 bits. Write a C function that accepts an int parameter and returns a float represented by the bits in the int. The 32-bit integer is organized as 1-bit sign, 8-bit exponent, 23-bit mantissa. For example, 0x3F800000 represents 1.0 because the sign bit is 0, the exponent is 127, and the mantissa is all 0’s.
It has to be a proper c executable code.Please help.