How do we know a linear code have even weight? In coding theory, How do we know a linear code have even weight?
For example, we have a linear code (12,3,6), how to identify each word of it get even weight?
 A: In every linear binary code,
either
all the codewords have even weight
or 
half the codewords have even weight and half have odd weight
So, if if your question is "How can we tell whether a linear
binary code has codewords
of even weight or not?" then you have nothing to worry about because all
linear binary codes have codewords of even weight.
On the other hand, if your question is "How can we tell whether all
the codewords in a linear binary code have even weight?" then some
work is needed. One dead giveaway is that if by $[n,k,d]$ is meant
a linear binary code of length $n$ with $2^k$ codewords and minimum
distance $d$, then the code has codewords of odd weight whenever $d$ is
odd.  However, when $d$ is even, one cannot say that there are no codewords
of odd weight.  Consider, for example, the $[5,2,2]$ code with codewords
$$00000, 11000, 00111, 11111$$
So, when $d$ is even, we need more information about the code to figure
out whether the code has only even-weight codewords.
Here is a $[12,3,6]$ code in which all the codewords have even weight.
its generator matrix is given by
$$G = \begin{bmatrix}111&111&000&000\\000&000&111&111\\000&111&111&000\end{bmatrix}$$
Can you figure out a relationship between this code and the $[4,3,2]$ code
consisting of all even-weight binary vectors of length $4$?
