What's the difference between arithmetic left shift, logic left shift, arithmetic right shift and logic right shift? Arithmetic left shift: add 0 at the end; logic left shift: add 0 at the end Arithmetic shift right: fill in the lowest bit at the left end; logic shift right: add 0 at the left end Why are there such differences? In addition, why are arithmetic left shift and logic left shift the same? In this case, why are there two kinds of instructions? Arithmetic shift right, is the left end of the highest fill

What's the difference between arithmetic left shift, logic left shift, arithmetic right shift and logic right shift? Arithmetic left shift: add 0 at the end; logic left shift: add 0 at the end Arithmetic shift right: fill in the lowest bit at the left end; logic shift right: add 0 at the left end Why are there such differences? In addition, why are arithmetic left shift and logic left shift the same? In this case, why are there two kinds of instructions? Arithmetic shift right, is the left end of the highest fill

Arithmetic left shift and arithmetic right shift are mainly used for multiplication and halving of signed numbers; logical left shift and logical right shift are mainly used for multiplication and halving of unsigned numbers. Just remember this. Although the way of arithmetic left shift and arithmetic left shift is the same, the range of numbers after shift is different