skip to main
|
skip to sidebar
nevermind
Wednesday, September 30, 2015
Cool way to count bits
Count the set bits in a number. Pretty cool.
for( count = 0; value != 0; count++ )
{
value &= value – 1;
}
Newer Posts
Older Posts
Home
Subscribe to:
Posts (Atom)
About Me
Chris
Home and Dollars
homeanddollars@gmail.com
View my complete profile
Blog Archive
▼
2015
(1)
▼
September
(1)
Cool way to count bits
►
2013
(1)
►
July
(1)
►
2012
(1)
►
June
(1)
►
2011
(4)
►
October
(1)
►
April
(3)
►
2010
(1)
►
December
(1)
►
2009
(25)
►
August
(1)
►
July
(3)
►
June
(2)
►
May
(2)
►
April
(5)
►
March
(1)
►
February
(3)
►
January
(8)
►
2008
(23)
►
December
(4)
►
November
(2)
►
October
(9)
►
September
(5)
►
June
(1)
►
May
(1)
►
March
(1)
Twitter Updates
Twitter Updates
follow me on Twitter