- 2073 Shrawan (CS II) · 3+4 marks
Hamming weight and distance; validate code 100011
Short answer
Hamming weight: number of 1s (e.g., 100011 has weight 3). Hamming distance: number of differing positions. Syndrome is (110), matching column 3 of H, so bit 3 is erroneous; corrected codeword is 101011, message 101.
Define Hamming weight and Hamming distance with examples. Validate the code if received code vector code is [100011] given that H = [1 0 1 1 0 0; 0 1 1 0 1 0; 1 1 0 0 0 1].
Hamming weight
The Hamming weight is the number of non-zero elements in a code vector.
Example: , .
Hamming distance
The Hamming distance is the number of positions in which two code vectors differ, .
Example: , , , so .
Validating the received vector
A received vector is a valid codeword only if the syndrome .
The 1s of are at positions 1, 5, 6, so add columns 1, 5 and 6 of :
| Row | Col 1 | Col 5 | Col 6 | Sum (mod 2) |
|---|---|---|---|---|
| 1 | 1 | 0 | 0 | 1 |
| 2 | 0 | 1 | 0 | 1 |
| 3 | 1 | 0 | 1 | 0 |
The received vector 100011 is not a valid codeword; it contains an error.
Correction (single error)
The syndrome matches column 3 of , so the 3rd bit is in error: .
Check: columns 1, 3, 5, 6 sum to , so 101011 is valid. Corrected message (first 3 bits): 101.
✓ Answer checked by Claude Opus 5.5 (high effort)
Related questions
- Hamming weight/distance; validate x = 0111000 with given H · Communication Systems, chapter 8 · asked 2×
- Hamming distance and weight; (6,3) code check for 100101 · Communication Systems, chapter 8
- Hamming weight and distance; (7,4) cyclic code for 1011 · Communication Systems, chapter 8 · asked 2×
- Hamming distance and weight; rate 1/3 convolutional encoder · Communication Systems, chapter 8
- Hamming distance and weight importance; syndrome decoding · Communication Systems, chapter 8
- Define Hamming weight and Hamming distance · Communication Systems, chapter 8
- Minimum Hamming distance; find k and n · Data Communication, chapter 8
- Construct a (7,4) Hamming code · Data Communication, chapter 8
- Forward error correction using Hamming code · Data Communication, chapter 8
- Speech characteristics and 7-bit Hamming code · Wireless Communication, chapter 6