Skip to main content

(6, 3) code from parity check matrix

Short answer

G = [I3 | P] with P = [1 1 0; 0 1 1; 1 0 1]. Codeword for 110 is 110101. Received 110111 yields syndrome 010, so it contains an error; corrected codeword is 110101.

A (6, 3) error control code has the following parity check matrix. H = [1 0 1 1 0 0; 1 1 0 0 1 0; 0 1 1 0 0 1] a) Determine the generator matrix G b) Generate a codeword for message 110 c) Check whether the received code word 110111 has error or not.

For a systematic (n,k)(n,k) linear block code, G=[Ik∣P]G=[I_k\mid P] and H=[PT∣In−k]H=[P^T\mid I_{n-k}], with GHT=0GH^T=0. A codeword is c=mG\mathbf{c}=\mathbf{m}G, and for a received vector r\mathbf{r} the syndrome is s=rHT\mathbf{s}=\mathbf{r}H^T. All arithmetic is modulo 2.

a) Generator matrix

H=[101100110010011001]=[PT∣I3],PT=[101110011]H=\begin{bmatrix}1&0&1&1&0&0\\1&1&0&0&1&0\\0&1&1&0&0&1\end{bmatrix}=[P^T\mid I_3],\qquad P^T=\begin{bmatrix}1&0&1\\1&1&0\\0&1&1\end{bmatrix}

Transposing:

P=[110011101],G=[I3∣P]=[100110010011001101]P=\begin{bmatrix}1&1&0\\0&1&1\\1&0&1\end{bmatrix},\qquad G=[I_3\mid P]=\begin{bmatrix}1&0&0&1&1&0\\0&1&0&0&1&1\\0&0&1&1&0&1\end{bmatrix}

b) Codeword for message 110

c=mG=1⋅(100110)⊕1⋅(010011)⊕0⋅(001101)=110101\mathbf{c}=\mathbf{m}G=1\cdot(100110)\oplus1\cdot(010011)\oplus0\cdot(001101)=110101

Parity bits directly: p1=m1⊕m3=1⊕0=1p_1=m_1\oplus m_3=1\oplus0=1, p2=m1⊕m2=1⊕1=0p_2=m_1\oplus m_2=1\oplus1=0, p3=m2⊕m3=1⊕0=1p_3=m_2\oplus m_3=1\oplus0=1.

Codeword = 110 101

Check: cHT\mathbf{c}H^T: row 1: 1+0+0+1=01+0+0+1=0, row 2: 1+1+0+0=01+1+0+0=0, row 3: 1+0+0+1=01+0+0+1=0. Syndrome 000000, so it is valid.

All codewords (for reference; dmin=3d_{min}=3, corrects 1 error):

m\mathbf{m}c\mathbf{c}m\mathbf{m}c\mathbf{c}
000000000100100110
001001101101101011
010010011110110101
011011110111111000

c) Check received word 110111

s=rHT,r=(1 1 0 1 1 1)\mathbf{s}=\mathbf{r}H^T,\quad \mathbf{r}=(1\,1\,0\,1\,1\,1)

Each syndrome bit is one row of HH dotted with r\mathbf{r}:

Row of HHProduct termsss
1 0 1 1 0 01+0+0+1+0+01+0+0+1+0+00
1 1 0 0 1 01+1+0+0+1+01+1+0+0+1+01
0 1 1 0 0 10+1+0+0+0+10+1+0+0+0+10
s=(0 1 0)≠0\mathbf{s}=(0\ 1\ 0)\neq\mathbf{0}

The syndrome is non-zero, so the received word has an error.

Locating it: s=010\mathbf{s}=010 equals the 5th column of HH (0,1,0)T(0,1,0)^T, so assuming a single error, bit 5 is wrong: e=000010\mathbf{e}=000010.

c^=r⊕e=110111⊕000010=110101\hat{\mathbf{c}}=\mathbf{r}\oplus\mathbf{e}=110111\oplus000010=110101

Answer: GG as above; codeword for 110 is 110101; received 110111 is in error (syndrome 010), corrected codeword 110101, message 110.

✓ Answer checked by Claude Opus 5.5 (high effort)

All Communication Systems chapter 8 questions →