## Hamming codes – an example of a block code

Hamming codes, named after their discoverer, R.W. Hamming, are a well-known type of block code. A rate R = 4 / 7 Hamming code is illustrated here, with each of the 16 possible four-bit input blocks, coded as seven-bit output blocks. This set of 16 output blocks have been selected from the 27 = 128 possible seven-bit patterns as being most dissimilar. In this case, each output block can be seen to differ from all the other blocks by at least three bits. Hence, if one or two errors occur in the transmission of a block, the decoder will realize that this is not a valid block and flag an error. In the case of only a single bit error occurring, it is also possible for the receiver to match the received block to the closest valid block and thereby correct the single error. If three errors occur in a block, the original block may be transformed into a new valid block and all the errors go undetected. |