Pages tagged bit:

Low Level Bit Hacks You Absolutely Must Know - good coders code, great reuse

good coders code, great reuse
2009-07-04 - 当面C#と.NETな記録
Puzzle: Fast Bit Counting « Reflections
return ((tmp + (tmp >> 3)) & 030707070707) % 63;
bithacks.h - bit hacks header file - good coders code, great reuse
This header file is called “bithacks.h” and it contains various macros for bit manipulations. I also wrote tests for all the macros in the “bithacks-test.c” program. The most beautiful part of “bithacks.h” is the “B8” macro that allows to write something like ” x = B8(10101010) ” and turns it into ” x = 170 ” (because 10101010 in binary is 170 in decimal). I have not yet added B16 and B32 macros but I will add them when I publish the article on advanced bithacks. The credit for the B8 idea goes to Tom Torfs who was the first to write it.
the bit twiddler
Frammenti di codice C per trucchetti
the bit twiddler