Binary to octal conversion: Convert the binary number 11111₂ to its octal (base 8) representation.
-
A358
-
B328
-
C378
-
D428
-
ENone of the above
Answer
Correct Answer: 378
Explanation
Introduction / Context:Octal is convenient for grouping binary because 8 = 2^3, so each octal digit corresponds to three binary bits. Converting binary to octal is done by grouping bits into triples from the right and translating each group.
Given Data / Assumptions:
- Binary input: 11111₂ (five bits).
- Target: base-8 representation.
- Leading zeros may be added to complete a leftmost group of three.
Concept / Approach:Pad the left side with zeros to a multiple of three bits, then convert each 3-bit group to its octal digit using the mapping: 000→0 … 111→7. Concatenate the digits in order from most significant group to least.
Step-by-Step Solution:Pad: 11111₂ → 011 111₂.Convert 011₂ → 3₈.Convert 111₂ → 7₈.Combine: 37₈ (written as 378).
Verification / Alternative check:Decimal cross-check: 11111₂ = 31₁₀. 37₈ = 3*8 + 7 = 24 + 7 = 31₁₀. Both agree.
Why Other Options Are Wrong:35₈ = 29₁₀; 32₈ = 26₁₀; 42₈ = 34₁₀. Only 37₈ equals 31₁₀.
Common Pitfalls:Grouping from the left instead of the right without padding; misreading 111₂ as 6 instead of 7.
Final Answer:378