This theory is part of Premium
The full write-up (worked counting examples, the trap list and the interview playbook) unlocks with a Premium plan, along with every Pro visualizer.
See pricingTurn position k on and leave the rest of the number alone.
What this asks
Turn bit k on and return the number.
x | (1 << k) forces that position on and leaves every other bit untouched.
The full write-up (worked counting examples, the trap list and the interview playbook) unlocks with a Premium plan, along with every Pro visualizer.
See pricing