Why a code has code words with length $3$ add a parity check matrix become length $4$ 
Let $\mathcal{C}$ be the code whose codewords are all the words of length 3. Let $D$ be the code formed by adding a parity check matrix digit to each codeword in the code $C$. Find $D$.


The answer key says $D=\{0000, 1001, 0101, 0011, 1100, 1010, 0110, 1111\}$

I don't see each codeword of $D$ has length $4$. Since $C$ is a code with codewords in length $3$, the length of parity check matrix should be $3$ also. Can someone tell me why $D$ has length $4$ after $C$ adding digit of parity check matrix. Thanks.
 A: That phrase is surely meant to describe the process (IMO better known) as extending a code by adding an overall parity check bit (or some abbreviated version of that phrase). You begin with a word $x$ of length $n$, and then augment it to a word $x'$ of length $n+1$, where $x'=x|0$ or $x'|1$ and the choice is made in such a way that the extended word $x'$ has an even weight.
So for example $x=110$ becomes $x'=1100$, and $x=111$ becomes $x'=1111$.
The mapping $x\mapsto x'$ is linear, so when we extend all the words of a linear code $C$ in this way we get another linear code $C'$ (aka the extended code):


*

*The length of the extended code $C'$ is one more than the length of the original code.

*If the minimum distance $d$ of $C$ is odd, then the minimum distance of $C'$ is $d+1$. But if $d$ is even, then the minimum distance of $C'$ is also $d$. For this reason it typically does not make any sense to extend a code with an even minimum distance.

*The dimensions of $C$ and $C'$ are equal.

*If $H$ is a check matrix of $C$, then you get a check matrix $H'$ for $C'$ by first adding a column of all zeros, and then adding a row of all ones: $$ H'=\left(\begin{array}{c|l}H&0\\111\ldots1&1\end{array}\right).$$

