Difference between circular left shift and arthimetic left shift
Answers
Answered by
0
Arithmetic shift
logical shift
1.Sign bit is preserved
1.Sign bit is not preserved
2. In left arithmetic shift, 0’s are shifted to left keeping sign bit.
2. In left logical shift 0’s are replaced by discarded bits.
3. In right arithmetic sign bit is shifted to the right keeping sign bit as is.
3.In right logical shift inserts value 0 to the shifted bits
4. Efficient way to perform multiplication (shifting left n bits) and division (shift right n bits) of signed integers using power of 2.
4. Just performs multiplication operation by shifting left
logical shift
1.Sign bit is preserved
1.Sign bit is not preserved
2. In left arithmetic shift, 0’s are shifted to left keeping sign bit.
2. In left logical shift 0’s are replaced by discarded bits.
3. In right arithmetic sign bit is shifted to the right keeping sign bit as is.
3.In right logical shift inserts value 0 to the shifted bits
4. Efficient way to perform multiplication (shifting left n bits) and division (shift right n bits) of signed integers using power of 2.
4. Just performs multiplication operation by shifting left
Similar questions
Math,
8 months ago
Social Sciences,
1 year ago
Social Sciences,
1 year ago
Art,
1 year ago
Science,
1 year ago