Difficulty: Easy
Correct Answer: 1476
Explanation:
Introduction / Context:
Converting decimal integers to hexadecimal is common in embedded systems, debugging, and memory address representation. Repeated division by 16 yields the hex digits from least significant to most significant.
Given Data / Assumptions:
Concept / Approach:
Use repeated division by 16. Each remainder (0–15) maps to one hex digit (0–9, A–F). Collect remainders bottom-up to form the final hexadecimal string.
Step-by-Step Solution:
Verification / Alternative check:
Expand back to decimal: 116^3 + 416^2 + 7*16 + 6 = 4096 + 1024 + 112 + 6 = 5238, confirming correctness.
Why Other Options Are Wrong:
Common Pitfalls:
Listing remainders in the forward order (top-down) instead of reverse order; mis-mapping remainders above 9 to A–F.
Final Answer:
1476
Discussion & Comments