Bit Manipulation
Flip, mask and shift — the tricks that turn a loop into one instruction.
Bit Manipulation progress0 / 5
- Binary and Bitwise OpsEvery integer is a row of switches you can address.4m
- XOR TricksPairs cancel out, and the loner is left standing.4m
- Counting Set BitsClear the lowest 1 and count how often you can.4m
- Masks and Power of TwoOne shifted bit is a key to any position you like.5m
- Bitmask as a SetAn integer is a subset; counting to 2^n lists them all.5m
Quiz yourself: 3 questions from this module
1 / 3