-x的值即在x值的基础上按位取反(~x)再+1 x&-x=x&(~x+1) ①x为奇 1 ②x为0 0 ③x为偶,且x=2^m 2^m ④x为偶,且x=n*2^m 2^m int lowbit(int x){ return x&-x; }