top | item 8754904 Bit Twiddling Hacks (2005) 50 points| thealphanerd | 11 years ago |graphics.stanford.edu 6 comments order hn newest fubarred|11 years ago Neat. Also here's some other sources beyond the usual CS bookshelf suspects:http://www.hackersdelight.org/http://www.inwap.com/pdp10/hbaker/hakmem/hakmem.html(We recently had to grab the C standards in order to bust out some integer under/overflow macros that wouldn't be brittle.) viraptor|11 years ago There's also a lot of 64-bit hacks on pages related to chess programming (8x8 boards). For example: https://chessprogramming.wikispaces.com/BitboardsAnd my faviourite bit hack question on SO: https://stackoverflow.com/questions/14537831/isolate-specifi... new299|11 years ago It's an awesome page.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. drv|11 years ago Another resource in the same vein (it links to this page, among others):http://aggregate.org/MAGIC/ dang|11 years ago This has been popular over the years, but hasn't had attention on HN in a while:https://hn.algolia.com/?q=bit+twiddling+hacks#!/story/foreve...We put 2005 on it, though the Internet Archive says there were earlier versions. aosmith|11 years ago He should pay bounties in BTC...
fubarred|11 years ago Neat. Also here's some other sources beyond the usual CS bookshelf suspects:http://www.hackersdelight.org/http://www.inwap.com/pdp10/hbaker/hakmem/hakmem.html(We recently had to grab the C standards in order to bust out some integer under/overflow macros that wouldn't be brittle.)
viraptor|11 years ago There's also a lot of 64-bit hacks on pages related to chess programming (8x8 boards). For example: https://chessprogramming.wikispaces.com/BitboardsAnd my faviourite bit hack question on SO: https://stackoverflow.com/questions/14537831/isolate-specifi...
new299|11 years ago It's an awesome page.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.
drv|11 years ago Another resource in the same vein (it links to this page, among others):http://aggregate.org/MAGIC/
dang|11 years ago This has been popular over the years, but hasn't had attention on HN in a while:https://hn.algolia.com/?q=bit+twiddling+hacks#!/story/foreve...We put 2005 on it, though the Internet Archive says there were earlier versions.
fubarred|11 years ago
http://www.hackersdelight.org/
http://www.inwap.com/pdp10/hbaker/hakmem/hakmem.html
(We recently had to grab the C standards in order to bust out some integer under/overflow macros that wouldn't be brittle.)
viraptor|11 years ago
And my faviourite bit hack question on SO: https://stackoverflow.com/questions/14537831/isolate-specifi...
new299|11 years ago
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.
drv|11 years ago
http://aggregate.org/MAGIC/
dang|11 years ago
https://hn.algolia.com/?q=bit+twiddling+hacks#!/story/foreve...
We put 2005 on it, though the Internet Archive says there were earlier versions.
aosmith|11 years ago