https://zhuanlan.zhihu.com/p/134690309
public static void main(String[] args) {
hightwo(0);
hightwo(7);
hightwo(32);
}
private static void hightwo(int cap) {
int n = cap - 1;
n |= n >>> 1;
n |= n >>> 2;
n |= n >>> 4;
n |= n >>> 8;
n |= n >>> 16;
System.out.println((n<0) ? 1 : (n+1));
}