Bitwise Operations
- Bits Cheat Sheet (pdf) - you should know many of the powers of 2 from (2^1 to 2^16 and 2^32)
- Get a really good understanding of manipulating bits with: &, |, ^, ~, >>, <<
- Word in Computer Architecture - Wikipedia (article)
- Bit Manipulation - Youtube (video)
- C Programming Tutorial 2-10: Bitwise Operators - Youtube (video)
- Bit Manipulation - Wikipedia (article)
- Bitwise Operation - Wikipedia (article)
- Bithacks - Stanford (article)
- The Bit Twiddler (web)
- The Bit Twiddler - Interactive (web)
- Bit Hacks - MIT (video)
- Practice Operations - Interactive (web)
- 2s and 1s complement
- Count set bits
- Round to next power of 2:
- Swap values:
- Absolute value: