Hamming code for single error correction, double error detection

The following table shows an (8,4) Hamming code suitable for single error correction, double error detection.
C1C2D1C3D2D3D4C4
00000000
11010010
01010101
10000111
10011001
01001011
11001100
00011110
11100001
00110011
10110100
01100110
01111000
10101010
00101101
11111111

This code is designed for four transmitted data bits: D1, D2, D3, D4

Four check bits (C1, C2, C3, C4) are added for error correction and detection. The check bits are computed as follows:

C1, C2, and C3 are each computed from different subsets of the data bits, while C4 is computed as the parity of all other check bits and data bits.

Note that the set of codes in the table has Hamming distance 4; you may select any pair of two different codes, and the Hamming distance between that pair will be at least 4; they will differ in at least 4 bit positions.

A Hamming distance of 4 is sufficient for single error correction and double error detection (at the same time).

If a received code exactly matches one of the codes in the table, no errors have occurred. If a received code differs from one of the codes in the table by one bit (Hamming distance 1), then a single bit error is assumed to have occurred, and it can be corrected. If a received code differs from one of the codes in the table by two bits (Hamming distance 2), then a double bit error is assumed to have occurred. This can be reported, but it can't necessarily be corrected, since the received code may differ in exactly two bits from several of the codes in the table.

Sample problems:

Try to work these out on your own before you go to the solution links!

Using the Hamming code above, what should the receiver do if it receives each of these codes?

1. Received code:
1 1 1 0 0 0 0 1
Solution here

2. Received code:
0 1 0 1 1 1 0 1
Solution here

3. Received code:
0 1 1 1 0 1 1 0
Solution here

4. Received code:
0 1 1 1 1 1 0 1
Solution here

5. Below is a set of three 11 bit codes, labeled (a), (b), (c)
(a) 0 0 0 0 1 1 1 1 0 0 0
(b) 0 0 1 1 0 0 1 1 0 0 1
(c) 0 1 0 1 0 1 0 1 0 1 0

What is the Hamming distance for this set? Why?
Solution here