Binary to octal — group bits by threes Convert the binary number 010111100 (base 2) into its octal (base 8) representation.

Difficulty: Easy

Correct Answer: 2748

Explanation:


Introduction / Context:
Octal and binary interconvert by grouping binary digits into sets of three, starting from the right. Each 3-bit group corresponds to one octal digit (0–7). This method is fast and avoids arithmetic division when the binary string is already available.


Given Data / Assumptions:

  • Binary input: 010111100.
  • We may pad the most significant side with zeros to form complete 3-bit groups.
  • Octal digits map from 000→0 up to 111→7.


Concept / Approach:

Partition the binary string into 3-bit chunks from right to left, then translate each chunk to its octal digit. Keep the left-to-right order of the resulting octal digits.


Step-by-Step Solution:

Create groups: 010 111 100.Map to octal: 010→2, 111→7, 100→4.Concatenate octal digits: 274 (base 8).Match option formatting with trailing 8: 2748.


Verification / Alternative check:

Round-trip: 2→010, 7→111, 4→100; concatenation recreates 010111100. The mapping is consistent.


Why Other Options Are Wrong:

1728 and 1748: first digit 1 would require leading bits 001 (not present here).

2728: middle digit 7 is correct, but the final digit 2 would require last group 010, whereas we have 100 → 4.


Common Pitfalls:

Grouping from the left instead of the right, or forgetting to pad on the leftmost side. Always ensure the total bit count is a multiple of three before conversion.


Final Answer:

2748

Discussion & Comments

No comments yet. Be the first to comment!
Join Discussion