Page 1 of 1

Which of these expressions will make the rightmost set bit zero in an input integer x?

Posted: Wed Jul 13, 2022 7:51 pm
by answerhappygod
a) x = x | (x-1)
b) x = x & (x-1)
c) x = x | (x+1)
d) x = x & (x+2)