NIMCET 2008 — Computer PYQ
NIMCET | Computer | 2008Let A=11111010 and B=00001010 be two 8-bit 2's complement numbers. Their product in 2's complement is:
Choose the correct answer:
- A.
11000100
(Correct Answer) - B.
10011100
- C.
10100101
- D.
11010101
11000100
Explanation
To find the product of two signed numbers in 2's complement, the most efficient method is to convert them to decimal, multiply, and then convert the result back to 8-bit 2's complement.
Step 1: Convert A to Decimal
A=11111010. Since the MSB (Most Significant Bit) is 1, it is a negative number.
To find its magnitude, take the 2's complement of A:
-
Invert the bits: 00000101
-
Add 1: 00000101+1=00000110
-
000001102=610
So, A=−6.
Step 2: Convert B to Decimal
B=00001010. Since the MSB is 0, it is a positive number.
B=(1×23)+(1×21)=8+2=10.
So, B=10.
Step 3: Multiply the Decimal Values
Step 4: Convert −60 back to 8-bit 2's Complement
-
Find the binary for +60:
60=32+16+8+4
Binary: 00111100
-
Take the 1's complement (invert bits):
11000011
-
Add 1 to get the 2's complement:
11000011+1=11000100
Verification:
The result 11000100 represents:
−128+64+4=−64+4=−60.
This matches our calculated decimal product.
Final Answer:
The correct option is (a) 11000100.
