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

Codeword Generation Tool

Error control codes can be constructed from fixed-length codewords having a minimum Hamming distance between each codeword and every other codeword in the set.

This online tool generates sets of codewords having certain properties. Given a received codeword, the word can be submitted for error detection or correction in comparison to the generated set of valid codewords.

A brute force search is used here to demonstrate codeword sets having minimum distance properties. For a more structured approach to codeword generation, the Online BCH Code Generator may be appropriate.


Select values for the codeword length (L) and the minimum Hamming distance (D) between codewords. Press 'Generate' to see a list of codewords with these properties. Enter a codeword having L-bits and press 'Receive' to see how this codeword would be received.

  L =     D =   

Generated 7-bit codewords are listed below in boldface where each is labelled for easy reference. The distance between each codeword and the received codeword (0000001) is shown at right. The closest valid codeword (A) is shown in red.

7-bit CODEWORDS [D=4]
=====================
 - 0000001 : ? 
---------------------
 A 0000000 : 1
 B 0001111 : 3
 C 0110011 : 3
 D 0111100 : 5
 E 1010101 : 3
 F 1011010 : 5
 G 1100110 : 5
 H 1101001 : 3
=====================
TOTAL 8 CODEWORDS

RECEIVED WORD Error Detected Error Corrected Result
0000001 YES YES Corrected to 0000000

The received codeword does not match a valid codeword, so it appears that an error occurred during transmission. The closest valid codeword (A) shown in red is 1 bit different from the word which was received. It is assumed that the codeword 0000000 was actually transmitted and that 1 bit error led to the received codeword 0000001.


2024-03-29 11:41:56 ADT
Last Updated: 09-09-12
Richard Tervo [ tervo@unb.ca ] Back to the course homepage...