Golay Code Implementation – Detecting Errors » History » Version 11

ABDALLAH, Hussein, 03/13/2016 12:34 PM

1 1 ABDALLAH, Hussein
h1. Golay Code Implementation – Detecting Errors
2 10 ABDALLAH, Hussein
3 9 ABDALLAH, Hussein
It is easy to detect errors in a codeword. 
4 9 ABDALLAH, Hussein
•	Using the parity bit to check for odd numbers of errors
5 9 ABDALLAH, Hussein
If parity is correct
6 9 ABDALLAH, Hussein
•	Computing the 23-bit syndrome of the codeword and check for zero
7 9 ABDALLAH, Hussein
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.
8 9 ABDALLAH, Hussein
A hand computation example is shown below using the previous 686555h, bit reversed for the division process.
9 1 ABDALLAH, Hussein
10 8 ABDALLAH, Hussein
                                          
11 8 ABDALLAH, Hussein
     101011100011  10101010101001100001011  ( AE3h then 555h then checkbits)                        
12 1 ABDALLAH, Hussein
                   101011100011 (checkbits)                                    
13 1 ABDALLAH, Hussein
                   ------------  <---------- Exclusive-OR                                     
14 1 ABDALLAH, Hussein
                        100100101100                                
15 1 ABDALLAH, Hussein
                        101011100011                                
16 1 ABDALLAH, Hussein
                        ------------                                
17 1 ABDALLAH, Hussein
                          111100111100                              
18 1 ABDALLAH, Hussein
                          101011100011                              
19 1 ABDALLAH, Hussein
                          ------------                              
20 1 ABDALLAH, Hussein
                           101110111111                             
21 1 ABDALLAH, Hussein
                           101011100011                             
22 1 ABDALLAH, Hussein
                           ------------                             
23 1 ABDALLAH, Hussein
                              101011100011                          
24 1 ABDALLAH, Hussein
                              101011100011                          
25 1 ABDALLAH, Hussein
                              ------------                          
26 3 ABDALLAH, Hussein
                              000000000000 <-- syndrome = 0
27 11 ABDALLAH, Hussein
28 11 ABDALLAH, Hussein
The routine in the next listing does the same sort of calculation. 
29 11 ABDALLAH, Hussein
unsigned long syndrome(unsigned long cw)