23
Presented by :  Aditi Bhu randa R.no - 004

3_parity_and_error_control.ppt

Embed Size (px)

Citation preview

7/27/2019 3_parity_and_error_control.ppt

http://slidepdf.com/reader/full/3parityanderrorcontrolppt 1/23

Presented by :  Aditi Bhuranda

R.no - 004

7/27/2019 3_parity_and_error_control.ppt

http://slidepdf.com/reader/full/3parityanderrorcontrolppt 2/23

Error control through - Parity Bit• Parity works by adding an additional bit to each

character word transmitted. The state of this bit isdetermined by a combination of factors, the first of  which is the type of parity system employed.

• One common technique for error control on magnetictape is parity.

Parity bits are written when data on the tape are written, then are checked when the tape is read to verify that an error has not occurred .

2

7/27/2019 3_parity_and_error_control.ppt

http://slidepdf.com/reader/full/3parityanderrorcontrolppt 3/23

Parity Checking: Parity checks can be implemented in two ways:

Simple

Two Dimensional 

In parity check, a parity bit is added to every data unitso that the total number of 1s is even or odd.

Parity Checking Techniques are further classified into:

Even Parity

Odd Parity

7/27/2019 3_parity_and_error_control.ppt

http://slidepdf.com/reader/full/3parityanderrorcontrolppt 4/23

EVEN PARITY TECHNIQUE

o

 When the total number of 1s in a given setof bits (excluding the parity bit) is odd,then the parity bit is set to 1 and added tothe given set of bits.

o This will set the total number of 1s in thebits of data (now including the parity bit)to even. If the total is already even, then

the parity bit is set to 0.

1011001 01010010 1

7/27/2019 3_parity_and_error_control.ppt

http://slidepdf.com/reader/full/3parityanderrorcontrolppt 5/23

ODD PARITY TECHNIQUE•  When the total number of 1s in a given set of bits

(excluding the parity bit) is even, then the parity bitis set to 1 and added to the given set of bits.

• This will set the total number of 1s in the bits of data (now including the parity bit) to odd. If thetotal is already odd, then the parity bit is set to 0.

1011001 11010010 0

5

7/27/2019 3_parity_and_error_control.ppt

http://slidepdf.com/reader/full/3parityanderrorcontrolppt 6/23

For example,• The two devices are communicating with even parity .

•  As the transmitting device sends data, it counts thenumber of set bits in each group of seven bits.

If the number of set bits is even, it sets the parity bit to 0;if the number of set bits is odd, it sets the parity bit to 1.

• In this way, every byte has an even number of set bits. Onthe receiving side, the device checks each byte to makesure that it has an even number of set bits.

• If it finds an odd number of set bits, the receiver knowsthere was an error during transmission.

6

7/27/2019 3_parity_and_error_control.ppt

http://slidepdf.com/reader/full/3parityanderrorcontrolppt 7/23

Parity Checking:

7/27/2019 3_parity_and_error_control.ppt

http://slidepdf.com/reader/full/3parityanderrorcontrolppt 8/23

Parity Checking:• Suppose the sender wants to send the word world . In

 ASCII the five characters are coded as

 1110111 1101111 1110010 1101100 1100100

• The following shows the actual bits sent

• 11101110 11011110 11100100  11011000 11001001 

7/27/2019 3_parity_and_error_control.ppt

http://slidepdf.com/reader/full/3parityanderrorcontrolppt 9/23

Two-dimensional parity

In two-dimensional parity check, a block of bits is dividedinto rows and a redundant row of bits is added to the wholeblock.

7/27/2019 3_parity_and_error_control.ppt

http://slidepdf.com/reader/full/3parityanderrorcontrolppt 10/23

How parity works… 

10

7/27/2019 3_parity_and_error_control.ppt

http://slidepdf.com/reader/full/3parityanderrorcontrolppt 11/23

Disadvantages of Parity Error

Control Parity can't correct errors.

Some errors go undetected.

Errors result in complete system shutdown which cancause damage to data.

