Explain why two’s complement is preferred over one’s complement for representing signed integers in computers.
Convert the binary number 11100101 (8-bit two’s complement) to its decimal equivalent.
How does signed magnitude representation handle the number zero, and what is its limitation compared to two’s complement?
Perform the subtraction 25 – 47 in an 8-bit two’s complement system.
Convert the decimal number -72 to one’s complement in a 9-bit system.
Answers and Descriptions
Answer: Two’s complement has one zero, simplifies arithmetic, and handles overflow. One’s complement has two zeros.
Description: Two’s complement streamlines CPU design for efficiency.Answer: 11100101 → One’s complement = 00011010, add 1 = 00011011 (27) → -27.
Description: Check MSB, invert, add 1 to convert two’s complement.Answer: Signed magnitude: 00000000 (+0), 10000000 (-0). Two’s complement: one zero (00000000).
Description: Dual zeros complicate signed arithmetic magnitude.Answer: 25 = 00011001, -47 = 11010001 → 00011001 + 11010001 = 11001010 = -22.
Description: Subtraction as addition in two’s complement.Answer: 72 = 01001000; One’s complement = 10110111.
Description: Invert bits for one’s complement, used historically.
