Hamming Codes Activity 1
1. A 4 bit message is a message of the form ala2a3a4 where each of the a's is either a zero or a one. List all possible 4 bit strings. (Hint: there are exactly 16 which can be listed by counting from 0 to 15 in binary)
____________ |   | ____________ |
____________ |   | ____________ |
____________ |   | ____________ |
____________ |   | ____________ |
____________ |   | ____________ |
____________ |   | ____________ |
____________ |   | ____________ |
____________ |   | ____________ |
c1 = 0 | if | a1 + a2 + a3 | is even |
c1 = 1 | if | a1 + a2 + a3 | is odd |
c2 = 0 | if | a1 + a3 + a4 | is even |
c2 = 1 | if | a1 + a3 + a4 | is odd |
c3 = 0 | if | a2 + a3 + a4 | is even |
c3 = 1 | if | a2 + a3 + a4 | is odd |
Attach the three check digits to the end of each 4 bit string to obtain a Hamming code word.
Show the details of your calculations as in the following example:
Example: Construct the Hamming code word corresponding to the 4 bit string 0101.
a1 + a2 + a3 = 0 + 1 + 0 | is odd so c1 = 1 |
a1 + a3 + a4 = 0 + 0 + 1 | is odd so c2 = 1 |
a2 + a3 + a4 = 1 + 0 + 1 | is even so c3 = 0 |
The Hamming code word f or the 4 bit string 01 01 is 01 01 I 1 0
3. Write the entire (7,4) Hamming code.