Given the binary number 10110111, what are its decimal and hexadecimal equivalents?

Difficulty: Medium

Correct Answer: 183 in decimal and B7 in hexadecimal

Explanation:


Introduction / Context:
Number system conversions between binary, decimal, and hexadecimal are basic skills for network engineers. Many configuration registers, addresses, and mask calculations involve understanding how to convert values among these representations. This question asks you to convert a specific binary byte into decimal and hexadecimal.


Given Data / Assumptions:

  • The binary number is 10110111.
  • We are asked to find both the decimal and hexadecimal equivalents.
  • We assume standard unsigned interpretation of this 8 bit binary value.


Concept / Approach:
An 8 bit binary number can be converted to decimal by multiplying each bit by its positional value (128, 64, 32, 16, 8, 4, 2, 1) and summing. To convert to hexadecimal, we group the bits into two four bit nibbles, convert each nibble to a hex digit, and combine the result. The leftmost nibble is the high order hex digit and the rightmost nibble is the low order hex digit.


Step-by-Step Solution:
Step 1: Write the bit positions for 10110111 from left to right: 1 0 1 1 0 1 1 1.Step 2: Assign weights: the leftmost bit represents 128, then 64, 32, 16, 8, 4, 2, and 1.Step 3: Multiply each 1 bit by its weight and sum: 1*128 + 0*64 + 1*32 + 1*16 + 0*8 + 1*4 + 1*2 + 1*1 = 128 + 32 + 16 + 4 + 2 + 1 = 183.Step 4: For hexadecimal, group the bits as 1011 and 0111. The left nibble 1011 is 8 + 0 + 2 + 1 = 11, which corresponds to hex B. The right nibble 0111 is 0 + 4 + 2 + 1 = 7, which is hex 7.Step 5: Combine the two nibbles to get B7 as the hexadecimal representation.


Verification / Alternative check:
As a quick consistency check, note that hex B7 is equal to 11*16 + 7 = 176 + 7 = 183, which matches the decimal value we calculated from the binary representation. This confirms the correctness of the conversion.


Why Other Options Are Wrong:
Option A gives 69 and 0x2102, which do not correspond to the given binary pattern.Option C suggests 173 and A6, which would be 0b10101101, not 0b10110111.Option D states 83 and 0xC5, which represent different binary patterns (01010011 and 11000101 respectively).


Common Pitfalls:
Common mistakes include misreading bit positions, forgetting which nibble is high and which is low when converting to hex, or mixing up decimal and hexadecimal arithmetic. Carefully writing out the positional weights and grouping bits correctly avoids these errors.


Final Answer:
The binary number 10110111 equals 183 in decimal and B7 in hexadecimal.

More Questions from CISCO Certification

Discussion & Comments

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