0% found this document useful (0 votes)
24 views

Error Detection Correction I

Uploaded by

BT VITHU
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
24 views

Error Detection Correction I

Uploaded by

BT VITHU
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 26

ERROR DETECTION & CORRECTION

TECHNIQUES
WHAT IS ERROR?

Error is a condition when the output information does not match with
the input information. During transmission, digital signals suffer from
noise that can introduce errors in the binary bits travelling from one
system to other. That means a 0 bit may change to 1 or a 1 bit may
change to 0.
ERROR-DETECTING CODES

Whenever a message is transmitted, it may get scrambled by noise or


data may get corrupted. To avoid this, we use error-detecting codes
which are additional data added to a given digital message to help us
detect if an error occurred during transmission of the message.
Error detection uses the concept of redundancy, which means adding
extra bits for detecting errors at the destination.
Normally three types of error detection methods used by the system.
1. Parity Check
2. Cyclic Redundancy Check
3. Checksum
1. PARITY CHECK
The most common and least expensive mechanism for error detection is
the parity check.
The parity check can be simple or two-dimensional.
Simple parity check:
In this technique, a redundant bit called a parity bit, is added to every
data unit so that the total number of 1s in the unit (including the parity
bit) becomes even (or odd); depends on the system requirement.
Odd parity : 10111100
Even parity :10111101
In the case of even parity, for a given set of bits, the occurrences of bits whose value is 1 is
counted. If that count is odd, the parity bit value is set to 1, making the total count of
occurrences of 1's in the whole set (including the parity bit) an even number. If the count of
1's in a given set of bits is already even, the parity bit's value is 0.

In the case of odd parity, the coding is reversed. For a given set of bits, if the count of bits
with a value of 1 is even, the parity bit value is set to 1 making the total count of 1's in the
whole set (including the parity bit) an odd number. If the count of bits with a value of 1 is
odd, the count is already odd so the parity bit's value is 0.

7 bits of data 8 bits including parity


(count of 1-bits)
even odd
0000000 0 00000000 00000001
1010001 3 10100011 10100010
1101001 4 11010010 11010011
1111111 7 11111111 11111110
TWO-DIMENSIONAL PARITY CHECK:
• In this method, a block of bits organized in a table (rows and columns)
and calculate the parity bit for each data unit.
• In addition the column parity is also found. Then attach the 8 parity bits
to the original data and send them to the receiver.
Eg: Original System :
1100111 1011101 0111001 0101001
1 2 3 4
Consider an even parity system;
• Order the bits in rows
• Assume system is even parity system
1 1 1 0 0 1 1 1 1

2
1 0 1 1 1 0 1 1
Row Parities

0 1 1 1 0 0 1 0
3

4 0 1 0 1 0 0 1 1

0 1 0 1 0 1 0 1

Column Parities

So, sent data :


11001111 10111011 01110010 01010011 01010101
2. CYCLIC REDUNDANCY CHECK (CRC)
• It is the most powerful error detection method.
• Unlike parity check which is based on addition, CRC is based on binary
division.
• In CRC, instead of adding bits to achieve a desired parity, a sequence of
redundant bits, called the CRC or the CRC remainder, is appended to the
end of a data unit.
• So that, the resulting data unit becomes exactly divisible by a second,
predetermined binary number.
• At the destination, the incoming data unit is divided by the same number
and if there is no reminder the data unit is assumed to be correct and
therefore accepted.
• A reminder indicates that the data unit has been damaged
in transit and therefore must be rejected.
• The redundancy bits used by CRC are derived by dividing
the data unit by a predetermined divisor; the reminder is
the CRC.
• To be valid, a CRC must have two qualities : It must have
exactly one less bit than the divisor, and appending it to the
end of the data string must make the resulting bit sequence
exactly divisible by the divisor.
XOR
EXAMPLE - 01

• Original Message: 1100111110


• Generator polynomial : x4+x3+1
EXAMPLE - 02

• Original Message: 10110101110


• Generator polynomial : x3+x2+1
HOMEWORK

Given the dataword 1010011110 and the divisor 10111


a) Show the generation of the codeword at the sender site
using binary division
b) Show the checking of the codeword at the receiver site
assuming no error has occurred.
c) What is the syndrome at the receiver end if the dataword
has an error in the 5th bit position counting from the
right? Namely: dataword 1010001110 is received.
3. CHECKSUM
A checksum is an error-detection method in a transmitter computes a numerical
value according to the number of set or unset bits in a message and sends it along
with each message frame.
The checksum is used in the Internet by several protocols
Suppose our data is a list of five 4-bit numbers that we want to send to a
destination. In addition to sending these numbers, we send the sum of the
numbers.
For example, if the set of numbers is (7, 11, 12, 0, 6), we send (7, 11, 12, 0,
6, 36), where 36 is the sum of the original numbers.
The receiver adds the five numbers and compares the result with the sum.
If the two are the same, the receiver assumes no error, accepts the five
numbers, and discards the sum.
Otherwise, there is an error somewhere and the data are not accepted.
We can make the job of the receiver easier if we send the
negative (complement) of the sum, called the checksum.
In this case, we send (7, 11, 12, 0, 6, −36). The receiver can
add all the numbers received (including the checksum).
If the result is 0, it assumes no error; otherwise, there is an
error.
• The sender follows these steps:
• The unit is divided into k sections, each of n bits.
• All sections are added using one’s complement to get the sum.
• The sum is complemented and becomes the checksum.
• The checksum is sent with the data.

• The receiver follows these steps:


• The unit is divided into k sections, each of n bits.
• All sections are added using one’s complement to get the sum.
• The sum is complemented.
• If the result is zero, the data are accepted: otherwise, rejected.
4 bits

Wrapped sum 1 1
1 Check sum 0
EXAMPLE
• Suppose the following block of 16 bits is to be sent using a
checksum of 8 bits.
• 10101001 00111001
• The numbers are added using one’s complement
• 10101001
• 00111001
------------
Sum 11100010
• Checksum 00011101
• The pattern sent is 10101001 00111001 00011101
• Now suppose the receiver receives the pattern without any error
10101001 00111001 00011101
• When the receiver adds the three sections, it will get all 1s, which, after
complementing, is all 0s and shows that there is no error.
10101001
00111001
00011101
Sum 11111111
Complement 00000000 means that the pattern is OK.
EX. 1.

Suppose that a message 1001110010100011 is transmitted


using Internet Checksum (4 bit word). What is the value of
the Checksum.
EX 2

• Suppose that a message 1101111011101011 is transmitted


using Internet Checksum (4 bit word).
• Estimate the value of the checksum.
• Reconstruct the actual message transmitted.
• Suppose that the third bit from the left is inverted during
transmission. Show that this error is detected at the
receiver side.

You might also like