Difficulty: Easy
Correct Answer: 14
Explanation:
Introduction / Context:
Binary-to-decimal conversion reinforces understanding of bit weights (1, 2, 4, 8, …). This is essential when reading register dumps, flags, and immediate constants in low-level code.
Given Data / Assumptions:
Concept / Approach:
Sum the weights corresponding to the 1 bits. For 4-bit numbers, the weights from most to least significant are 8, 4, 2, 1.
Step-by-Step Solution:
Verification / Alternative check:
Using polynomial expansion: 12^3 + 12^2 + 12^1 + 02^0 = 8 + 4 + 2 + 0 = 14. Converting 14 back to binary gives 1110₂, confirming the round-trip.
Why Other Options Are Wrong:
Common Pitfalls:
Final Answer:
14
Discussion & Comments