Binary Cyclic Codes and BCH codes

Here are several programs written in C for simulating encoding and decoding procedures of binary cyclic codes and the ever popular binary BCH codes, the topic of Chapter 3 of the book!
 
 

Encoding and decoding of a shortened cyclic code:
RBDS.c

The decoding algorithm used in RBDS.c is based on error trapping. The program emulates the operation of the encoder and decoder of a binary cyclic codes, using bitwise shifts and xor for modulo g(x) operations.
 
 
 

NOTE: For the BCH decoders below and the RS decoders in another section, log and antilog tables are used to solve equations for the unkown error positions (and values for RS codes). The value "-1" in the log table indicates log(0) or "-infinity". Therefore, the programs have a number of testing conditions for this value, when multiplying two elements in the Galois field.
 
 

Encoding and decoding of a shortened binary (48,36,5) BCH code:
bch4836.c

This programs illustrates the application of the PGZ decoding algorithm for t=2.
 
 
 

Encoding and decoding of binary BCH codes with the Berlekamp-Massey decoding algorithm:
bch_bm.c

Uses the Berlekamp-Massey decoding algorithm. Any (valid) code length can be input.
 
 
 

Encoding and decoding of binary BCH codes with the Euclidean algorithm:
bch_euc.c

Decoding with the Euclidean algorithm. Any (valid) code length can be input.
 
 
 

Simulation of a BCH code with binary transmission over an AWGN channel. Berlekamp-Massey algorithm:
bch_awgn.c

The intention is to show you how to incorporate the AWGN/Rayleigh fading models in the basic decoding program.
 
 
 
 

Encoding and errors-and-erasures decoding of binary BCH codes with the Euclidean algorithm:
bch_erasures.c

Erasure correction achieved by two errors-only decoding passes using the Euclidean algorithm. Any (valid) code length can be input.
 
 
 
 

BACK TO INDEX


This page was last updated on May 6, 2002, by Robert H. Morelos-Zaragoza.