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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!