Binary Cyclic Codes and BCH codes

Below are links to several programs written in C, and Matlab scripts, for simulating encoding/decoding procedures and analyzing  binary cyclic codes and 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.


Illustration of a PGZ errors-only decoder of a binary primitive BCH code:
bch_example.m

Compute the generator polynomial of a binary Euclidean geometry (EG) code:
egcodepol.m

Compute the generator polynomial of a binary projective geometry (PG) code:
pgcodepol.m

Compute the generator polynomial of a binary BCH (15,5,7) code:
genpol_bch_150507.m


NOTE: For the BCH decoders in C language 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

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

Shows how to incorporate the AWGN/Rayleigh fading models in a 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 CONTENTS


This page was last updated August 6, 2008, by Robert H. Morelos-Zaragoza.