CS 313 Introduction to Computer Networking - PowerPoint PPT Presentation

1 / 26
About This Presentation
Title:

CS 313 Introduction to Computer Networking

Description:

The McGraw-Hill Companies, Inc., 2004. 10. Example of ... overhead for 1Mb data: e. c. 10000 bits. e. d. 2001 bits. 16. Use Parity to Detect Burst Errors ... – PowerPoint PPT presentation

Number of Views:29
Avg rating:3.0/5.0
Slides: 27
Provided by: chiche
Category:

less

Transcript and Presenter's Notes

Title: CS 313 Introduction to Computer Networking


1
CS 313 Introduction to Computer Networking
Telecommunication
  • Error Correction/Detection

2
Topics
  • Introduction
  • Error Correction
  • Error Detection

3
Introduction
  • Transmission impairments (errors)
  • Attenuation
  • Loss of energy as signal propagates
  • Delay Distortion
  • Components travel at different speeds
  • Noise
  • Unwanted energy from other sources

4
Attenuation, distortion, and noise
Attenuation
Delay Distortion
Noise
  • The McGraw-Hill Companies, Inc., 2004

5
Isolated and Burst Error
  • Isolated 0 -gt 1, or 1 -gt 0
  • E.g., 00101101 is sent
  • 00100101 is received
  • Burst errors in consecutive bits
  • 2 or more bits in the data unit have changed
  • E.g., 101011010001100101 is sent
  • 101101000101100101 is received
  • length of burst 7

6
Isolated and Burst Error
  • Compare burst errors to isolated errors
  • Fewer error blocks given a fixed error rate
  • Example error rate 0.001 per bit
  • (1 error out of 1000 bits)
  • block size 1000 bits
  • burst size 100
  • isolated error an error contained in most
    blocks
  • burst error 1 or 2 error blocks out of 100
    blocks
  • Error correction/detection much harder

7
Error Correcting/Detecting Codes
  • Redundancy added to data
  • Error correction
  • Referred to as forward error correction
  • Detect and correct error
  • Error detection
  • Detect error and request retransmission
  • Codeword (n bits)
  • data redundancy
  • (m bits) (r bits)
  • n m r

When to use which one?
8
Error Correction
  • Hamming Code
  • For m-bit data we need r-bit redundancy, where
    (mr1) ? 2r
  • Redundancy bits are placed in position of 2s
    power
  • Example If m 7, then r 4

9
Redundancy bits calculation
  • The McGraw-Hill Companies, Inc., 2004

10
Example of redundancy bit calculation
  • The McGraw-Hill Companies, Inc., 2004

11
Error detection using Hamming code
  • The McGraw-Hill Companies, Inc., 2004

12
Correct Burst Errors
  • Organize k codewords into a (k x n) matrix
  • (k x r) check bits for (k x m) data
  • Transmit one column at a time
  • Reconstruct matrix after received
  • Correct burst errors of length ? k

13
Correct Burst Errors
n
m
k
14
Error Detection
  • Parity bit
  • Error detection
  • Added to data so that number of 1 bits in
    codeword is
  • Even (even parity)
  • Odd (odd parity)
  • E.g., ASCII of H is 1001000, its codeword is
  • ________ if even parity is used
  • ________ if odd parity is used

01001000
11001000
15
Error Detection vs. Correction
  • Error-detecting and retransmission
  • More efficient than error-correction when error
    rate is low
  • Example
  • error rate 0.000001 per bit
  • block size 1000 bits
  • check bits per block
  • Hamming code error correction 10
  • Parity code error detection 1
  • overhead for 1Mb data e. c. 10000 bits
  • e. d. 2001
    bits

16
Use Parity to Detect Burst Errors
  • Organize a block into (k x n) matrix
  • One parity for each column
  • ? one row of parities at the bottom
  • Transmit one row at a time
  • Can detect burst errors of length ? n

17
Example
  • Original data
  • 11100111 11011101 00111001 10101001
  • Organized into 11100111
  • 11011101
  • 00111001
  • 10101001
  • 10101010 ? LRC
  • Transmitted
  • 11100111 11011101 00111001 10101001 10101010
  • Burst error
  • 11100111 11010000 01001001 10101001 10101010
  • Error detected ? whole block is discarded
  • 11100111 11010000 0100001 10101001 10101010

18
Error-Detecting Code - CRC
  • Bit stream is treated as polynomial w/
    coefficients 0 and 1
  • Example
  • data 10100111
  • polynomial
  • degree 7
  • Modulo 2 arithmetic is used
  • Example 10011011 11110000
  • 11001010 -10100110
  • 01010001 01010110
  • XOR

19
Error-Detecting Code - CRC
  • Use generator polynomial G(x) to calculate
    checksum R(x)
  • Frame P(x) generator G(x)
  • degree of G(x) d
  • Transmitted checksummed frame P(x)xd R(x)
  • Its guaranteed that P(x)xd R(x) is divisible
    by G(x)!!

20
Error-Detecting Code - CRC
  • Receiver
  • Divides checksummed frame by G(x)
  • If remainder is zero
  • No error, CRC is removed
  • Otherwise
  • Error, the frame is discarded

21
Binary division in a CRC generator performed by
sender
  • Frame
  • Generator
  • Frame transmitted
  • 100100001
  • The McGraw-Hill Companies, Inc., 2004

22
Binary division in CRC check performed by
receiver Case I No Error
  • The McGraw-Hill Companies, Inc., 2004

23
Binary division in CRC check performed by
receiver Case II Error Occurs
100100001 101100001
(with error)
24
CRC - Example
1 1 0 0 0 0
  • Frame
  • Generator

25
CRC Properties
  • Single error detection
  • Double error detection w/ carefully chosen G(x)
  • Odd number error detection if (x 1) is a factor
    of G(x)
  • Detect burst error length ? r for r check bits
  • Can be implemented in hardware using simple shift
    register circuit

26
Standard CRC Examples
  • CRC-8 (for ATM header)
  • x8 x2 x 1
  • CRC-32 (for LANs)
  • x32 x26 x23 x22 x16 x12 x11
  • x10 x8 x7 x5 x4 x2 x 1
  • CRC-16-CCITT (for Bluetooth, etc.)
  • x16 x12 x5 1
Write a Comment
User Comments (0)
About PowerShow.com