# Hamming code parity check matrix.

Let's say we have a matrix

$$H= \begin{bmatrix} 0 & 0 & 0 & 1 & 1 & 1 & 1 \\ 0 & 1 & 1 & 0 & 0 & 1 & 1 \\ 1 & 0 & 1 & 0 & 1 & 0 & 1 \end{bmatrix}$$

Which is a hamming code parity check matrix

I need to find code generator matrix and then find code words if sequence being sent is $$0 0 0 0 0 1 1 1 1 0 0 1 1 1 1 0$$

Now, when i find code generator matrix, its dimensions are supposed to be 4x7. Since i have a sequence of twelve numbers. How am i supposed to determine the code words when number of elements in a given sequence is not equal to number of rows of generator matrix so multiplication of that vector and generator matrix is not possible? Any help appreciated!

• In block coding, when using an $(n,k)$ block code, the message to be transmitted is split into blocks of $k$ bits. These are then encoded to match what you would get when using a prescribed generator matrix. Commented Jun 17, 2019 at 9:31
• @JyrkiLahtonen Does this mean that i need to code this segment part by part, in such way that i first take first four bit and code them, then bits from 5th to 8th and so on... Is that right? Commented Jun 17, 2019 at 10:40
• Yes. That's correct. Commented Jun 17, 2019 at 10:46
• @JyrkiLahtonen Thanks for help! I appreciate it. Commented Jun 17, 2019 at 12:34