Hamming Codes Activity 2
Here are the legal code words in this system:
0000000 | 1111111 | |
1000101 | 0111010 | |
1100010 | 0011101 | |
0110001 | 1001110 | |
1011000 | 0100111 | |
0101100 | 1010011 | |
0010110 | 1101001 | |
0001011 | 1110100 |
Suppose that we receive the string 1001101. Compare this to each of the 16 legal code words in the same order they are listed above. The received string, for example is different from the first legal code word, 0000000, in four places.
2. Copy the following diagram on your answer sheet Deterndne the difference from each of the remaining 15 legal code words and w-rite it in the proper blank. The first has been done for you.
4 | ______ | |
______ | ______ | |
______ | ______ | |
______ | ______ | |
______ | ______ | |
______ | ______ | |
______ | ______ | |
______ | ______ |
3. Which of our 16 legal code words do you think the received string is most likely to represent? Record your answer and explain why you feel this way.
The number of places in which two strings differ Ls called the Hamming distance between them. We have seen that the Hamming clistance between 0000000 and 1001101 is 4.
4. Suppose that the legal Hamming code word 1011000 is received with errors in the second and fifth positions. What string would be received?
5. Is this string a legal code word?
6. Suppose that the same legal code word 1011000 is sent, but errors occur in the first second, and sixth positions. What string would be received?
7. Is this string a legal code word?
8. Suppose that we receive the string 1111100. Find the Hamming distance between this string and each of the 16 code words.
______ | ______ | |
______ | ______ | |
______ | ______ | |
______ | ______ | |
______ | ______ | |
______ | ______ | |
______ | ______ | |
______ | ______ |
9. Is there a single code word that the received string is closest to? If so, list it.
10. If the string 1111100 were received because of errors in the second and fifth digits of the legal code word 1011000, would the errors be properly corrected?
11. How many errors can the Hamming code detect? How many can it correct? Write a short sununary of what you have seen.