I'm working with forward error correcting block codes such as Hamming(7,4) and Golay(23,12). I'm quite new to this field, so there are some things that I don't yet understand. I chose these codes because they are simple enough for me to understand their theory.
I know that I can encode a codeword by either using the generator matrix approach or by using polinomial division.
When decoding, I can use the parity check matrix to get a syndrome vector from the received code word. However, how could my algorithm know which syndrome corresponds to which error? In other words, if I know the syndrome, how do I decide which bits to flip in the received code word to do error correction?
I could, of course, build a lookup table for this (which would be easy), but I'd like to correctly understand the theory first.
Wikipedia says in its Hamming(7,4) article that I should interpret the syndrome as an integer and use it to tell which bit to flip, but this doesn't even work with the example generator matrix. This guy seems to simply flip every possible combination of bits until the errors are fixed. There must be a better way.