http://www.hackersdelight.org/
http://www.amazon.com/Hackers-Delight-2nd-Edition-ebook/dp/B...
Entertaining book: http://www.amazon.co.uk/Hackers-Delight-2nd-Edition-ebook/dp...
The reference: http://www.amazon.co.uk/The-Computer-Programming-Vol-Combina... Section 7.1.3 Bitwise Tricks and Techniques
Sean's an incredibly bright guy but he's more interested in building world-changing apps and web dev. as opposed to low-level systems programming. There are other classes here where you have to code in assembly and do all sorts of bit manipulation (OS's comes to mind). The core CS sequence in our school is also in C, which differs notably from other places that use Python, Java, etc.
For anyone who wants to learn more about bit manipulation, Henry Warren's "Hacker's Delight" is a terrific book (http://www.amazon.com/Hackers-Delight-Henry-S-Warren/dp/0201...).
http://www.amazon.com/Hackers-Delight-Henry-S-Warren/dp/0201...
[1] http://www.amazon.com/Hackers-Delight-Henry-S-Warren/dp/0201...
H. Warren, Hackers Delight has a nice discussion of this problem. One of my favorite books, but I like to do code generators.
http://www.amazon.com/Hackers-Delight-Henry-S-Warren/dp/0201...
Link: http://www.amazon.com/Hackers-Delight-Henry-S-Warren/dp/0201...
http://www.amazon.com/Hackers-Delight-Henry-S-Warren/dp/0201...
Author covers really clever techniques to count bits, count non zero bytes like this etc etc. Bit manipulation at its best.