Skip to main content

(6,3) block code words, weights, dmin

Short answer

Block codes map k-bit message blocks to n-bit codewords via c=mG. For this (6,3) systematic code, all eight codewords have weights 0, 3, 3, 4, 3, 4, 4, 3. Minimum Hamming distance d_min = 3 (smallest non-zero weight), so it detects 2 errors and corrects 1.

Define block codes. The systematic generator matrix for a (6,3) block code is given below. Obtain all code words, Hamming weights and minimum Hamming distance from this matrix. G = [1 0 0 : 0 1 1; 0 1 0 : 1 0 1; 0 0 1 : 1 1 0]

Block codes

A block code (n, k) divides the data into blocks of k bits and encodes each block into an n-bit codeword by adding n − k check bits. The code rate is k/n. Codeword c = m·G, where G is the k × n generator matrix.

Codewords

Here G = [I₃ | P] with rows 100011, 010101, 001110. For message m = (m1 m2 m3), c = [m1 m2 m3 | p1 p2 p3] with

  • p1 = m2 ⊕ m3
  • p2 = m1 ⊕ m3
  • p3 = m1 ⊕ m2
MessageCodewordHamming weight
0000000000
0010011103
0100101013
0110110114
1001000113
1011011014
1101101104
1111110003

Example: 011 = row 2 ⊕ row 3 = 010101 ⊕ 001110 = 011011.

Hamming weights

Weights are 0, 3, 3, 4, 3, 4, 4, 3 (the weight of a codeword is the number of 1s).

Minimum Hamming distance

For a linear code, d_min = minimum weight of the non-zero codewords = 3.

(The distance between any two codewords is the weight of their sum, which is again a codeword, so it is at least 3.)

Answer: d_min = 3; the code detects 2 errors and corrects 1 error.

✓ Answer checked by Claude Sonnet 5.5

All Data Communication chapter 8 questions →