Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
booklog said:It depends byte ordering in the machine. i.e. the machine is little endian or big endian.
Here is a C code for little endian
float a; // float variable whose low byte is needed
char *ptr, b;
ptr = (char *)&a;
b = ptr[0]; // b contains the low byte of a now.
.. Hope this is what u wanted.
char GetLsb( float *f )
{
int a=1;
return ((char *)f)[ (sizeof(float)-1)*!(*(char *)&a) ];
}
float f = 123.456;
char c = GetLsb(&f);