Difficulty: Easy
Correct Answer: 11110001
Explanation:
Introduction / Context:
Two's-complement is the dominant signed number encoding in digital systems. It is formed by inverting all bits (one's-complement) and then adding 1 to the least significant bit.
Given Data / Assumptions:
Concept / Approach:
2's-complement(X) = (~X) + 1. For 00001111: one's-complement is 11110000; adding 1 yields 11110001.
Step-by-Step Solution:
Verification / Alternative check:
Adding the number and its 2's-complement gives 00000000 with a carry out, confirming correctness.
Why Other Options Are Wrong:
Common Pitfalls:
Stopping at inversion without adding 1, or changing bit width inadvertently.
Final Answer:
11110001
Discussion & Comments