Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save JonathanGawrych/81635b35064d7bea1515e0abffd13bd5 to your computer and use it in GitHub Desktop.

Select an option

Save JonathanGawrych/81635b35064d7bea1515e0abffd13bd5 to your computer and use it in GitHub Desktop.
// 1 << bit == 1 << (bit % 32)
// 1 << 33 == 2
// need a structure to represent bit >= 32
var bit = 32;
[(bit >> 5 == 3) << bit,
(bit >> 5 == 2) << bit,
(bit >> 5 == 1) << bit,
(bit >> 5 == 0) << bit]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment