Question: Given an 8 - bit floating point number in the format: 8 total bits 3 bit exponent bias of 3 denormal encodings supported Implement the
Given an bit floating point number in the format:
total bits
bit exponent
bias of
denormal encodings supported
Implement the following function in C which returns the corresponding bit floating point number in the format:
total bits
bit exponent
bias of
denormal encodings supported
this shouldn't matter outside of the two special cases of your output should never otherwise have an exponent of all zeros
You can handle both the normal and denormal cases separately, and both should be doable using bitwise operations without ever getting back the decimal representation of the number. Your input will be in the bottom bits of the fp parameter.
Fill in the following starter code. Keep the same function name unsigned int fpconvert Make sure any variables you define are of type unsigned int to avoid issues with shifting two's complement values.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
