">>>" Logical right shift, add 0 to the left
Note that char, byte, and short are converted to int first when the logic is shifted to the right, and then logically shifted to the right based on the int.
Shift of long type
Long shift is very strange. I don't know what's going on,
Long L =-21474837000l;
System. Out. println (L );
Bitmanipulation. pbinlong ("L", L );
L >>>= 3;
System. Out. println (L );
Bitmanipulation. pbinlong ("L", L );
1111111111111111111111011111100011111111111111111111110111111000
1101111111111111111111111011111111011111111111111111111110111111
If the value of L is a number in the int range, it seems that the content of the first 32 bits is the same. The shift is also based on the 32 shift, and the first 32 bits are respectively shifted to the right three bits.
However, if the value of L is greater than the value in the int range, I don't know how to shift it. In the above example, the logic moves three places to the right, and it seems that the 32-bit values before and after are moved in 110;
In addition, no matter whether the logic shifts right or right, the resulting binary number is the same, but the number after the right shift of the logic is interpreted as the unsigned number.
Why