Skip to main content

Design a (6,3) block code word

Short answer

A systematic (6,3) code with generator matrix G = [I3 | P] where P = [1 1 0; 0 1 1; 1 0 1] yields parity bits p1=m1⊕m3, p2=m1⊕m2, p3=m2⊕m3. For message m=101, the codeword is 101101. This code has dmin=3, detects 2 errors, corrects 1.

Design a codeword of a c(6,3) block code with any suitable generation matrix.

Block code (n, k)

In an (n, k) block code each block of k message bits is mapped to an n-bit codeword by adding q = n − k parity bits. Here n = 6, k = 3, q = 3, rate = 1/2.

Generator matrix

Take a systematic G = [Ik | P], where P is a 3 × 3 parity matrix:

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

Codeword c = m·G (mod 2), giving c = [m1 m2 m3 | p1 p2 p3] where

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

All codewords

MessageCodewordWeight
0000000000
0010011013
0100100113
0110111104
1001001103
1011010114
1101101014
1111110003

Minimum weight = 3, so d_min = 3; the code detects 2 errors and corrects 1 error.

Parity-check matrix

H = [Pᵀ | I₃]:

      | 1 0 1 : 1 0 0 |
 H =  | 1 1 0 : 0 1 0 |
      | 0 1 1 : 0 0 1 |

Check: c·Hᵀ = 0 for every codeword. For c = 101011: row 1 gives c1⊕c3⊕c4 = 1⊕1⊕0 = 0; row 2 gives c1⊕c2⊕c5 = 1⊕0⊕1 = 0; row 3 gives c2⊕c3⊕c6 = 0⊕1⊕1 = 0. All zero, so c is valid.

✓ Answer checked by Claude Sonnet 5.5

All Data Communication chapter 8 questions →