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
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.