Skip to main content
\(\newcommand{\identity}{\mathrm{id}} \newcommand{\notdivide}{{\not{\mid}}} \newcommand{\notsubset}{\not\subset} \newcommand{\lcm}{\operatorname{lcm}} \newcommand{\gf}{\operatorname{GF}} \newcommand{\inn}{\operatorname{Inn}} \newcommand{\aut}{\operatorname{Aut}} \newcommand{\Hom}{\operatorname{Hom}} \newcommand{\cis}{\operatorname{cis}} \newcommand{\chr}{\operatorname{char}} \newcommand{\Null}{\operatorname{Null}} \renewcommand{\vec}[1]{\mathbf{#1}} \newcommand{\lt}{<} \newcommand{\gt}{>} \newcommand{\amp}{&} \)

Section15.5Section 15-5 Coding



This first cell computes the parity check matrix from the generator matrix. You need to refer to this matrix when you get a syndrome in the next cell.

The parity check matrix isn't unique. It is any matrix with the property that \(b\) is a code word if and only if \(b P\) is equal to a row of zeros. If an error occured in position \(k\) of the data, then the syndrome, \(b P\), will be row \(k\) of \(P\).

You can use this cell to compute the syndrome for any sequence of seven bits. Just replace the list of seven zeros in line 7 with whatever data you have. After you've identified the syndrome and corrected each 7-tuple, you can discard the last three bits.

Once you've corrected all four 7-tuples, combine them into a sequence of 16 bits. This code below will convert that sequence into a base 10 number. Just replace the sequence of all 1's with your sequence

WeBWorK Exercise