Difficulty: Medium
Correct Answer: 1.10101
Explanation:
Introduction / Context:
The 2's complement operation is the standard way to represent signed numbers in binary for both integers and fixed-point fractions. For a fixed fractional width, you can compute the negative of a value by taking the 1's complement (bitwise invert within the field) and then adding 1 at the least significant fractional bit. This problem reinforces that the same rule applies to binary fractions as to integers, provided the bit width is fixed.
Given Data / Assumptions:
Concept / Approach:
For a fixed n-bit fractional field f[1..n], the 2's complement is obtained by: invert all n bits → add 1 at the least significant position. This yields the representation of the negative value within the same fixed-point word length. Because addition can generate a carry into the integer position, results often appear as 1.xxxxx for negative values.
Step-by-Step Solution:
Start with 0.01011 (fractional field = 01011).Compute 1's complement: invert bits → 10100.Add 1 at LSB: 10100 + 00001 = 10101.Place the binary point consistently: result = 1.10101 in the same fixed-point word.
Verification / Alternative check:
Numeric check using decimal equivalents: 0.01011₂ = 11/32 = 0.34375. The 2's complement within 1.fffff format represents −0.34375. Evaluate 1.10101 as 1 − 0.01011 = 0.65625; interpreted in 2's complement fixed-point, that code corresponds to −0.34375, confirming correctness.
Why Other Options Are Wrong:
(b) and (d) use 0.x forms that are just complements without sign, not 2's complement negatives. (c) has an incorrect +1 step (produced 10100 rather than 10101). (e) is invalid because a correct choice exists.
Common Pitfalls:
Forgetting the add-1 step after inversion; changing the binary point position; or assuming variable precision instead of fixed 5-bit fraction.
Final Answer:
1.10101.
Discussion & Comments