Skip to main content

Design a C(8,4) linear block code

Short answer

Linear block codes: any sum of codewords is a codeword. For C(8,4) with systematic G=[I4|P] using parity p1=m2⊕m3⊕m4, etc., message 1011 gives codeword 10110100. Minimum distance d_min = 4.

What are linear block codes? Design a code word of a C(8,4) block code with any suitable generation matrix.

A linear block code is a block code in which the modulo-2 sum of any two codewords is also a codeword. A C(n, k) code encodes k message bits into n bits by c = m·G, where G is a k × n generator matrix. It has 2ᵏ codewords, and d_min equals the minimum non-zero codeword weight.

Design of C(8,4)

Here n = 8, k = 4, so 4 parity bits are added (rate 1/2). Use the systematic form G = [I₄ | P]:

      | 1 0 0 0 : 0 1 1 1 |
 G =  | 0 1 0 0 : 1 0 1 1 |
      | 0 0 1 0 : 1 1 0 1 |
      | 0 0 0 1 : 1 1 1 0 |

Parity equations for c = [m1 m2 m3 m4 | p1 p2 p3 p4]:

  • p1 = m2 ⊕ m3 ⊕ m4
  • p2 = m1 ⊕ m3 ⊕ m4
  • p3 = m1 ⊕ m2 ⊕ m4
  • p4 = m1 ⊕ m2 ⊕ m3

Example codeword

Message 1011: c = row 1 ⊕ row 3 ⊕ row 4 = 10000111 ⊕ 00101101 ⊕ 00011110 = 10110100.

All 16 codewords

mcmc
000000000000100010000111
000100011110100110011001
001000101101101010101010
001100110011101110110100
010001001011110011001100
010101010101110111010010
011001100110111011100001
011101111000111111111111

Minimum weight of non-zero codewords = 4, so d_min = 4: the code detects 3 errors and corrects 1 (single-error correcting, double-error detecting). Parity-check matrix H = [Pᵀ | I₄].

✓ Answer checked by Claude Sonnet 5.5

All Data Communication chapter 8 questions →