What is the Hamming distance between 1101 and 110, if 110 is left-padded as…

2018

What is the Hamming distance between 1101 and 110, if 110 is left-padded as 0110?

  1. A.

    2

  2. B.

    3

  3. C.

    4

  4. D.

    0

Attempted by 312 students.

Show answer & explanation

Correct answer: B

Hamming distance counts the bit positions where two binary strings of equal length differ. Write 110 as 0110. Comparing 1101 and 0110 gives differences in the 1st, 3rd and 4th positions, so the Hamming distance is 3.

Explore the full course: Up Lt Grade Assistant Teacher 2025