// https://rextester.com/l/c_online_compiler_gcc #include int main(void) { unsigned char *fc = malloc(4 * sizeof(fc)); *((float*)fc) = 31.19; fc[3] = 0b00111110; fc[2] = 0b00100000; fc[1] = 0b01000000; fc[0] = 0b00000000; printf("%f", *((float*)fc)); free(fc); return 0; }