CS 2734 Computer Organization II -- Spring 2001
Review for Exam 2 (16 April 2001)


Here is a table showing the parity checks for the first 18 positions of the Hamming code. (Check bits are in positions 1, 2, 4, 8, and 16.)
Position
Number
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
Binary 1 10 11 100 101 110 111 1000 1001 1010 1011 1100 1101 1110 1111 10000 10001 10010
Check:1 x x x x x x x x x
Check:2 x x x x x x x x x
Check:4 x x x x x x x x
Check:8 x x x x x x x x
Check:16 x x x


Here is a table showing the encoding of data bits 1101101 (in black below). Additional check bits are determined for postions 1, 2, 4, and 8, to yield the word 11101010101 below, with check bits in red italic below.
Position
Number
1 2 3 4 5 6 7 8 9 10 11
Binary 1 10 11 100 101 110 111 1000 1001 1010 1011
Word 1 1 1 0 1 0 1 0 1 0 1
Check:1 1 1 1 1 1 1
Check:2 1 1 0 1 0 1
Check:4 0 1 0 1
Check:8 0 1 0 1


Here is the result of a single error in position 11 (changed for a 1 to a 0). Three of the four parity checks fail, as shown below. Adding the position number of each failing check gives the position number of the error bit, 11 in this case.
Position
Number
1 2 3 4 5 6 7 8 9 10 11 Result of
Check
Binary 1 10 11 100 101 110 111 1000 1001 1010 1011
Word 1 1 1 0 1 0 1 0 1 0 0 (error)
Check:1 1 1 1 1 1 0 1 fails
Check:2 1 1 0 1 0 0 2 fails
Check:4 0 1 0 1 - passes
Check:8 0 1 0 0 8 fails