3 ms·
> swapping bits that are both set to 1 would also fail No, swapping two 1 bits works fine. Work it out more slowly, the article covered this and why it always
by dahart 6y ago
> swapping bits that are both set to 1 would also fail
No, swapping two 1 bits works fine. Work it out more slowly, the article covered this and why it always works.
(1,1) => (1^1,1)=(0,1) => (0,1^0)=(0,1) => (0^1,1)=(1,1)