Created
October 9, 2014 17:41
-
-
Save c0ldlimit/fd26843ad698957ae255 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include<stdio.h> | |
int main(int argc, char * argv[]) { | |
float f = 19.86; | |
int x, k; | |
for (k=0; k < 32; ++k) { | |
x = *(int*)&f >> (k); | |
x = x & 1; | |
printf("%i is the bit\n", x); | |
} | |
/* 0 10000011 00111101110000101001000*/ | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment