Question
Can you help me, please With C programming, please? In this C programming, we need to convert the float number which it is 32 bits
Can you help me, please WithC programming,please? In this C programming, we need to convert the float number which it is 32 bits to a mini float that has 8 bits .using the first bit for the sign,3 numbers for the exponent, 4 numbers for the sig fix. I have an idea about using the bitwise shifting to get these however I got into nowhere please help. I add the skeleton for the code.
#include \"minifloat.h\"
Minifloat from_float(float a) { Minifloat mf; // convert a to mf return mf; }
Minifloat from_char(char *a) { Minifloat mf; // convert a to mf return mf; }
Minifloat add(Minifloat a, Minifloat b) { Minifloat result;
// do the computation
return result; }
Minifloat mul(Minifloat a, Minifloat b) { Minifloat result;
// do the computation
return result; }
Minifloat sub(Minifloat a, Minifloat b) { Minifloat result;
// do the computation
return result; }
Minifloat Divide(Minifloat a, Minifloat b) { Minifloat result;
// do the computation
return result; }
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