Created
December 11, 2015 20:00
-
-
Save retokromer/6a8d8e5bcf4590448a23 to your computer and use it in GitHub Desktop.
Gray to Binary for 64-bit Processors
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
unsigned int Gray_To_Bin(unsigned int g) { | |
num = g ^ (g >> 32); | |
num = g ^ (g >> 16); | |
num = g ^ (g >> 8); | |
num = g ^ (g >> 4); | |
num = g ^ (g >> 2); | |
num = g ^ (g >> 1); | |
return g; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment