- 2075 Chaitra (CS II) · 2+5 marks
Hamming distance and weight; (6,3) code check for 100101
Short answer
Hamming weight is the number of 1s in a vector; Hamming distance is the number of differing positions between two vectors. The syndrome for 100101 is (000), so it is a valid codeword without error.
Define hamming distance and hamming weight. For a (6,3) code, the parity check matrix is given by H = [1 0 1 _ 0 0; 0 1 1 _ 1 0; 1 1 0 _ 0 1] (as printed, one column of H is blank; it is most likely H = [1 0 1 1 0 0; 0 1 1 0 1 0; 1 1 0 0 0 1]). Determine whether a received code vector 100101 is erroneous.
Hamming weight
The Hamming weight of a code vector is the number of 1s in it. Example: .
Hamming distance
The Hamming distance between two vectors is the number of positions where they differ, . Example: .
Checking the received vector
The printed has a blank column; it is taken as the standard systematic form :
A received vector is error-free (a valid codeword) if its syndrome is zero.
: the 1s are in positions 1, 4 and 6, so is the mod-2 sum of columns 1, 4 and 6 of :
| Row | Col 1 | Col 4 | Col 6 | Sum |
|---|---|---|---|---|
| 1 | 1 | 1 | 0 | 0 |
| 2 | 0 | 0 | 0 | 0 |
| 3 | 1 | 0 | 1 | 0 |
The syndrome is zero, so 100101 is a valid codeword (not erroneous), assuming no undetectable error pattern.
Check with the generator matrix :
Message 100 gives , exactly the received vector. Message = 100.
(If a syndrome were non-zero, matching it to a column of would locate a single-bit error; this code has .)
✓ Answer checked by Claude Opus 5.5 (high effort)
Related questions
- (6, 3) code from parity check matrix · Communication Systems, chapter 8
- Hamming weight and distance; validate code 100011 · Communication Systems, chapter 8
- Hamming weight/distance; validate x = 0111000 with given H · Communication Systems, chapter 8 · asked 2×
- 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
- Construct a (7,4) Hamming code · Data Communication, chapter 8
- Minimum Hamming distance; find k and n · 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