~x & (x+1) and (x & -x)