Difficulty: Medium
Correct Answer: –14 and –13, –27
Explanation:
Introduction / Context:
This question checks your ability to read 8-bit two's-complement numbers, determine their decimal values (including sign), and perform signed addition. Two's-complement is the standard way computers represent signed integers and perform addition with the same hardware as for unsigned numbers.
Given Data / Assumptions:
Concept / Approach:
For two's-complement, if the most significant bit (MSB) is 1, the number is negative. To find magnitude: invert all bits, add 1, then attach a negative sign. Addition of two's-complement values uses ordinary binary addition; overflow is ignored for the magnitude unless you exceed representable range (–128 to +127 for 8 bits).
Step-by-Step Solution:
Interpret 11110010: MSB = 1 ⇒ negative. Invert to get 00001101, add 1 ⇒ 00001110.00001110 is 14 decimal ⇒ value is –14.Interpret 11110011: MSB = 1 ⇒ negative. Invert to get 00001100, add 1 ⇒ 00001101.00001101 is 13 decimal ⇒ value is –13.Sum in decimal: –14 + (–13) = –27.
Verification / Alternative check:
Add in binary: 11110010 + 11110011 = 11100101 (with a carry out dropped). Convert 11100101: MSB 1 ⇒ negative; invert 00011010, add 1 ⇒ 00011011 = 27 ⇒ –27. Matches the decimal sum.
Why Other Options Are Wrong:
–113/–114, –227: Misinterprets 8-bit range and magnitude.–11 and –16, –27: Incorrect magnitudes for the given bit patterns.–27 and –13, –40: First operand misread; sum becomes inconsistent.–112 and –111, –223: Same magnitude error pattern as option A.
Common Pitfalls:
Forgetting to add 1 after inversion, treating the carry-out as part of the sum for 8-bit results, or confusing sign-magnitude with two's-complement.
Final Answer:
–14 and –13, –27
Discussion & Comments