Difficulty: Easy
Correct Answer: 5A
Explanation:
Introduction / Context:Converting between binary and hexadecimal is a routine task because hex compactly represents binary in groups of four bits (nibbles). This saves space and reduces errors when reading or writing long binary values in firmware, datasheets, and debugging logs.
Given Data / Assumptions:
Concept / Approach:Group bits from the binary point outward into sets of four, padding the most significant group with leading zeros if needed. Translate each nibble to its corresponding hex digit using the 8421 weighting (8-4-2-1).
Step-by-Step Solution:
Pad: 1011010 → 0101 1010 (groups of four).Left nibble 0101 = 5 (since 08 + 14 + 02 + 11 = 5).Right nibble 1010 = A (since 18 + 04 + 12 + 01 = 10 → A).Combine: 5A.Verification / Alternative check:Convert back: 5A_hex = 5*16 + 10 = 80 + 10 = 90. Binary 1011010₂ = 90 decimal. Round-trip confirms correctness.
Why Other Options Are Wrong:
Common Pitfalls:Grouping from the wrong end or forgetting to pad with a leading zero. Always ensure four-bit alignment when mapping to hex.
Final Answer:5A
Discussion & Comments