Difficulty: Easy
Correct Answer: -15
Explanation:
Introduction / Context:
Signed integers can be encoded in several binary formats. This problem specifies signed-magnitude, where the most significant bit (MSB) is the sign and the remaining bits are the magnitude. Correctly converting such numbers to decimal reinforces understanding of how signs and magnitudes are separated in this scheme.
Given Data / Assumptions:
Concept / Approach:
In signed-magnitude representation, MSB = 0 denotes a positive number; MSB = 1 denotes a negative number. The magnitude is read as an ordinary unsigned binary value from the remaining bits. Therefore, the task reduces to identifying sign from bit 15 and converting the lower 15 bits to decimal.
Step-by-Step Solution:
Inspect MSB: the pattern begins with 1 → negative number.Extract magnitude bits: 0000 0000 0000 1111.Convert magnitude: 0000 0000 0000 1111 (binary) = 8 + 4 + 2 + 1 = 15.Apply sign: negative → decimal value = −15.Choose option “−15.”
Verification / Alternative check:
Cross-check by comparing to the positive counterpart: 0000 0000 0000 1111 would be +15; changing the MSB to 1 simply flips the sign in signed-magnitude. No two’s-complement manipulation is needed because the encoding is not two’s complement here.
Why Other Options Are Wrong:
“+15” uses the right magnitude but wrong sign. “±30” has an incorrect magnitude. “None of the above” is wrong because “−15” precisely matches the signed-magnitude interpretation.
Common Pitfalls:
Accidentally applying two’s-complement rules (invert and add one) to a signed-magnitude number; miscounting the number of magnitude bits; overlooking that signed-magnitude has both +0 and −0 encodings, unlike two’s complement.
Final Answer:
-15
Discussion & Comments