Question: what is the difference between logical shift and arithmetic shift?
Answer: Logical shift treats the number as a bunch of bits, and shifts in zeros. ... Arithmetic shift treats the number as a signed integer (in 2s complement), and "retains" the topmost bit, shifting in zeros if the topmost bit was 0, and ones if it was one.