What is arithmetic shift and logical shift?
Answers
Answered by
2
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.
Answered by
1
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.
Similar questions