void printfBinary(int input){ int i, check=1; char bit; for(i=31; i>=0; i--){ bit = (input &(1<<i))?1:0; printf("%d", bit); if(i%8==0) printf(" "); } printf("\n"); } |
void printfBinary(int input){ int i, check=1; char bit; for(i=31; i>=0; i--){ bit = (input &(1<<i))?1:0; printf("%d", bit); if(i%8==0) printf(" "); } printf("\n"); } |