Professional Documents
Culture Documents
Error Detection / Correction: Computer Organization & Architecture
Error Detection / Correction: Computer Organization & Architecture
Reference:
Hamming code
Used for error detection & error correction
Parity bits
ASCII 7 bit code (hex 00 to 7F)
Could use 8th bit for parity bit:
X1011010
Even parity: make total number of 1 bits is even
01011010
Odd parity: make total number of 1 bits odd
11011010
Syndrome
Data
Code
The output of the Compare to the Corrector is termed the syndrome, and is
K bits long
Hamming Code Syndrome
If K =1, we can detect single bit errors but not correct them
Example: For M = 8:
and K = 3: 23 1 = 7 < 8 + 3 (doesnt work)
and K = 4: 24 1 = 15 > 8 + 4 (works!)
Therefore, we must choose K =4,
i.e., the minimum size of the syndrome is 4
Increased word length for error correcting
Hamming Code Syndrome Design Criteria
A Layout of Data and Check Bits that Achieves Our Design Criteria:
Bit position 12 11 10 9 8 7 6 5 4 3 2 1
Bit number 1100 1011 1010 1001 1000 0111 0110 0101 0100 0011 0010 0001
Data bit D8 D7 D6 D5 D4 D3 D2 D1
Check bit C8 C4 C2 C1
Why this ordering? Because we want the syndrome, the Hamming test word,
to yield the address of the error.
Example:
Putting it together:
Example:
Example:
Word fetched: Check Bits:
Comparing:
C8 C4 C2 C1
0 1 1 1 Orig Check Bits
0 0 0 1 New Check Bits
0 1 1 0 Syndrome
With Errors Identifying Error SEC Attempt IS SEC Correct? Extra Bit Confirms DE
Increased word length for error correcting