Page 1 of 1

Which of these expressions will isolate the rightmost set bit?

Posted: Wed Jul 13, 2022 7:51 pm
by answerhappygod
a) x = x & (~x)
b) x = x ^ (~x)
c) x = x & (-x)
d) x = x ^ (-x)