Neat. Also here's some other sources beyond the usual CS bookshelf suspects:<p><a href="http://www.hackersdelight.org/" rel="nofollow">http://www.hackersdelight.org/</a><p><a href="http://www.inwap.com/pdp10/hbaker/hakmem/hakmem.html" rel="nofollow">http://www.inwap.com/pdp10/hbaker/hakmem/hakmem.html</a><p>(We recently had to grab the C standards in order to bust out some integer under/overflow macros that wouldn't be brittle.)
There's also a lot of 64-bit hacks on pages related to chess programming (8x8 boards).
For example: <a href="https://chessprogramming.wikispaces.com/Bitboards" rel="nofollow">https://chessprogramming.wikispaces.com/Bitboards</a><p>And my faviourite bit hack question on SO: <a href="https://stackoverflow.com/questions/14537831/isolate-specific-row-column-diagonal-from-a-64-bit-number" rel="nofollow">https://stackoverflow.com/questions/14537831/isolate-specifi...</a>
It's an awesome page.<p>I would guess one of the reasons it's here though is that it's almost required reading for Google interviews, #DetermineIfPowerOf2 is a particular favorite.
Another resource in the same vein (it links to this page, among others):<p><a href="http://aggregate.org/MAGIC/" rel="nofollow">http://aggregate.org/MAGIC/</a>
This has been popular over the years, but hasn't had attention on HN in a while:<p><a href="https://hn.algolia.com/?q=bit+twiddling+hacks#!/story/forever/0/bit%20twiddling%20hacks" rel="nofollow">https://hn.algolia.com/?q=bit+twiddling+hacks#!/story/foreve...</a><p>We put 2005 on it, though the Internet Archive says there were earlier versions.