Technical Appendix

Main Menu           Previous Topic                                                           Next Topic


Hamming Code Details

Our Hamming Code demonstration uses a (7, 4, 3) Hamming Code as described by Shannon in detail. Let c, e, f, and g be a block of 4 symbols from the source, represented as integers in the field with 2 elements.

We assign:

a = c + e + g
b = c + f + g
d = e + f + g

and transmit the codeword abcdefg. The noise agent then reverses one bit, or no bits at all. Upon receipt, the receiver computes the following:

A = d + e + f + g
B = b + c + f + g
C = a + c + e + g

Without noise, A, B, and C should all be zero. If they are not all zero, the 7 different possible combinations reveal which bit was reversed. In fact, the binary number ABC gives the position of the incorrect bit. This can be computed directly, or see Elements of Information Theory by Cover and Thomas for a derivation from Linear Algebra.

Throughout the above discussion, we are always dealing with the one possible two-element field. Note, however, that in the demonstration, we used different alphabets to represent its elements: {2, 4} for the source and the destination, and {0, 1} for the channel itself.

                   Previous Slide                                                           Next Slide