given $g(x) = (1+x)(1+x+x^3) \in F_2[x]$ as the generator polynomial of a binary (7,3)-code, I am trying to construct a generator matrix (of the form $(I_3|A)$ ) and parity check matrix. Below is my chain of thought: Since $(1+x)(1+x+x^3) == 1 + x^2 + x^3 + x^4$, but how do i choose $h(x)$? Is $h(x) = 1 + x^2 + x^3$ ok? What do i do after choosing $h(x)$? Is the matrix below a correct generator matrix for this case?
1 0 0 0 1 1 1
0 1 0 1 0 1 1
0 0 1 1 1 0 1
If yes, how can I get a the parity check matrix from this? if no, why not?