Skip to content

Instantly share code, notes, and snippets.

@davesque
Created September 4, 2013 03:23
Show Gist options
  • Save davesque/6432438 to your computer and use it in GitHub Desktop.
Save davesque/6432438 to your computer and use it in GitHub Desktop.
int sum3(int x, int y, int z) {
int word1, word2;
word1 = (x ^ y) ^ z;
word2 = (x & y) | (x & z) | (y & z);
word2 <<= 1;
return word1 + word2;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment