News for hackers. Stuff that matters.
Re:Low Level Bit Hacks You Absolutely Must Know by spaghetti on Tuesday June 30, 2009 @10:55PM (#682020)
my favorite is determine if an int is a power of 2: if(!(a & (a-1))){ // a is a power of 2 }
Re:Low Level Bit Hacks You Absolutely Must Know by swolchok on Wednesday July 01, 2009 @03:35PM (#683227)
or a is negative.