For many users, the cost of the extra chips isn't justified by the low level of protection.

11

7/27/2019 3_parity_and_error_control.ppt

http://slidepdf.com/reader/full/3parityanderrorcontrolppt 12/23

Cyclic Redundancy Checksum (CRC) The CRC error detection method treats the packet of 

data to be transmitted as a large polynomial.

The transmitter takes the message polynomial andusing polynomial arithmetic, divides it by a givengenerating polynomial.

The quotient is discarded but the remainder is“attached” to the end of the message. 

12

7/27/2019 3_parity_and_error_control.ppt

http://slidepdf.com/reader/full/3parityanderrorcontrolppt 13/23

CRC (cont..)

The message (with the remainder) is transmitted tothe receiver.

The receiver divides the message and remainder by thesame generating polynomial.

If a remainder not equal to zero results, there was anerror during transmission.

If a remainder of zero results, there was no errorduring transmission

13

7/27/2019 3_parity_and_error_control.ppt

http://slidepdf.com/reader/full/3parityanderrorcontrolppt 14/23

 r is the degree of the generating polynomial

14

7/27/2019 3_parity_and_error_control.ppt

http://slidepdf.com/reader/full/3parityanderrorcontrolppt 15/23

15

7/27/2019 3_parity_and_error_control.ppt

http://slidepdf.com/reader/full/3parityanderrorcontrolppt 16/23

16

Error Control Steps

Error Control consists of the following steps (notall are necessary):

Error detection (Parity, CRC, etc. are used)

Positive Acknowledgment (ACK) means no detectederror

Retransmission after time-out -- because a frame or an ACK might have been lost

Negative acknowledgment (NAK) and retransmission

Collectively all these mechanisms are called Automatic Repeat reQuest (ARQ).

7/27/2019 3_parity_and_error_control.ppt

http://slidepdf.com/reader/full/3parityanderrorcontrolppt 17/23

17

Error Control

Return a message has three basic ARQ formats:

1. Stop-and-wait ARQ 

2. Go-back-N ARQ 

3. Selective-reject ARQ 

7/27/2019 3_parity_and_error_control.ppt

http://slidepdf.com/reader/full/3parityanderrorcontrolppt 18/23

18

Error ControlStop-and-wait ARQ is the simplest of the error control

protocols.

A transmitter sends a frame then stops and waits for an

acknowledgment.

If a positive acknowledgment (ACK) is received, the next

frame is sent.

If a negative acknowledgment (NAK) is received, the

same frame is transmitted again.

7/27/2019 3_parity_and_error_control.ppt

http://slidepdf.com/reader/full/3parityanderrorcontrolppt 19/23

19

7/27/2019 3_parity_and_error_control.ppt

http://slidepdf.com/reader/full/3parityanderrorcontrolppt 20/23

20

Error Control

Go-back-N ARQ and selective reject are more efficient

protocols.

They assume that multiple frames are in transmission atone time (known as sliding window).

A sliding window protocol allows the transmitter to send

up to the window size frames before receiving any

acknowledgments.

When a receiver does acknowledge receipt, the

returned ACK contains the number of the frame

expected next .

7/27/2019 3_parity_and_error_control.ppt

http://slidepdf.com/reader/full/3parityanderrorcontrolppt 21/23

21

Error ControlFor a receiver to correct the error with no further help

from the transmitter requires a large amount of 

redundant information accompany the original data.

This redundant information allows the receiver todetermine the error and make corrections.

This type of error control is often called forward error

correction.

7/27/2019 3_parity_and_error_control.ppt

http://slidepdf.com/reader/full/3parityanderrorcontrolppt 22/23

22

What we covered

Error detection

Parity – 50%

CRC – can detect nearly all errors

Error correction

1. Do nothing

2. Return an error message to the transmitter

3. Fix the error with no further help from thetransmitter.

Error control techniques

7/27/2019 3_parity_and_error_control.ppt

http://slidepdf.com/reader/full/3parityanderrorcontrolppt 23/23

Thank You

23