2021 22 1g

Computer Organization and Architecture2021-222 marksNumericalArithmetic & logic unit design

Register A holds the binary values 10011101. What is the register value after arithmetic shift right? Starting from the initial number 10011101, determine the register value after arithmetic shift left, and state whether there is an overflow.

Register A holds the binary values 10011101. What is the register value after arithmetic shift right? Starting from the initial number 10011101, determine the register value after arithmetic shift left, and state whether there is an overflow.

The register holds $A = 10011101$. The leftmost bit is the sign bit.

Arithmetic shift right. Every bit moves one place right, the sign bit is kept, and the lowest bit is lost. Therefore:

$$10011101 \rightarrow 11001110$$

This is the value $-99$ halved to $-50$.

Arithmetic shift left. Every bit moves one place left and a 0 enters at the right:

$$10011101 \rightarrow 00111010$$

The sign bit has changed from 1 to 0. This is an overflow, because the true result $-198$ does not fit in 8 bits. The overflow flag is set whenever the sign bit before the shift and the bit that replaces it are different.

Short on time? The 1, 5 and 10 mark versions of this answer, flashcards and practice sets come with a program pass.

Up nextWhat is an Associative memory? What are its advantages and disadvantages?