How to find generator matrix and parity check matrix?

81 Views Asked by At

The $[n, n − 1, 2]$-parity check code has messages consisting of binary strings of length $n − 1$. Messages are encoded by adding an extra symbol which is the sum (mod 2) of the previous symbols.

I was asked to find the generator matrix and parity matrix for this code. My attempts were that:

I know the length is $n$, and the dimension $k= n-1$.

The generator matrix has the form $[ I_k | A_{k\times(n-k)} ]$ where $I_k $ is the identity matrix, and $A_{k\times(n-k)}$ is a $k\times(n-k)$ matrix.

$I_k$ is easy, but how can I determine the $A_{k\times(n-k)}$ matrix? As I don't have particular codewords, so not sure how it's gonna work.