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:
1) 5238 / 16 = 327 remainder 6 → least significant hex digit = 6.2) 327 / 16 = 20 remainder 7 → next digit = 7.3) 20 / 16 = 1 remainder 4 → next digit = 4.4) 1 / 16 = 0 remainder 1 → most significant digit = 1.5) Read remainders in reverse: 1 4 7 6 → 1476₁₆.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