Bit manipulation operates directly on the binary representation of integers using AND, OR, XOR, NOT, and shifts. It enables compact, branch-free, and very fast operations.
Core operations
python
x &
x <<
x >>
x & ( << k)
x | ( << k)
x & ~( << k)
x ^ ( << k)
