Math, asked by Hilal9943, 1 year ago

What is arithmetic shift and logical shift?

Answers

Answered by Anonymous
6
_________
Logical shift. In computer science, a logical shift is a bitwise operation that shifts all the bits of its operand. ... Shifting right by n bits on an unsigned binary number has the effect of dividing it by 2n (rounding towards 0). Logical right shift differs from arithmetic right shift.
___€€ I hope it is help you
Answered by PRTAAloneButHappy
0
Hey dear....


Logical Shift

A Left Logical Shift of one position moves each bit to the left by one. The vacant least significant bit (LSB) is filled with zero and the most significant bit (MSB) is discarded.A Right Logical Shift of one position moves each bit to the right by one. The least significant bit is discarded and the vacant MSB is filled with zero.

Arithmetic Shift

A Left Arithmetic Shift of one position moves each bit to the left by one. The vacant least significant bit (LSB) is filled with zero and the most significant bit (MSB) is discarded. It is identical to Left Logical Shift.A Right Arithmetic Shift of one position moves each bit to the right by one. The least significant bit is discarded and the vacant MSB is filled with the value of the previous (now shifted one position to the right) MSB.

Hope it helps you!!!!!!
Similar questions