Error Detection and Error Correction-Data Communication and Computer Networks-Lecture Slides, Slides of Data Communication Systems and Computer Networks

These are a set of Lecture Slides on the subject of Data Communication and Computer Networks at Univeristy of Delhi by Dr. Sonam Zinta. It includes: Error, Detection, Correction, Single-Bit, Burst, Interference, Packet, Redundancy, Block, Coding

Typology: Slides

2011/2012

Uploaded on 07/05/2012

raoo
raoo 🇵🇰

4.3

(22)

45 documents

1 / 25

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Error Detection
and
Correction
Chapter 10
Docsity.com
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18
pf19

Partial preview of the text

Download Error Detection and Error Correction-Data Communication and Computer Networks-Lecture Slides and more Slides Data Communication Systems and Computer Networks in PDF only on Docsity!

Error Detection

and

Correction

Chapter 10

 Whenever bits flow from one point to another, they are subject to be unpredictable changes due to Interference.  Interference can cause the shape of the signal to change. Types of ERRORS

1. Single-Bit Error means that only 1 bit of a given data unit (byte, character or packet) is changed from 1 to 0 or from 0 to 1. 2. Burst Error means that 2 or more bits in the data unit have changed.

Forward Error Correction Versus Retransmission

Forward Error Correction

is the process in which the receiver tires to guess the message using redundant bits. Possible only if the number of bits are small.

Correction by Retransmission

is a technique in which the detects the occurrence of an error and asks the sender to resend the message. Resending is repeated until a message arrives that the receiver believes is error-free.

Coding

Redundancy is achieved through various coding schemes.

 The sender adds redundant bits through a process that creates relationship between the redundant bits and the actual data bits.

Block Coding

 Message is divided into blocks, each k bits called datagram.

 We add r redundant bits to each block to make the length n=k+r.

 The resulting n-bit block are called code words.

 The block coding is one-to-one ; the same dataword is always encoded as the same codeword.

Example

The 4B/5B block coding is a good example of this type of coding. In this coding scheme, k = 4 and n = 5. As we saw, we have 2k= 16 datawords and 2n^ = 32 codewords.

As we see that 16 out of 32 codewords are used for message transfer and the rest are either used for other purposes or unused.

Example

Let us assume that k = 2 and n = 3. Table shows the list of datawords and codewords. Later, we will see how to derive a codeword from a dataword.

  • Assume the sender encodes the dataword 01 as 011 and sends it to the receiver. Consider the following cases:
  1. The receiver receives 011. It is a valid codeword. The receiver extracts the dataword 01 from it.
  2. The codeword is corrupted during transmission, and 111 is received. This is not a valid codeword and is discarded.
  3. The codeword is corrupted during transmission, and 000 is received. This is a valid codeword. The receiver incorrectly extracts the dataword 00. Two corrupted bits have made the error undetectable_._

Error Correction

Example

If the receiver can correct an error without knowing what was actually sent. We add 3 redundant bits to the 2-bit dataword to make 5-bit codewords. Table shows the datawords and codewords. Assume the dataword is 01. The sender creates the codeword 01011. The codeword is corrupted during transmission, and 01001 is received. First, the receiver finds that the received codeword is not in the table. This means an error has occurred. The receiver, assuming that there is only 1 bit corrupted, uses the following strategy to guess the correct dataword.

  1. Comparing the received codeword with the first codeword in the table ( versus 00000), the receiver decides that the first codeword is not the one that was sent because there are two different bits.
  2. By the same reasoning, the original codeword cannot be the third or fourth one in the table.
  3. The original codeword must be the second one in the table because this is the only one that differs from the received codeword by 1 bit. The receiver replaces 01001 with 01011 and consults the table to find the dataword 01.

Hamming Distance and Error

Hamming distance between the received codeword and the sending codeword is the number of bits that are corrupted during transmission.

For Example

If the codeword 00000 is sent and 01101 is received, 3bits are in error and the Hamming distance between the two is d(00000,01101)=3.

Note

The detection of up to s errors in all cases, the minimum Hamming distance in a block code must be dmin=s+1.

Linear Block Codes

In a linear block code, the XOR of any two valid codewords creates another valid codeword.

Linear Block Codes

Simple Parity Check Code A simple parity-check code is a single bit error detecting code in which n=k+1 with dmin=2.

 Generator takes a copy of a 4-bit dataword(a0,a1,a2 and a3) and generates a parity bit r0.

 The dataword bits and the parity bit creates the 5-bit codeword.

 All the 4 bits of the dataword (modulo-2); the result is the parity bit.

r0=a3+a2+a1+a0 (modulo-2).

 The result is 0; if no of 1’s is even, if the number of 1s is odd, the result is 1.

 In both cases the number of 1’s in the codeword is even.

Hamming codes

  • r0= a2+a1+a0 modulo-
  • r1= a3+a2+a1 modulo-
  • r2= a1+a0+a3 modulo-
  • s0= b2+b1+b0+q0 modulo-
    • s1=b3+b2+b1+q1 modulo-
    • s2= b1+b0+b3+q2 modulo-

Cyclic Codes

Cyclic Redundancy Check

  • In Encoder , the dataword has k bits( 4bits); the codeword has n bits (7 here).
  • The size of the dataword is augmented by adding n-k ( 3 here) 0’s to the right side of the dataword.
  • The n-bit result is fed into the generator.
  • The generator uses a divisor of size n - k + 1 ( 4 here).
  • The generator divides the augmented dataword by the divisor (module 2 division).
  • The quotient of the division is discarded; the remainder (r2 r1 r0) is appended to the dataword to create the code word.