Even-weight binary code (source code)

= Even-weight binary code

The length-$n$ <even-weight binary code> consists of words $c\in\mathbb F_2^n$ with $\sum_i c_i=0$. It is the <kernel> of the <linear map> that sums the coordinates, equivalently the binary <single parity-check code>.

For $n\ge2$ its parameters are $[n,n-1,2]$: the single independent parity equation leaves <dimension> $n-1$, every nonzero <codeword> has <even> <Hamming weight>, and a word with two nonzero coordinates attains weight $2$. For $n=1$ the code is $\{0\}$, so the distance-$2$ assertion does not apply.