Created
August 20, 2015 16:23
-
-
Save wende/0c800621cd74d886fd0d to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| int int_to_bin (unsigned int n){ | |
| unsigned char bytes[4]; | |
| bytes[0] = (n >> 24) & 0xFF; | |
| bytes[1] = (n >> 16) & 0xFF; | |
| bytes[2] = (n >> 8) & 0xFF; | |
| bytes[3] = n & 0xFF; | |
| return bytes; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment