Every story and comment from the Hacker News API, in a layout borrowed from 2001.
A comment on Write A Function To Determine If A Number Is A Power Of 2. Parent comment
If you go by the Two's complement representation, then for a negative number say (-8), because of sign extention, a check for x&(x-1) would fail.
There are no comments on this comment yet.
If you go by the Two's complement representation, then for a negative number say (-8), because of sign extention, a check for x&(x-1) would fail.