Hi,n&n-1 actually resets the first least significant bit which is set. If its 0 doesnt it mean its a power of 2.
Post a Comment
1 comment:
Hi,
n&n-1 actually resets the first least significant bit which is set. If its 0 doesnt it mean its a power of 2.
Post a Comment