a. What is the effect of shifting an unsigned number in a register 2 bits to the

Question:

a. What is the effect of shifting an unsigned number in a register 2 bits to the left? 1 bit to the right? Assume that 0s are inserted to replace bit locations at the end of the register that have become empty due to the shift.

b. Suppose the number is signed, that is, stored using 2’s complement. Now what is the effect of shifting the number?

c. Suppose that the shift excludes the sign bit, so that the sign bit always remains the same. Furthermore, suppose that during a right shift, the sign bit is always used as the insertion bit at the left end of the number (instead of 0). Now what is the effect of these shifts?

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer: