

Bit Twiddling Hacks - coliveira
http://graphics.stanford.edu/~seander/bithacks.html

======
dpapathanasiou
"Hacker's Delight" ([http://www.amazon.com/Hackers-Delight-Henry-S-
Warren/dp/0201...](http://www.amazon.com/Hackers-Delight-Henry-S-
Warren/dp/0201914654/)) is also a good source for these, as well as other
techniques.

------
windsurfer
Anyone else always spend a huge amount of time understanding someone elses
code when their doing bit twiddling? It's just not intuitive to me, and I
always abstract it away as much as possible.

------
matrix3456
How many people use this stuff in their daily job coding? Does this really
matters and matters what?

~~~
wladimir
I think this should be regarded as "recreational computer science". It's
intriguing to see how much is possible with some bit twiddling. It also gives
insight into how things are handled internally.

But it's not for use in actual code, unless you're writing a video codec or
other embedded system in which you want to shave off every cycle.

