Skip to content

Instantly share code, notes, and snippets.

@normoes
Last active March 14, 2018 08:44
Show Gist options
  • Save normoes/005fc2334ff05e0d21e2b5cc9b92974f to your computer and use it in GitHub Desktop.
Save normoes/005fc2334ff05e0d21e2b5cc9b92974f to your computer and use it in GitHub Desktop.
remember me: shifting bits

shifting bits

n << 1 == n * 2
n << 2 == n * 4
n << 3 == n * 8
n >> 1 == n / 2
n >> 2 == n / 4
n >> 3 == n / 8
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment