What is difference between SHR and SAR instructions-00844

Online Quiz This subjective question is related to the book/course vu cs507 Information Systems. It can also be found in vu cs507 Mid Term Solved Past Paper No. 3.

Question 1: What is difference between SHR and SAR instructions?
Answer:

SHR

The SHR inserts a zero from the left and moves every bit one position to the right and copy the rightmost bit in the carry flag.

SAR

The SAR shift every bit one place to the right with a copy of the most significant bit left at the most significant place. The bit dropped from the right is caught in the carry basket. The sign bit is retained in this operation.


Choose an organization

Theme Customizer

Gaussian Texture



Gradient Background