But how do you traverse the list of bits and find the value it represents? Bit shifting?
Type: Posts; User: johngoodman
But how do you traverse the list of bits and find the value it represents? Bit shifting?
So for the makeFloat function I'd like to call it like so: float result = makeFloat("-101.1101"); .... so I pass it that value which is binary, but I need to convert it to an actually float and...
Never mind, i fixed it by doing a simple bit shift, haha. But I'm still working on makefloat
This is what I'm running now, but it outputs 1 01111111 11111111111111111111111 which is obviously not -5.8125
typedef union fi {
unsigned int i;
float f;
}fi;
I'm trying to write two functions.
One called: void displayFloat(float f);
And the other: float makeFloat(char* f);
I want displayFloat to simply take in a float and display the 32 bits that...