- 2079 Chaitra · 3+5 marks
Hadamard code conditions and 8×8 construction
Short answer
Hadamard code conditions: square N×N matrix, first row all zeros, every other row has N/2 zeros and N/2 ones, and any two rows differ in N/2 positions. Sylvester construction H2n=[Hn Hn; Hn Hn'] gives H8 with binary rows 00000000, 01010101, 00110011, 01100110, 00001111, 01011010, 00111100, 01101001.
Write the steps to satisfy condition for Hadamard code. Construct 8 by 8 Hadamard code that satisfies above conditions.
Conditions (steps) for a Hadamard code
A Hadamard (Walsh) code is a set of N codewords of length N (N = 2ᵏ) taken from the rows of a Hadamard matrix. The conditions it must satisfy are:
- Square matrix: N rows and N columns, entries only 0/1 (or +1/−1).
- First row (and first column) all zeros (all +1), i.e. the matrix is normalized.
- Equal weight: every row except the first has exactly N/2 zeros and N/2 ones.
- Orthogonality: any two different rows agree in exactly N/2 places and differ in N/2 places. In ±1 form, the inner product of two different rows is 0, so H·Hᵀ = N·I.
Steps to construct (Sylvester method) – these steps guarantee the above conditions:
- Start with H₁ = [0].
- Form H₂ₙ from Hₙ by placing Hₙ in the top-left, top-right and bottom-left blocks and its complement Hₙ′ in the bottom-right block:
H2n = | Hn Hn |
| Hn Hn' |
- Repeat until the required size N is reached (1 → 2 → 4 → 8).
Construction of 8 × 8 Hadamard code
H1 = [0]
H2 = | H1 H1 | = | 0 0 |
| H1 H1'| | 0 1 |
H4 = | H2 H2 | = | 0 0 0 0 |
| H2 H2'| | 0 1 0 1 |
| 0 0 1 1 |
| 0 1 1 0 |
H8 = | H4 H4 | (H' = complement of H)
| H4 H4'|
Writing H8 in full:
c1 c2 c3 c4 c5 c6 c7 c8
W0: 0 0 0 0 0 0 0 0
W1: 0 1 0 1 0 1 0 1
W2: 0 0 1 1 0 0 1 1
W3: 0 1 1 0 0 1 1 0
W4: 0 0 0 0 1 1 1 1
W5: 0 1 0 1 1 0 1 0
W6: 0 0 1 1 1 1 0 0
W7: 0 1 1 0 1 0 0 1
Verification:
- Row W0 is all zeros; every other row has four 0s and four 1s.
- Example: W1 = 01010101 and W2 = 00110011 agree in positions 1, 4, 5, 8 and differ in 2, 3, 6, 7, i.e. 4 agreements and 4 disagreements, so they are orthogonal. The same holds for every pair (checked for all 28 pairs).
- Minimum distance between codewords = N/2 = 4.
These 8 orthogonal codewords are used as Walsh spreading codes to separate channels in CDMA (IS-95 uses the 64 × 64 version).
✓ Answer checked by Claude Opus 5.5 (high effort)
Related questions
- Turbo coding and 8×8 Hadamard code · Wireless Communication, chapter 6
- Hadamard matrix H8 · Wireless Communication, chapter 6
- Construct a (7,4) Hamming code · Data Communication, chapter 8
- Huffman code tree steps with example · Multimedia System, chapter 5 · asked 7×
- Steps of sewer construction · Sanitary Engineering, chapter 3
- Construction steps of cement concrete pavement · Transportation Engineering II, chapter 3