. An 8 bit register contains the binary value 10011100.What is the register value after an arithmetic shift right? Starting from the initial number 10011100, determine the register value after an arithmetic shift left and state whether there is an overflow or not?
Answers
sorry i do not the answer
Arithmetic shift right : equivalent to integer division by 2.
Arithmetic shift left : equivalent to multiplication by 2.
If MSB = 0 then positive binary number.
If MSB =1 then negative binary number.
An 8-bit register contains the binary value 10011100
By binary to decimal conversion we'll get the decimal value
Decimal value is -100.
The value is negative because MSB is 1.
Arithmetic shift right of 10011100 = 11001110
The decimal value of 11001110 = -50 (by binary to decimal conversion)
Arithmetic shift left 0f 10011100 = 00111000
The decimal value of 00111000 = 56 (by binary to decimal conversion)
In arithmetic shift left the overflow occurred because the sign is changed to positive.
Binary to decimal conversion :-
let binary no. be 01010110
0 1 0 1 0 1 1 0
0×2⁷ 1×2⁶ 0×2⁵ 1×2⁴ 0×2³ 1×2² 1×2¹ 0×2⁰
64 16 4 2
64 + 16 + 4 + 2 = 86
Decimal value = 86
Two's complement :-
let the decimal no. be -13
First write the binary of 13 = 1101
Find one's complement = 0010
Add one to the no. =+ 1
Two's complement =0011
2's complement = 0011