Error Correcting Codes
Simplified Hamming Codes

ham_ary.GIF - 1.6 K Error correcting codes operate under the assumption about the probability of error. The code scheme described below assumes that at most one in every eight bits is changed during transmission. Actual data is combine with error correcting data by making use of parity with groups of bits. The error correcting data is added to give each group of bits odd parity (an odd number of 1 (on, true) bits).

venn_dia.GIF - 3.2 K The eight transmitted bits are referred to as bit [0] through bit [7]. Four bits of live data are transmitted with four bits of error correcting data as follows:

ham_live.GIF - 4.5 K To illustrate, consider the as an example the transmission of the four bits 1 0 1 0. These four bits are placed in positions [3], [5], [6], and [7], respectively, in the array, and are considered to be in the corresponding four positions in the Venn diagram.

Next, zeros and ones are placed into areas [1], [2], and [4] so that each of the four circles has odd parity. This is achieved by placing a 0 in [1], a 1 in [2], and a 0 in [4]. Finally, a zero or one is placed in area [0] to give the entire Venn diagram odd parity. In this example, this is achieved by placing a 0 in area [0].

ham_ok.GIF - 4.7 K This result provide us with the four error correcting bits that are included in the eight bits that will be transmitted. Set theory can be used to determine if the bits received are correct, or need to be corrected, or, if two bits are changed that there is an error.

To illustrate the error correction process, assume bit [3] was changed in transmission, and the string

 

0
0
1
0
0
0
1
0
was received. This information is placed into the Venn diagram. The following observations can be made about the sets A, B, and C, and the entire Venn diagram, indicated by Uham_err.GIF - 3.0 K Form the intersection of these four sets, A and B and ~C and U which equals area [3], which is the desired result. By flipping the bit in area [3], parity is achieved in Venn diagram and the string of bits,
0
0
1
1
0
0
1
0
If no bits are changed, the parity is achieved in all the sets and there is no need to perform a correction. If two bits are changed, then one or more of the sets A, B, and C do not have parity, but U does. In this case, an error is detected, but the error cannot be corrected.

Practice problems In each case below determine is there is an error. If there is, determine whether it can be corrected. If it can, make the correction.
1
0
0
1
1
0
0
1
1
 
5
0
0
1
0
1
1
1
1
 
2
0
1
1
1
0
0
1
0
 
6
1
0
1
1
0
0
1
0
 
3
0
0
1
0
1
0
1
1
 
7
0
0
0
0
1
0
1
1
 
4
0
1
1
0
1
0
0
1
 
8
0
1
1
1
0
0
0
0