The right and left shifts are different.
For the left, there is no "logical left" and "arithmetic left" the difference, the main difference here is the computer system according to the highest bit (that is, sign bit) is "1" or "0", supplementing "1" or "0"
Whether for the highest bit of unsigned number "1" or "0", the lowest bit of the left-shift total "0"
or for the symbol number symbol is positive "0" or negative "1", the lowest left position also all complement "0"
The difference is
The difference between "logic" and "arithmetic" is only when you move to the right.
How to test whether a computer system is "logically moving right" or "arithmetic right shift".
The answer is: you must use the highest level of "1" of the number of tests
If the number with the highest bit of "1" (here is represented by the full "1" sequence ~0) Move right:
A= (~0>>4);
if (a==~0) printf ("Computer system for Arithmetic right shift");
else printf ("Computer system is logically moving right");