Java Reference
In-Depth Information
The effect of the operators is shown in
the following illustration:
These bits are shifted
out and lost
1
1
1
0
0
1
1
0
1
1
0
0
1
1
0
1
a
0
0
1
1
0
1
1
0
0
1
1
0
1
0
0
0
a<<3
These zeros
are inserted
These bits are shifted
out and lost
1
1
1
0
0
1
1
0
1
1
0
0
1
1
0
1
a
0
0
0
1
1
1
0
0
1
1
0
1
1
0
0
1
a>>>3
These zeros
are inserted
These bits are shifted
out and lost
1
1
1
0
0
1
1
0
1
1
0
0
1
1
0
1
a
1
1
1
1
1
1
0
0
1
1
0
1
1
0
0
1
a>>3
The sign is
propagated
Of course, if the high order bit in the >> operation in the illustration was zero, there would be three
zeros at the leftmost end of the result.
Search WWH ::




Custom Search