Difficulty: Easy
Correct Answer: Correct
Explanation:
Introduction / Context: Two’s-complement representation encodes negative values by inverting bits of the magnitude and adding 1. Recognizing a negative 8-bit pattern and recovering its decimal value is a core skill in digital arithmetic and systems programming.
Given Data / Assumptions:
Concept / Approach: For an 8-bit number with MSB 1, the value is negative. To find the magnitude, take two’s complement: invert all bits then add 1. The resulting magnitude is interpreted in ordinary binary and the sign is negative.
Step-by-Step Solution:
1) Given: 10011100. MSB=1 → negative.2) Invert bits: 01100011.3) Add 1: 01100011 + 1 = 01100100.4) 01100100 (binary) = 64 + 32 + 4 = 100 (decimal). Therefore original value = −100.Verification / Alternative check: Add the number to its magnitude in two’s complement: 10011100 + 01100100 = 1 00000000 (ignoring the final carry) which is a property confirming correct inversion and addition pairing.
Why Other Options Are Wrong: Ignoring the MSB or using sign-magnitude rules would misinterpret the encoding. Overflow flags are unrelated to static value interpretation.
Common Pitfalls: Forgetting to add 1 after inversion, or miscounting bit weights when converting back to decimal.
Final Answer: Correct
Discussion & Comments