Joined October 2012
·
35619bacc47ad73326472281767fae7e

Sanket Sudake

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

Thankx for pointing it out. I written that in hurry, so made a mistake. I have updated tip.
In case of 8 ,
a & (a - 1) == false
So number is power of 2.

1 )For false == number is power of 2
2) For true == number is not power of 2

Achievements
133 Karma
2,237 Total ProTip Views