Question:

The Hamming distance between 11001011 and 10000111 is

Show Hint

The Hamming distance measures the number of differing bits between two binary strings. Simply compare corresponding bits and count the differences.
Updated On: May 3, 2025
  • 4
  • 1
  • 2
  • 3
Hide Solution
collegedunia
Verified By Collegedunia

The Correct Option is D

Solution and Explanation

The Hamming distance is calculated by comparing two strings bit by bit and counting how many bits are different between them. Let's compare the two binary strings:

\( \text{11001011} \) \( \text{10000111} \)

Comparing each bit position:

  • First position: 1 vs 1 (same)
  • Second position: 1 vs 0 (different)
  • Third position: 0 vs 0 (same)
  • Fourth position: 0 vs 0 (same)
  • Fifth position: 1 vs 0 (different)
  • Sixth position: 0 vs 1 (different)
  • Seventh position: 1 vs 1 (same)
  • Eighth position: 1 vs 1 (same)

The bits that differ are at positions 2, 5 and 6.

Therefore, the Hamming distance is 3.

Therefore, the correct answer is 3.

Was this answer helpful?
0
0