# Non-systematic (7, 4) Hamming code encoder

I have to do the scheme of the non-systematic Hamming code encoder (not cyclic but classic). But I have not found any source where it would be written how to build a generating matrix and create a system of linear equations for finding symbols of code combinations. How is this done?

Once again, I consider the non-systematic classical (n, k) Hamming code. For example, (7, 4) Hamming code.

• (7,4) Hamming is really easy to understand. I'm not sure how it could be a struggle. But are you asking for something far more general? – jonk Jun 19 '19 at 1:46
• He's looking for the XOR parity codecs – Tony Stewart Sunnyskyguy EE75 Jun 19 '19 at 1:48
• Just to get the link into here: Hamming. – jonk Jun 19 '19 at 4:22
• @jonk Systematic Hamming code is really easy to understand. But the unsystematic is not clear. For example, there is a matrix G of an unsystematic (7, 4) Hamming code. How to create a system of linear equations for finding symbols of code combinations? $$G = \begin{pmatrix}1 & 1 & 0 & 1 & 0 & 0 & 0 \\\ 0 & 1 & 1 & 0 & 1 & 0 & 0 \\\ 0 & 0 & 1 & 1 & 0 & 1 & 0 \\\ 0 & 0 & 0 & 1 & 1 & 0 & 1\end{pmatrix}$$ – alexhak Jun 19 '19 at 10:46

AS I recall from the '70's it uses XOR gates but now in a small CPLD.
P1=d0 ⊕ d2 ⊕ d4 ⊕ d6
P2=d1 ⊕ d2 ⊕ d4 ⊕ d6
P3=d3 ⊕ d4 ⊕ d5⊕ d6

b3, b2, b1, P3, b0, P2, P1 7 bit string = 3 parity bits + 4 data bits = Hamming 7,4
sent as d6 d5 d4 d3 d2 d1 d0 repeat for both 4b nibble to get 14 bit string.

Dave? @Jonk correct me if I missed something.

• You are right, but you described a systematic (7, 4)-code. Non-systematic should work differently, because the test matrix is chaotic. – alexhak Jun 19 '19 at 10:33
• Not so chaotic, just funky: swap 2 columns, then XOR 2 or 3 rows and replace any row with result. But repeat same for G matrix decoder. – Tony Stewart Sunnyskyguy EE75 Jun 19 '19 at 11:43
• As I understand it, is not necessary to rearrange only 2 columns (can be any number). For example, $$G = \begin{pmatrix}1 & 1 & 0 & 1 & 0 & 0 & 0 \\\ 0 & 1 & 1 & 0 & 1 & 0 & 0 \\\ 0 & 0 & 1 & 1 & 0 & 1 & 0 \\\ 0 & 0 & 0 & 1 & 1 & 0 & 1\end{pmatrix}$$ – alexhak Jun 19 '19 at 11:51
• But then it turns out that the test matrix will look like this: $$H = \begin{pmatrix}0 & 1 & 0 & 1 & * & * & * \\\ 0 & 0 & 1 & 0 & * & * & * \\\ 0 & 0 & 0 & 1 & * & * & *\end{pmatrix}$$ How do I determine the remaining " * * *"columns? – alexhak Jun 19 '19 at 11:54
• Looks that way! As long as identical sequential operations are done, 1⊕1=0 – Tony Stewart Sunnyskyguy EE75 Jun 19 '19 at 11:55