Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 12

DATA

COMMUNICATIONS
ERROR DETECTION
Error Control
 Error control is handling network errors caused by
problems in transmission, not human errors.
 Error types include corrupted data and lost data.
 Error control is concerned with:
1) preventing, 2) detecting and 3) correcting errors.
 While errors can occur in a single bit, they can also
be longer.
 An important error type is a burst error in which
many bits are corrupted at the same time.
2
Error Detection
 Most error detection techniques work in the same
way:
 An error detection value is first calculated by the sender
and transmitted along with the data.
 At the receiving end, the error detection value is
recalculated and checked against the received value.
 If the two values are the same, the data has been received
correctly
 If they differ, however, an error has occurred and the data
needs to be sent again.
 Three common forms of error detection techniques
are currently in use: parity checks, longitudinal
redundancy checking, and polynomial checking.
Error Detection Methods
There are three common error detection methods.
 Parity Checking
 Longitudinal redundancy checking
 Polynomial checking
 Checksum
 Cyclic Redundancy
Parity Checking
 One of the oldest and simplest method, parity
checking adds 1 additional bit to each byte in the
message.
 The value of this parity bit is dependent on the number
of 1’s in each byte transmitted.
 Even parity causes the sum of all 1’s bits (including
the parity bit) to be even.
 Odd parity causes the sum of 1’s to be odd.
Parity Checking
 At the receiving end, the parity bit is recalculated. If one bit
has been transmitted in error the received parity bit will differ
from the recalculated one.
 Parity checking is simple, but doesn’t catch all errors.
 If two (or an even number of) bits have been changed at the
same time, the parity check appears to be correct even though
an error has occurred.
 Unfortunately if two bits are erroneous, the parity checking
will fail.
 Parity checking results in about a 50% reliability rate.
Parity Checking example
 Assume we are using even parity with 7-bit ASCII.
 The letter V in 7-bit ASCII is encoded as 0110101.
 Because there are four 1s (an even number), parity
is set to zero.
 This would be transmitted as: 01101010.
 Assume we are using odd parity with 7-bit ASCII.
 The letter W in 7-bit ASCII is encoded as 0001101.
 Because there are three 1s (an odd number), parity
is set to one.
 This would be transmitted as: 00011011.
Longitudinal Redundancy Checking
(LRC)
 LRC was developed to overcome the problem
with parity’s low probability of detection.
 LRC adds one additional character, called the
block check character (BCC) to the end of the
entire message or packet of data. The value of
the BCC is calculated much like the Parity bit,
but for the entire message. Results in a 98%
reliability rate.
Longitudinal Redundancy Checking
 For example, suppose we were to send the message “DATA” using odd
parity and LRC with 7-bit ASCII:

Letter ASCII PARITY BIT

D 1000100 1
A 1000001 1
T 1010100 0
A 1000001 1

BCC 1101111 1

 (Note that the parity bit in the BCC is determined by parity, not LRC.)
Is 98% accuracy good enough for your message?
Polynomial Checking
 Like LRC, polynomial checking adds 1 or more
characters to the end of the message based on a
mathematical algorithm.
 With checksum, 1 byte is added to the end of the
message. It is obtained by summing the message
values, and dividing by 255. The remainder is the
checksum. (95% effective)
 With CRC, 8, 16, 24 or 32 bits are added, computed
by calculating a remainder to a division problem.
(99.969% with 8-bit, 99.99% with 16 bit effective).
CRC
 The CRC is a very powerful but easily implemented
technique to obtain data reliability.
 The CRC technique is used to protect blocks of data
called Frames.
 Using this technique, the transmitter appends an
extra n- bit sequence to every frame called Frame
Check Sequence (FCS).
 The FCS holds redundant information about the
frame that helps the transmitter detect errors in the
frame.
 The CRC is one of the most used techniques for
error detection in data communications.
CRC
 The technique gained its popularity because it
combines three advantages:
 Extreme error detection capabilities.
 Little overhead.
 Ease of implementation.

You might also like