http://www-graphics.stanford.edu/~seander/bithacks.html
e.g. counting bits in parallel, extending sign, determing if a value is a power of two, etc
tip: Bit Twiddling Hacks
Moderator: Ras
-
Gerd Isenberg
- Posts: 2251
- Joined: Wed Mar 08, 2006 8:47 pm
- Location: Hattingen, Germany
Re: tip: Bit Twiddling Hacks
I also like to mention The Aggregate Magic Algorithms by Hank Dietz with similar issues than Sean Eron Anderson's. Further Bit-Twiddling links are mentioned in the cpw as well, specially Knuth's "The Art of Computer Programming Vol" 4 as Pre-Fascicle PostScripts and the Arndt paper. Also interesting is Mridul's blog with some random thoughts on bit twiddling ....flok wrote:http://www-graphics.stanford.edu/~seander/bithacks.html
e.g. counting bits in parallel, extending sign, determing if a value is a power of two, etc
Cheers,
Gerd