Decoding Hamming CodeAll in all, there are 16 possible codewords: 0000000 0001011 0010111 0011100 0100101 0101110 0110010 0111001 1000110 1001101 1010001 1011010 1100011 1101000 1110100 1111111 How does decoding work? Again, by some kind of majority vote. Given a string of 7 bits, it can either be one of the 16 codewords, and then we know what the original string was, or it can be a corrupted codeword. In that last case, we simply find the codeword in the list of all possible codewords that differs least from our string. For instance, if the string is 1010110, then the most similar codeword is 1000110 (since it differs in only one entry), and so the decoded string is given by the first 4 bits of that codeword, namely 1000. Let's try a few examples. After typing in your answer, press return to see if you are correct:
Practice
|