Example: When the message is a1a2a3a4, the code word is a1a2a3a4c1c2c3, where
c1 = a1+a2+a3, c2 = a1+a3+a4, c3 = a2+a3+a4
1: message, 2: code word, 3: received code, 4: error correction
Assume the weight of a binary code is t. The code will detect (though not fix) t-1 errors. If t is odd, the code will correct (t-1)/2 errors, if t is even, the code will correct (t-2)/2 errors. For example, the weight of the above code is 3 (see Table 17.1, page 620), so it can either detect 2 errors or correct 1 error.
Another distance-based explanation of error correcting code.
| A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R | S | T | U | V | W | X | Y | Z |
| 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 |
Credit card number, in binary code, can be encrypted and decrypted by adding the same binary key.
Assignment: Chapter 17 Exercises No. 1-5, 7, 9, 11, 20-21, 27, 29-32, 35, 38-39, 43, 51