Information Theory and Coding Basics
Which of the following is the Hamming distance between the two 7-bit codewords 1011010 and 0110011?
- A0
- B3
- C4
Show answer and explanation
Answer: C. 4
The Hamming distance is the number of positions at which the bits differ. The exclusive OR of the two words is 1101001, which has four 1s, so the Hamming distance is 4. Comparing bit by bit, bits 1, 2, 4 and 7 differ.
- A. 0 is the difference between the numbers of 1s in the two codewords (4 in each). The Hamming distance is counted by comparing bits position by position.
- B. 3 is the number of positions at which the bits agree.
- C. Correct. The four positions at bits 1, 2, 4 and 7 differ.
Continue: 9 more Information Theory and Coding Basics questions