What is the 8-bit two’s complement representation of the decimal number -45?
Correct answer A. 11010011
Explanation
Write +45 as 00101101, invert every bit to get 11010010 (the one's complement), then add 1 to obtain 11010011. The option 11010010 is the one's complement and forgets the final +1, while 10101101 is the sign-magnitude form. In two's complement, negation is always invert-then-add-one, which is why a single adder can handle both addition and subtraction.
Answer checked How we write and check questions
Discussion