Just for you: FREE 60-day trial to the world’s largest digital library.
The SlideShare family just got bigger. Enjoy access to millions of ebooks, audiobooks, magazines, and more from Scribd.Cancel anytime.
This ppt describes one of the interesting algorithms to count the number of bits set in an unsigned integer.
x = (x & 0x55555555) + ((x>>1)&0x55555555));
x = (x&0x33333333) + ((x>>2)&0x33333333);
Free with a 14 day trial from Scribd