Bit Twiddling Hacks
Bit Twiddling Hacks Many public domain algorithms (with C implementations) for low-level messing with bits. Some examples: Compute the minimum or maximum of two integers Determining if an integer is a power of 2 Counting bits set Swapping individual bits Reversing bit sequences Finding integer log base 2 of an integer (aka the position of […]
Read Full Post | Make a Comment ( Comments Off on Bit Twiddling Hacks )