Q17.Marks: +2.0UGC NET Paper 2: Computer Science 7th Dec 2023 Shift 2
The microoperation which divides a signed binary number by 2 is :
1.Circular shift
2.Logical shift
3.Arithmetic shift right ✓ Correct
4.Arithmetic shift left
Solution
The correct answer is Arithmetic Shift Right
Key Points
Arithmetic Shift Right:
An arithmetic right shift operation moves bits one position to the right, similar to logical shift.
However, in this case, the leftmost bit (sign bit) stays the same to preserve the number's sign. T
his means a positive number remains positive, and a negative number remains negative, so an arithmetic right shift can correctly divide signed binary numbers by 2.
Additional Information
Circular Shift:
In a circular shift operation, the bits are moved one position to the left or right in a way that the bit at one end does not get lost but instead moves to the other end.
If a bit is shifted out from the right end, it inserts at the left end, and vice versa. This maintains the number of bits in the data.
Logical Shift:
Logical shifts are used for unsigned binary numbers. In a logical right shift, the bits are moved one position to the right, and a '0' is added at the left-most bit.
This is equivalent to division by 2 for unsigned binary numbers but doesn't work for signed numbers (where the left-most bit is a sign bit) because it changes the sign of the number.
Arithmetic Shift Left:
In an arithmetic left shift, bits are moved one position to the left, and a '0' is added in the least significant bit (rightmost bit), doubling the number.
The sign bit (the leftmost bit) remains the same, so signed numbers stay positive or negative. This operation is similar to multiplying a signed binary number by 2.