Golay code Implementation – Correcting Errors¶
Correcting error is a complex and difficult topic.
There are several methods of error code correction. We choose a simple method to implement in software based on the cyclic properties of Golay. It is a ‘nearest neighbor decoder’, because it determines which Golay codeword is closest in terms of hamming distance.
Here is a sketch of the systematic search algorithm.
1. If the syndrome equal zero, then there is no error. So go to the step 5. Else, go to step 2.
2. If the syndrome has a weight of three or less, the syndrome matches the error pattern bit-for-bit, and can be used to XOR the errors out of the codeword; if so, remove the errors and go to step 5, else proceed to step 3.
2a. If the syndrome has a weight of one or two, do the same as the step before. Else proceed.
3. Toggle a trial bit in the codeword in an effort to eliminate one bit error. Restore any previously toggled trial bit. If all 23 bits have been toggled and tried once, go to step 4; else go to step 2a.
4. Rotate the codeword cyclically left by one bit. Go to step 1.
5. Rotate the codeword right to its original position, if needed.
The goal is to play with the codeword in order to get syndrome weight equal three or less, in which case we can exclusive-OR the syndrome with the codeword to negate the errors.
The correction technique is not on the goals for this project. We just mention these simple steps in order to give an idea about this issue. Otherwise, a lot of articles deal with this topic, you can refer to them for more information.