What is the hamming distance between the codes '11001011' and ‘10000111'
What is the hamming distance between the codes '11001011' and ‘10000111' Correct Answer 3
Concept:
Hamming distance is a metric for comparing two binary strings. While comparing two binary strings of equal length, Hamming distance is the number of bit positions in which the two bits are different.
Explanation:
Given code words are: 11001011 and 10000111
Hamming distance can also be calculated by taking XOR of two code words.
|
|
1 |
1 |
0 |
0 |
1 |
0 | 1 | 1 |
|
⊕ |
1 |
0 |
0 |
0 |
0 |
1 | 1 | 1 |
|
|
0 |
1 |
0 |
0 |
1 |
1 | 0 | 0 |
The number of 1’s in XOR result is 3 ∴ Minimum Hamming distance is 3 only
মোঃ আরিফুল ইসলাম
Feb 20, 2025