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)

____________ ____________
____________ ____________
____________ ____________
____________ ____________
____________ ____________
____________ ____________
____________ ____________
____________ ____________
2. Calculate the checkdigits, c1 , c2 , and c3, for each of the 4 bit strings listed in #1. The check digits are calculated as follows:
c1 = 0ifa1 + a2 + a3is even
c1 = 1ifa1 + a2 + a3is odd
c2 = 0ifa1 + a3 + a4is even
c2 = 1ifa1 + a3 + a4is odd
c3 = 0ifa2 + a3 + a4is even
c3 = 1ifa2 + a3 + a4is 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 + 0is odd so c1 = 1
a1 + a3 + a4 = 0 + 0 + 1is odd so c2 = 1
a2 + a3 + a4 = 1 + 0 + 1is 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.