x = x << 1; // 2 = 21 乘
x = x >> 1; // 2 = 21 除
x = 1.232 >> 0; 整
a = a^b;b = a^b;a = a^b; 换
i = ~i + 1; // NOT 写法 i = (i ^ -1) + 1; // XOR 写法 反
x = 131 & (4 - 1);//取2余 x = 131 % 4;
isEven = (i & 1) == 0;//是否为偶
eqSign = a ^ b > 0; //比较两数值相乘之后是否拥有相同的符号?
--------------------------------------------------------------------------------
8.
//写法1
i = x < 0 ? -x : x;
//写法2
i = (x ^ (x >> 31)) - (x >> 31);
//写法3
i=x^(~(x>>31)+1)+(x>>31);