cs252-comerr

cs252-comerr - Error Detection & Correction Add extra...

Info iconThis preview shows pages 1–4. Sign up to view the full content.

View Full Document Right Arrow Icon
1 Copyright M. Baltrush (CS252- comerr) 1 • Add extra bits to the data bits for the sole purpose of detecting when errors have been introduced and correcting the errors if possible • Detect single error: Parity bit 8 data bits + 1 parity bit in PC • written at memory write (data transmission) • check at memory read (data reception) Copyright M. Baltrush (CS252- comerr) 2 Hamming Codes ( Richard W. Hamming, 1915-1998) • (4,7) Hamming Code detects all one- and two-bit errors • Corrects all 1-bit errors Magic : Any two different code words differ in at least 3 places! 1111111 1110100 1101000 1100011 1011001 1010010 1001110 1000101 0111010 0110001 0101101 0100110 0011100 0010111 0001011 0000000 Copyright M. Baltrush (CS252- comerr) 3 Hamming Distance as Geometry 1000101 1000100 1100101 1001101 1001111 1100111 1010100 1100100 1001110 1101110 Yellow is code word Blue is one error Green is two errors
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
2 Copyright M. Baltrush (CS252- comerr) 4 Hamming Code • Detect and correct single error, parity spread in codeword Bit Position 1 2 3 4 5 6 7 8 9 10 11 12 P 1 P 2 D 3 P 4 D 5 D 6 D 7 P 8 D 9 D 10 D 11 D 12 P: parity bit D: data bit Notice numbering is different: no zero bit, numbering opposite book Copyright M. Baltrush (CS252- comerr) 5 Hamming Code Parity Generation • n bits of data, k bits of parity P 1 = XOR( 3, 5, 7, 9, 11 ) Parity generation equations P 2 = XOR( 3, 6, 7, 10, 11 ) P 4 = XOR( 5, 6, 7, 12 ) P 8 = XOR( 9, 10, 11, 12 ) C = (C 8 C 4 C 2 C 1 ) syndrome for checking odd parity Copyright M. Baltrush (CS252- comerr) 6 Hamming Example Data: 0 1 0 1 1 1 0 0 Code: P 1 P 2 D 3 P 4 D 5 D 6 D 7 P 8 D 9 D 10 D 11 D 12 P 1 = XOR( 0, 1, 1, 1, 0 ) = 1 P 2 = XOR( 0, 0, 1, 1, 0 ) = 0 P 4 = XOR( 1, 0, 1, 0 ) = 0 P 8 = XOR( 1, 1, 0, 0 ) = 0 0 1 0 1 1 1 0 0 1 0 0 0 1 0 0 P 1 = XOR( D 3 , D 5 , D 7 ,D 9 , D 11 ) P 2 = XOR( D 3 , D 6 , D 7 , D 10 , D 11 ) P 4 = XOR( D 5 , D 6 , D 7 , D 12 ) P 8 = XOR( D 9 , D 10 , D 11 , D 12 ) Calculation of parity bits for a byte of information
Background image of page 2
3 Copyright M. Baltrush (CS252-
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 4
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 10

cs252-comerr - Error Detection & Correction Add extra...

This preview shows document pages 1 - 4. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online