Skip to content

Instantly share code, notes, and snippets.

@jaredjenkins
Created November 15, 2012 01:28
Show Gist options
  • Save jaredjenkins/4076054 to your computer and use it in GitHub Desktop.
Save jaredjenkins/4076054 to your computer and use it in GitHub Desktop.
BinaryOperations
// represented in binary as 00000000000000000000000000000001
int one = 1;
// represented in binary as 00000000000000000000000000000010
int two = 2;
// represented in binary as 00000000000000000000000000000011
int three = one | two;
// represented in binary as 00000000000000000000000000000100
int four = 4;
// represented in binary as 00000000000000000000000000000000
int zero = four & three;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment