Joined May 2013
·

Emmanuel Hadoux

AI PhD. at LIP6
·
Paris, France
·
·
·

Posted to Check if number power of 2 over 1 year ago

I'm sorry, I may be mistaken but isn't it the opposite?
E.g :

8 -> 1000
7 -> 0111
& -> 0000

But 8 do is a power of 2 and a & (a - 1) == false in this very case.

Achievements
91 Karma
1,554 Total ProTip Views