Sometimes you need to isolate the rightmost set bit, turning off all others. The formula is .
Why does this work? In two's complement representation, is computed as . When you add 1 to , it flips all the trailing 0s in to 1s and the rightmost 1 to 0, then carries over. ANDing with this isolates just that rightmost 1 bit.
Example: . Then (in two's complement, focusing on the low bits). . Only the rightmost set bit remains.