- Asked 2/48
- 2072 Chaitra (CS II) · 2+4 marks
- 2071 Chaitra (CS II) · 2+4 marks
Hamming weight/distance; validate x = 0111000 with given H
Short answer
Hamming weight of x=(0111000) is 3. Hamming distance from all-zero is 3. Validity: syndrome s = H x^T = sum of columns 2,3,4 of H = (0,0,0)^T, so x is a valid codeword.
Define Hamming weight and Hamming distance for a code vector x = (0111000) and the parity check matrix H given below. Prove that, the given code is valid. H = [1 1 1 0 1 0 0; 1 1 0 1 0 1 1; 1 0 1 1 0 0 1] (3×7)
Hamming weight
The Hamming weight of a code vector is the number of 1s in it. For :
Hamming distance
The Hamming distance between two code vectors is the number of positions in which they differ, . For example, distance of from the all-zero codeword is , and from it is .
Proof that x is a valid codeword
A vector is a valid codeword of the code if and only if its syndrome is zero:
Only positions 2, 3 and 4 of are 1, so is the modulo-2 sum of columns 2, 3 and 4 of :
| Row | Col 2 | Col 3 | Col 4 | Sum (mod 2) |
|---|---|---|---|---|
| 1 | 1 | 1 | 0 | |
| 2 | 1 | 0 | 1 | |
| 3 | 0 | 1 | 1 |
Since the syndrome is the zero vector, satisfies all three parity-check equations. Hence the given code vector is valid.
✓ Answer checked by Claude Opus 5.5 (high effort)
Related questions
- Hamming weight and distance; validate code 100011 · Communication Systems, chapter 8
- 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×
- (6, 3) code from parity check matrix · Communication Systems, chapter 8
- Hamming distance and weight; rate 1/3 convolutional encoder · Communication Systems, chapter 8
- Hamming distance and weight importance; syndrome decoding · Communication Systems, chapter 8