UNB ECE4253 Digital Communications
Department of Electrical and Computer Engineering - University of New Brunswick, Fredericton, NB, Canada

Polynomial Code Generator Tool

Given a generator polynomial G(x) of degree p and a binary input data size k, this online tool creates and displays a generator matrix G, a check matrix H, and a demonstration of the resulting systematic codewords for this (n,k) code, where n=p+k. The nature of G(x) and the value of k will determine the utility of the codewords in a error control scheme.

The mathematics of error control can be based on either a matrix or a polynomial approach. This page shows how any polynomial G(x) may be used to define an equivalent check matrix and generator matrix. Conversely, it is not always possible to find a polynomial G(x) corresponding to an arbitary generator matrix.

The generator polynomial G(x) can be up to degree p=36, and the input data size is limited to k=36 bits.


Polynomial G(x)

G(x) = x10+x8+x5+x4+x2+x+1

(10100110111)


Complete Set of (15,5) Codewords  (cyclic)

DATA = 00 : 000000000000000
DATA = 01 : 000010100110111
DATA = 02 : 000101001101110
DATA = 03 : 000111101011001
DATA = 04 : 001000111101011
DATA = 05 : 001010011011100
DATA = 06 : 001101110000101
DATA = 07 : 001111010110010
DATA = 08 : 010001111010110
DATA = 09 : 010011011100001
DATA = 10 : 010100110111000
DATA = 11 : 010110010001111
DATA = 12 : 011001000111101
DATA = 13 : 011011100001010
DATA = 14 : 011100001010011
DATA = 15 : 011110101100100
DATA = 16 : 100001010011011
DATA = 17 : 100011110101100
DATA = 18 : 100100011110101
DATA = 19 : 100110111000010
DATA = 20 : 101001101110000
DATA = 21 : 101011001000111
DATA = 22 : 101100100011110
DATA = 23 : 101110000101001
DATA = 24 : 110000101001101
DATA = 25 : 110010001111010
DATA = 26 : 110101100100011
DATA = 27 : 110111000010100
DATA = 28 : 111000010100110
DATA = 29 : 111010110010001
DATA = 30 : 111101011001000
DATA = 31 : 111111111111111
← less


Distance Analysis

This complete set of 15-bit codewords has a minimum distance D=7, correcting up to t=3 errors.

 0001020304050607080910111213141516171819202122232425262728293031
00--07070808070708080707080807070807080807070808070708080707080815
0107--080707080807070808070708080708070708080707080807070808071508
020708--0707080807070808070708080708070708080707080807070808150708
03080707--08070708080707080807070807080807070808070708080715080807
0408070708--070708080707080807070807080807070808070708081507080807
050708080707--0807070808070708080708070708080707080807150808070708
06070808070708--07070808070708080708070708080707080815070808070708
0708070708080707--080707080807070807080807070808071508080707080807
080807070808070708--0707080807070807080807070808150708080707080807
09070808070708080707--08070708080708070708080715080807070808070708
1007080807070808070708--070708080708070708081507080807070808070708
110807070808070708080707--0807070807080807150808070708080707080807
12080707080807070808070708--07070807080815070808070708080707080807
1307080807070808070708080707--080708071508080707080807070808070708
140708080707080807070808070708--0708150708080707080807070808070708
15080707080807070808070708080707--15080807070808070708080707080807
1607080807070808070708080707080815--070708080707080807070808070708
170807070808070708080707080807150807--0807070808070708080707080807
18080707080807070808070708081507080708--07070808070708080707080807
1907080807070808070708080715080807080707--080707080807070808070708
200708080707080807070808150708080708070708--0707080807070808070708
21080707080807070808071508080707080708080707--08070708080707080807
2208070708080707080815070808070708070808070708--070708080707080807
230708080707080807150808070708080708070708080707--0807070808070708
24070808070708081507080807070808070807070808070708--07070808070708
2508070708080715080807070808070708070808070708080707--080707080807
260807070808150708080707080807070807080807070808070708--0707080807
27070808071508080707080807070808070807070808070708080707--08070708
2807080815070808070708080707080807080707080807070808070708--070708
290807150808070708080707080807070807080807070808070708080707--0807
30081507080807070808070708080707080708080707080807070808070708--07
3115080807070808070708080707080807080707080807070808070708080707--

All 32 available codewords have been verifed in this table.



Specify a new polynomial or a different number of data bits.

Model M20J GENERATOR POLYNOMIAL TOOL
Data Bits k =   G(x):

Discussion Codewords Generator Format
G = [Ik|P]
G = [P|Ik]
MATLAB Matrices

Examples

  1. (8,7) Simple Parity Bit (D=2) no error correction

  2. (7,4) Hamming Code (D=3) single bit error correction

  3. (15,11) Hamming Code (D=3) single bit error correction

  4. (15,10) Extended Hamming Code (D=4) single bit error correction

  5. (31,21) BCH Code (D=5) double bit error correction (notes)

  6. (15,5) BCH Code (D=7) triple bit error correction (notes)

  7. (23,12,7) Binary Golay Code (D=7) triple bit error correction

  8. (35,27) Fire Code specialized 3-bit burst error correction

  9. 16-bit CRC (CCITT) commonly used for error detection (notes)


2024-05-16 20:08:04 ADT
Last Updated: 2015-02-06
Richard Tervo [ tervo@unb.ca ] Back to the course homepage...