Skip to content

Instantly share code, notes, and snippets.

@VojtaStavik
Created April 5, 2017 19:16
Show Gist options
  • Save VojtaStavik/d0fba10e04474718ae04b00cb1b91bf2 to your computer and use it in GitHub Desktop.
Save VojtaStavik/d0fba10e04474718ae04b00cb1b91bf2 to your computer and use it in GitHub Desktop.
x & y
// Bitwise AND: Combines the bits of two numbers.
// It returns a new number whose bits are set to 1 only
// if the bits were equal to 1 in both input numbers
Example:
7 ==> 0 1 1 1
3 ==> 0 0 1 1
--------------
7 & 3 ==> 0 0 1 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment