<<

Error Detection & Correction

Jonathan Geisler

September 16, 2005

Jonathan Geisler Error Detection & Correction Jonathan Geisler Error Detection & Correction (CRC)

Standardized for different uses Used in TCP/IP for error checking How would you use lookup tables like the book mentions? Most NICs have it in hardware

Jonathan Geisler Error Detection & Correction Parity

What is even/odd parity? Make the following values even/odd parity. 0010 110X 1100 010X 0110 101X 1111 001X

Jonathan Geisler Error Detection & Correction 6 4 2 0

Hamming

The hamming distance between two binary numbers is the number of bit differences between the two values. What is the hamming distance of the following pairs? 0010 1101 & 1001 0110 0011 1001 & 0011 0110 1001 0100 & 1001 0111 0101 0101 & 0101 0101

Jonathan Geisler Error Detection & Correction 4 2 0

Hamming Distance

The hamming distance between two binary numbers is the number of bit differences between the two values. What is the hamming distance of the following pairs? 0010 1101 & 1001 0110 6 0011 1001 & 0011 0110 1001 0100 & 1001 0111 0101 0101 & 0101 0101

Jonathan Geisler Error Detection & Correction 2 0

Hamming Distance

The hamming distance between two binary numbers is the number of bit differences between the two values. What is the hamming distance of the following pairs? 0010 1101 & 1001 0110 6 0011 1001 & 0011 0110 4 1001 0100 & 1001 0111 0101 0101 & 0101 0101

Jonathan Geisler Error Detection & Correction 0

Hamming Distance

The hamming distance between two binary numbers is the number of bit differences between the two values. What is the hamming distance of the following pairs? 0010 1101 & 1001 0110 6 0011 1001 & 0011 0110 4 1001 0100 & 1001 0111 2 0101 0101 & 0101 0101

Jonathan Geisler Error Detection & Correction Hamming Distance

The hamming distance between two binary numbers is the number of bit differences between the two values. What is the hamming distance of the following pairs? 0010 1101 & 1001 0110 6 0011 1001 & 0011 0110 4 1001 0100 & 1001 0111 2 0101 0101 & 0101 0101 0

Jonathan Geisler Error Detection & Correction Error Correction with Hamming Codes

Assume the least possible number errors occurred Pick the legal representation closest to the measured value If none is closest, declare error and give up

Jonathan Geisler Error Detection & Correction Position parity bits at locations which are powers of 2 (1, 2, 4, etc.). If bit location l is represented in binary, then the 1’s in that representation indicate which parity bits pertain to location l. Check bits with incorrect parity. Since only one bit is uniquely represented by any combination of parity bits, we know exactly which bit caused the error.

Single bit errors

Make sure you understand the math from the book. A simplified version follows:

Create ≈ log2 bits + 1 parity bits.

Jonathan Geisler Error Detection & Correction If bit location l is represented in binary, then the 1’s in that representation indicate which parity bits pertain to location l. Check bits with incorrect parity. Since only one bit is uniquely represented by any combination of parity bits, we know exactly which bit caused the error.

Single bit errors

Make sure you understand the math from the book. A simplified version follows:

Create ≈ log2 bits + 1 parity bits. Position parity bits at locations which are powers of 2 (1, 2, 4, etc.).

Jonathan Geisler Error Detection & Correction Check bits with incorrect parity. Since only one bit is uniquely represented by any combination of parity bits, we know exactly which bit caused the error.

Single bit errors

Make sure you understand the math from the book. A simplified version follows:

Create ≈ log2 bits + 1 parity bits. Position parity bits at locations which are powers of 2 (1, 2, 4, etc.). If bit location l is represented in binary, then the 1’s in that representation indicate which parity bits pertain to location l.

Jonathan Geisler Error Detection & Correction Since only one bit is uniquely represented by any combination of parity bits, we know exactly which bit caused the error.

Single bit errors

Make sure you understand the math from the book. A simplified version follows:

Create ≈ log2 bits + 1 parity bits. Position parity bits at locations which are powers of 2 (1, 2, 4, etc.). If bit location l is represented in binary, then the 1’s in that representation indicate which parity bits pertain to location l. Check bits with incorrect parity.

Jonathan Geisler Error Detection & Correction Single bit errors

Make sure you understand the math from the book. A simplified version follows:

Create ≈ log2 bits + 1 parity bits. Position parity bits at locations which are powers of 2 (1, 2, 4, etc.). If bit location l is represented in binary, then the 1’s in that representation indicate which parity bits pertain to location l. Check bits with incorrect parity. Since only one bit is uniquely represented by any combination of parity bits, we know exactly which bit caused the error.

Jonathan Geisler Error Detection & Correction 0010 0000 ⇒ ’’ 0100 0001 ⇒ ’A’ 0011 1111 ⇒ ’?’ 0110 1000 ⇒ ’h’

Example Errors

We wish to detect ASCII one bit errors with even parity Hamming codes. What is the value being represented by the following codes: 0010 1010 0010 0101 1000 0100 0011 0110 1100 0110 0100 1011

Jonathan Geisler Error Detection & Correction 0100 0001 ⇒ ’A’ 0011 1111 ⇒ ’?’ 0110 1000 ⇒ ’h’

Example Hamming Code Errors

We wish to detect ASCII one bit errors with even parity Hamming codes. What is the value being represented by the following codes: 0010 1010 0010 0010 0000 ⇒ ’’ 0101 1000 0100 0011 0110 1100 0110 0100 1011

Jonathan Geisler Error Detection & Correction 0011 1111 ⇒ ’?’ 0110 1000 ⇒ ’h’

Example Hamming Code Errors

We wish to detect ASCII one bit errors with even parity Hamming codes. What is the value being represented by the following codes: 0010 1010 0010 0010 0000 ⇒ ’’ 0101 1000 0100 0100 0001 ⇒ ’A’ 0011 0110 1100 0110 0100 1011

Jonathan Geisler Error Detection & Correction 0110 1000 ⇒ ’h’

Example Hamming Code Errors

We wish to detect ASCII one bit errors with even parity Hamming codes. What is the value being represented by the following codes: 0010 1010 0010 0010 0000 ⇒ ’’ 0101 1000 0100 0100 0001 ⇒ ’A’ 0011 0110 1100 0011 1111 ⇒ ’?’ 0110 0100 1011

Jonathan Geisler Error Detection & Correction Example Hamming Code Errors

We wish to detect ASCII one bit errors with even parity Hamming codes. What is the value being represented by the following codes: 0010 1010 0010 0010 0000 ⇒ ’’ 0101 1000 0100 0100 0001 ⇒ ’A’ 0011 0110 1100 0011 1111 ⇒ ’?’ 0110 0100 1011 0110 1000 ⇒ ’h’

Jonathan Geisler Error Detection & Correction Reed-Solomon

Complicated structure to deal with “bursty” errors Deals with blocks instead of bytes Where would this be helpful?

Jonathan Geisler Error Detection & Correction