Decode the message $(1,1,1,0,1,1,1)$ using the Hamming $ (7,4)$ code

479 Views Asked by At

The question is asking me to decode $(1,1,1,0,1,1,1)$ using Hamming $(7,4)$ code. I know that I am suppose to set a $3 \times 7$ matrix ${\bf H}$ and multiply it by ${\bf r}$ and set it equal to zero, but I am confused to how I determine what the values for ${\bf H}$ are.

1

There are 1 best solutions below

4
On

The parity-check matrix of the mentioned code is: $${\bf H} =\left(\begin{array}{ccccccc} 1&0&1&0&1&0&1\\ 0&1&1&0&0&1&1\\ 0&0&0&1&1&1&1 \end{array}\right).$$ Now if you multiply your received vector ${\bf r} = (1,~1,~1,~0,~1,~1,~1)$ by ${\bf H}$, you get: $${\bf H}{\bf r}^T = (4,~4,~3)^T$$ that is equal to $(0,~0,~1)^T$ modulo two (binary operations). This column corresponds to the $4$th column oh ${\bf H}$, which implies that there has been an error on that position. Hence the sent codeword was ${\bf c} = (1,~1,~1,~1,~1,~1,~1)$. This can be verified to be codeword by checking if ${\bf H}{\bf c}^T$ equals zero modulo two or not.