x & (x + 1)
x | (x - 1)
x | (x + 1)
(x ^ (x + 1)) >> 1
for (int i = x; i; i = (i - 1) & x) { ... }
注意:这样遍历不会遍历到空集