CS 111 Sept 13 Error detection Error correction

  • Slides: 4
Download presentation
CS 111 – Sept. 13 • Error detection • Error correction • Review/practice chapter

CS 111 – Sept. 13 • Error detection • Error correction • Review/practice chapter 1 questions • Commitment: – Please read sections 2. 1 and 2. 2

Transmission errors • When you send data over a network, there could be rare

Transmission errors • When you send data over a network, there could be rare random flipping of bits. • Error Detection • Error Correction • One method of detection is using a parity bit – – Add 9 th bit to each byte during transmission Goal is that each byte has even # of 1’s Receiver checks each byte. … Catches many but not all errors.

2 -d parity 1 0 1 1 1 0 1 0 1 0 1

2 -d parity 1 0 1 1 1 0 1 0 1 0 1 1 0 0 0 1 1 1 0 0 1 1 0 1 0 1 1 1 0 1 0 0 1 1 0 0 1 1 0 0 0 The 9 th byte is called a check byte.

Error correction • Useful if you think there may be a lot of potential

Error correction • Useful if you think there may be a lot of potential errors, such as a noisy transmission medium. • Devise a “code” so that each symbol’s bit pattern is quite distinct from all the others. – In practice, this means longer codes. In other words, the 8 -bit ASCII code would not be enough. • One technique: Hamming code – Example code p. 71 – Idea for assigning code is Hamming distance: comparing codes, count how many bits differ. – When you receive an erroneous code, see which letter it’s closest to. Then you can make a correction.