Difficulty: Easy
Correct Answer: 183/B7
Explanation:
Introduction / Context:
Networking engineers routinely move between binary, decimal, and hexadecimal when reading packet headers, subnet masks, and hardware addresses. Converting a binary octet such as 10110111 to its decimal and hexadecimal forms strengthens your ability to parse protocol values quickly in tools like Wireshark and router CLIs.
Given Data / Assumptions:
Concept / Approach:
For decimal, sum the powers of two where the bit is 1. For hexadecimal, group the 8 bits into two 4-bit nibbles, convert each nibble to a hex digit, and combine. Hex shorthand is widely used in documentation (for example, 0xB7).
Step-by-Step Solution:
Write bit weights: 128 64 32 16 8 4 2 1.Map the bits: 1 0 1 1 0 1 1 1.Add positions with 1s: 128 + 32 + 16 + 4 + 2 + 1.Compute decimal: 128 + 32 = 160; 160 + 16 = 176; 176 + 4 = 180; 180 + 2 = 182; 182 + 1 = 183.Group into nibbles: 1011 0111.Convert each nibble: 1011 = B, 0111 = 7.Hex value: B7 (or 0xB7).
Verification / Alternative check:
Use a quick mental check: 183 is close to 192 (11000000). Since 10110111 differs by 9 from 11000000, 192 - 9 = 183, consistent with our sum. For hex, confirm that 0xB7 = 11*16 + 7 = 176 + 7 = 183.
Why Other Options Are Wrong:
Common Pitfalls:
Forgetting to group nibbles from the left, or misreading bit weights (especially 16 vs. 32). Always double-check with a quick hex-to-decimal recomputation.
Final Answer:
183/B7
Discussion & Comments