Skip to content

Instantly share code, notes, and snippets.

@jdaigle
Forked from chriskooken/gist:399066
Created May 13, 2010 00:35
Show Gist options
  • Save jdaigle/399331 to your computer and use it in GitHub Desktop.
Save jdaigle/399331 to your computer and use it in GitHub Desktop.
bool mystery(uint num){
uint other = num - 1;
bool result = ((num & other) == 0);
return result;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment