Skip to main content

All code words of the (6,3) code with given G

Short answer

A (6,3) linear block code maps 3-bit messages to 6-bit codewords via c=mG. The eight codewords are 000000, 001101, 010110, 011011, 100111, 101010, 110001, 111100.

What are block codes? The generator matrix for a (6,3) block code is shown below. Obtain all code words. G = [1 0 0 : 1 1 1; 0 1 0 : 1 1 0; 0 0 1 : 1 0 1]

Block codes

A block code (n, k) splits the data stream into blocks of k bits and maps each block to an n-bit codeword by adding n − k parity bits. There are 2ᵏ valid codewords out of 2ⁿ possible words; the code rate is k/n. For a linear block code, c = m·G (mod 2).

Codewords of the (6,3) code

G = [I₃ | P] with rows 100111, 010110, 001101. For m = (m1 m2 m3): c = [m1 m2 m3 | m1⊕m2⊕m3, m1⊕m2, m1⊕m3]

Message mOperationCodewordWeight
000–0000000
001row 30011013
010row 20101103
011row 2 ⊕ row 30110114
100row 11001114
101row 1 ⊕ row 31010103
110row 1 ⊕ row 21100013
111all rows1111004

Example: 011 → 010110 ⊕ 001101 = 011011.

The minimum non-zero weight is 3, so d_min = 3 (detects 2 errors, corrects 1).

✓ Answer checked by Claude Sonnet 5.5

All Data Communication chapter 8 questions →