1 / 20

Error Detection/Correction

Error Detection/Correction. Detection – retransmit please Correction – fix it yourself Hamming codes Two dimensional parity Checksums CRC’s Hamming codes Richard Hamming, BTL, circa Claude Shannon error correcting. Encoding NRZ – Non-return to Zero Use a high signal for a 1

scottie
Download Presentation

Error Detection/Correction

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Error Detection/Correction Detection – retransmit please Correction – fix it yourself Hamming codes Two dimensional parity Checksums CRC’s Hamming codes Richard Hamming, BTL, circa Claude Shannon error correcting

  2. Encoding NRZ – Non-return to Zero Use a high signal for a 1 Use a low signal for a 0 Does not work because:

  3. Encoding Does not work because of: baseline wander clock drift

  4. Manchester encoding logic 0 is indicated by a 0 to 1 transition at the centre of the bit logic 1 is indicated by a 1 to 0 transition at the centre of the bit. signal transitions do not always occur at the bit boundaries, but that there is always a transition at the centre of each bit.

  5. Manchester encoding What bit pattern is encoded?

  6. Manchester encoding 1 1 0 1 0 0 10 10 01 10 01 01

  7. RS-232 25 pin 9 pin rj-45

  8. RS-232 What is this bit stream under RS-232? 0100000111101000011011

  9. RS-232 ASCII character stop bits 01000001111 01000011011 parity bit (odd)‏ start bit

  10. Two dimensional parity

  11. Hamming codes Power-of-two bit positions are parity bits Parity bit N covers all bit positions with the Nth lsb set N=1 first parity bit covers bit positions 1,3,5,7,9… N=2 second parity bit covers 2,3,6,7,10,11

  12. Hamming codes Using even parity and 4 parity bits, what is the hamming code for 0 1 1 0 1 0 1

  13. Hamming codes Using even parity and 4 parity bits, what is the hamming code for 0 1 1 0 1 0 1 1 0 0 0 1 1 0 0 1 0 1 What happens if, when received, the final bit is corrupted?

  14. Checksums when algorithm for computing redundancy information is based on addition, call it a checksum

  15. Internet checksum used in IP, TCP, UDP, ICMP short csum(short buf, int cnt)‏ { int sum=0; while (cnt--) { sum += *buf++; if (sum & 0xffff0000) { sum &= 0xffff; sum++; } } return(~(sum & 0xffff)); } 1 in 64k chance of checksum valid, but bad data

  16. CRC – Cyclic redundancy check In Galois fields Full of flowers Primitive elements Dance for hours n-bit CRC - detects any single error burst <= n bits

  17. CRC – Cyclic redundancy check Message to send: M = 1 0 0 1 1 0 1 0 Polynomial form: P = x**7 + x**4 + x**3 + x Choose a divisor polynomial, DP = ? Create a message: M’ = m * x**k where k == (number of bits in DP) - 1 Calculate P/DP … only care about remainder R Calculate M’ – R this is exactly divisible by DP, and is the message we send Receiver does the division and if != 0, it was an error

  18. CRC – Cyclic redundancy check Message to send: M = 1 0 0 1 1 0 1 0 Polynomial form: P = x**7 + x**4 + x**3 + x Choose a divisor polynomial, DP = x**3 + x**2 + 1 M’ = M * x**3 = 1 0 0 1 1 0 1 0 0 0 0 Divide: 1 0 0 1 1 0 1 0 0 0 0 / 1 1 0 1 Remainder is 101 Subtract R from M’ M’ – R = 1 0 0 1 1 0 1 0 1 0 1 M’ – R is exactly divisible by DP and is what we send

  19. Error detection vs. Error correction? Mainly a function of the cost of an error let all information carry EC overhead when 1. errors more probable 2. empirically observed error patterns are well-handled 3. cost of retransmission is high but in the end, you still need retransmission

More Related