Difficulty: Medium
Correct Answer: 110001
Explanation:
Introduction / Context:Digital systems perform subtraction by adding the two’s complement of the subtrahend. Selecting the correct two’s-complement pattern is crucial for correct results and for understanding how ALUs handle subtraction internally.
Given Data / Assumptions:
Concept / Approach:For two’s complement: –N = invert(all bits of N) + 1. Represent 15 in 6 bits, form its two’s complement, and identify the correct option.
Step-by-Step Solution:
15 (decimal) in 6 bits = 00 1111 → 001111.Invert: 110000.Add 1: 110000 + 000001 = 110001. This is the 6-bit code for –15.Therefore, to compute 43 − 15, add 43 + 110001 (the two’s complement of 15).Verification / Alternative check:Perform the addition: 43 (101011) + 110001 = 1 011100 (ignore carry) = 011100 = 28, which equals 43 − 15, confirming the correctness.
Why Other Options Are Wrong:
Common Pitfalls:Forgetting to add 1 after inversion; using too few bits so that sign is lost; misreading leading zeros in fixed-width formats.
Final Answer:110001
Discussion & Comments