Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

55. In your own words, describe the concept of a shift operation 56. What is the

ID: 2266097 • Letter: 5

Question

55. In your own words, describe the concept of a shift operation 56. What is the difference between an arithmetic shift and a logical shift? Why are there two logical shift operations but only one arithmetic shift operation? 57. The discussion of shift registers in class included 3 shift operations and the "Thru" operation. What is the purpose of the Thru operation? 58. Why is a bit "lost" in a shift operation? Which bit is lost in a shift right operation? Which bit is lost in a shift left operation? In the implementation of a shift register described in class, what happens to the lost bit? 59. From a mathematical perspective, use the formulas for interpreting the binary encoding of signed and unsigned integer values to describe why shifting one bit results in either multiplying or dividing the represented value by 2. Which shift direction corresponds to multiplying, and which shift direction corresponds to dividing?

Explanation / Answer

Answer:-55) Shift operation on any data bits moves all the data bits either left or right by some specified number of shifts. For example if x = 0010101010 then shift right by one bit will change x = 0101010100 i.e MSB is lost and LSB is filled with a zero.
Similarly if we shift right by one bit then LSB is lost and MSB is filled with a zero. So x = 0001010101 .

Answer:-56) The logical shift loses the MSB bit while arithmatic shift maintains the MSB bit. In logic shift a zero is filled at MSB on right shift but in arithmatic shift MSB is copied back again at MSB position i.e after shift MSB doesn't change.
Suppose x = 10101010 then logic shift right by 1 bit will make x = 01010101 while arithmatic shift left by 1 bit will give x = 11010101. But in case of left shift both will produce same result.

We generally have arithmatic shift for left only because arithmatic shift right and logic shift right gives same result. The arithmatic shift concept is used for signed number system where MSB bit decides whether a number is positive or negative.

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote