NIMCET 2012 — Computer PYQ
NIMCET | Computer | 2012Let x=11111010 and y=00001010 be two 8-bit 2's complement numbers. Their product in 2's complement notation is:
Choose the correct answer:
- A.
11000100
(Correct Answer) - B.
10011100
- C.
10100101
- D.
11010101
11000100
Explanation
The correct answer is (a) 11000100.
Step 1: Convert x and y to Decimal
-
For y=00001010:
Since the MSB is 0, it is a positive number.
y=(23+21)=8+2=+1010 -
For x=11111010:
Since the MSB is 1, it is a negative number. To find its magnitude, take the 2's complement:
1's complement of 11111010 is 00000101.
Adding 1: 00000101+1=00000110.
Magnitude =(22+21)=4+2=6.
x=−610
Step 2: Calculate the Product in Decimal
Step 3: Convert −60 back to 8-bit 2's Complement
-
Binary of +60:
60=32+16+8+4=(00111100)2 -
1's complement: 11000011
-
2's complement (Add 1):
11000011+1=11000100
Final 8-bit product is 11000100.
Explanation
The correct answer is (a) 11000100.
Step 1: Convert x and y to Decimal
-
For y=00001010:
Since the MSB is 0, it is a positive number.
y=(23+21)=8+2=+1010 -
For x=11111010:
Since the MSB is 1, it is a negative number. To find its magnitude, take the 2's complement:
1's complement of 11111010 is 00000101.
Adding 1: 00000101+1=00000110.
Magnitude =(22+21)=4+2=6.
x=−610
Step 2: Calculate the Product in Decimal
Step 3: Convert −60 back to 8-bit 2's Complement
-
Binary of +60:
60=32+16+8+4=(00111100)2 -
1's complement: 11000011
-
2's complement (Add 1):
11000011+1=11000100
Final 8-bit product is 11000100.