Binary to dotted-decimal conversion of an IPv4 address Convert the 32-bit address 10000000 00001010 00000010 00011110 to dotted-decimal form.

Difficulty: Easy

Correct Answer: 128.10.2.30

Explanation:


Introduction / Context:
IPv4 addresses are commonly written in dotted-decimal notation, but under the hood they are 32-bit binary values split into four octets. Network engineers and students must be fluent in converting between binary and dotted-decimal formats for subnetting, routing, and troubleshooting.



Given Data / Assumptions:

  • The binary address is 10000000 00001010 00000010 00011110.
  • Each group of 8 bits represents one octet.
  • We convert each octet from binary to decimal independently.


Concept / Approach:

Break the 32-bit binary string into four octets. Convert each octet from base 2 to base 10 using positional weights (128, 64, 32, 16, 8, 4, 2, 1). Concatenate the four decimal values using dots between them to form dotted-decimal notation.



Step-by-Step Solution:

Octet 1: 10000000 = 128.Octet 2: 00001010 = 8 + 2 = 10.Octet 3: 00000010 = 2.Octet 4: 00011110 = 16 + 8 + 4 + 2 = 30.Combine results: 128.10.2.30.


Verification / Alternative check:

Use a calculator or quick mental conversion: the presence of a single leading 1 in the first octet confirms 128; the second octet has bits at 8 and 2 positions; the third only at 2; the fourth at 16, 8, 4, and 2. Everything matches the final value 128.10.2.30.



Why Other Options Are Wrong:

  • 210.20.2.64, 164.100.9.61, 148.20.2.30: do not correspond to the given binary octets.
  • None of the above: incorrect because 128.10.2.30 is correct.


Common Pitfalls:

Misgrouping bits into octets, treating binary as a single big-endian integer without splitting, or miscalculating weights (for example, forgetting that the leftmost bit is 128 in an octet). Practice with common patterns improves speed and accuracy.


Final Answer:

128.10.2.30

Discussion & Comments

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