Golay Code Implementation – Detecting Errors » History » Version 12

Version 11 (ABDALLAH, Hussein, 03/13/2016 12:34 PM) → Version 12/14 (ABDALLAH, Hussein, 03/13/2016 12:34 PM)

h1. Golay Code Implementation – Detecting Errors

It is easy to detect errors in a codeword.
• Using the parity bit to check for odd numbers of errors
If parity is correct
• Computing the 23-bit syndrome of the codeword and check for zero
The syndrome is the reminder left after the codeword is divided by the polynomial, modulo-2. It is equal to zero if the Golay code is valid, else non-zero.
A hand computation example is shown below using the previous 686555h, bit reversed for the division process.


101011100011 10101010101001100001011 ( AE3h then 555h then checkbits)
101011100011 (checkbits)
------------ <---------- Exclusive-OR
100100101100
101011100011
------------
111100111100
101011100011
------------
101110111111
101011100011
------------
101011100011
101011100011
------------
000000000000 <-- syndrome = 0

The routine in the next listing does the same sort of calculation.
unsigned long syndrome(unsigned long cw)

/* This function calculates and returns the syndrome
of a [23,12] Golay codeword. */