3. Introduction To Error Detection And Correction
When a transmission of digital signal takes place between two systems such as computers
as shown in given figure. The get contaminated due to the addition of NOISE to it.
It is necessary to detect and correct errors because these errors can become a serious threat
To the accuracy of the digital system.
Binary signal
Binary signal
contaminated
by noise
Computer 1
Computer 2
TYPES OF ERRORSThere are two types of errors1.CONTENT ERRORS
2.FLOW INTEGRITY ERRORS
The content errors are nothing but errors in the content of a message For e.g. ”0” may
Receive as “1“or vice versa. Such errors are introduced due to noise added into the in data
signals during its transmission.
4. Types Of Bit Errors
1.SINGLE BIT ERROR
2.BURST ERROR
SINGLE BIT ERROR:• The term single bit error suggests that only one bit in the given data unit such as a
byte is in a error.
• That means only one bit can be change from 1 to 0 or 0 to 1, as shown in the figure.
0 1 1 1 0 0 1 1
Medium
Transmitted Byte
0 1 1 1 0 0 1 0
Received Byte
Error
BURST ERRORS:• If two or more bits from a data unit such as byte change from 1 to 0 or from 0 to 1
then burst errors are said to have occurred.
• The length of the burst is measured from the first corrupted bit to the last corrupted
bit. Some of the bits in between may not have been corrupted.
• Burst errors are illustrated in the given figure.
Errors
0 1 1 1 0 0 1 1
Transmitted Byte
Medium
0 1 0 1 1 0 0 1
Received Byte
5. Important Definitions Related To Codes
CodewordThe Codeword is the encoded block of bits. As already seen it contains message bits &
parity or redundant, as shown in given figure.
Code word
Code rate-
Data bits
Parity bits
The code rate is defined as the Ratio of the number of message bits(k) to the total number
of bits(n) in a codeword.
Code rate (r) = k
n
Code efficiencyThe Code efficiency is defined as the ratio as the ratio of message bits to the number of
transmitted bits per block.
Code efficiency = Code rate = k
n
6. Error Detection
When a code word is transmitted, one or more number of transmitted bits will be reserved
(0 & 1 or vice versa) due to transmission impairments. Thus the errors will be introduced.
It is possible for the receiver to detect these errors if the received codeword (corrupted) is
not one of the valid codeword's.
When the errors are introduced, the distance between the transmitted & received
codeword's will be equal to the number of errors as illustrated in given figure.
Transmitted
code word
10101100
11101011
00100101
Received code
word
11101100
01111011
10110001
error
error
error
Number of
errors
1
2
3
Distance
1
2
3
Hence to detect the errors at the receiver, the valid codeword's should be separated by a
distance of more than 1.
Otherwise the incorrect received codeword’s will also become some other valid codeword’s
& the error detection will be impossible.
7. Error Detection Methods
What is ERROR DECTECTION METHODS?
Before thinking of correcting the errors introduced in the data bits is necessary to first
detect them.
For error detection & correction it is necessary to add some check bit to a block of data
bits. These check bits are also known as “Redundant bits” because they do not carry any
useful information.
Some of the most important error detection methods are as follows1. Parity Checking.
2. Checksum Error Detection.
3. Cyclic Redundancy Check (CRC).
Error Detection Methods
Parity Checking
Checksum Error
Detection
Cyclic Redundancy
Check (CRC)
8. PARITY
The simplest technique foe detecting errors is add an extra bit known as PARITY
bit to each word being transmitted.
As shown in given figure generally the MSB of an 8-bit word is used as the parity
bit & the remaining 7 bits are used as data or message bits.
MSB
P
Parity bits
LSB
d6
d5 d4 d3 d2 d1 d0
7- data bits
The parity of the 8-bit transmitted word can be either even parity or odd parity.
Even Parity means the number of 1’s in the given word including the parity bit
should be even (2,4,6,8,…..).
Odd Parity means the number of 1’s in the given word including the parity bit
should be odd (1,3,5,7,…..).
9. Two Dimensional Check
When a large number of binary words are being transmitted or
received in succession, the resulting collection of bits is considered
as a block of data, with rows & columns as shown in given figure.
The parity bits are produced for each row & column of such block of
data.
The two sets of parity bits so generated are known as:
• Longitudinal Redundancy Check (LRC) bits.
• Vertical Redundancy Check (VRC) bits.
10. Cyclic Redundancy Check (CRC)
This is a type of polynomial code in which a bit string is represented in the form of
polynomials with coefficient of 0 and 1 only
Polynomial arithmetic uses a modulo-2 arithmetic i.e. addition and subtraction
are identical to EXOR.
For CRC code the sender and receiver should agree upon a generator polynomial
G(x). A codeword can be generated for a given data word (message)
polynomial M(x) with the help of long division.
This technique is more powerful than the parity check and checksum error
detection.
CRC is based on binary division. A sequence of redundant bits called CRC or CRC
remainder is appended at the end of a data unit such as byte.
The resulting data unit after adding CRC remainder becomes exactly divisible by
another predetermined binary number.
At the receiver, this data unit is divided by the same binary number.
There is no error if this division does not yield any remainder. But a non-zero
remainder indicates presence of errors in the received data unit.
Such an erroneous data unit is then rejected.
11. Error Correction Technique
Codes are generated by adding a group of parity bits or check bits.
The source generates the binary data which is accepted by encoder to add the
check bits to them to produce the code words.
The check bits are used by decoder to detect and correct the errors.
Data source
Data bits
Encoder
Decoder
Code words
Data bits
Destination
Data bits
Check bits
The encoder adds check bits to the data bits according to the prescribed rule.
Decoder uses parity bits to detect and correct errors after separating data and
check bits.
The data bits are then applied to the destination.
12. FEC (Forward Error Correction)
In FEC the receiver searches for the most likely correct code word.
When a Error is detected, the distance between the received invalid code word &
all the possible valid code words in measured.
The nearest valid code word (the one having minimum distance) is the most likely
correct version of the received code word as shown in given figure.
Concept of FEC
Valid Code Word 1
Distance
1
Received Code Word
11001100
Distance
2
Distance
3
11011100
Valid Code Word 2
11101101
Valid Code Word 3
11110100
In given figure, The valid code word 1 has the minimum distance (1), hence it is
the most likely correct code word.
13. CRC Checker
The codeword at the receiver of data & CRC.
The receiver treats it as one unit & divides it by the same (n+1) bit divider which
was used at the transmitter.
The reminder of this division is then checked.
If the reminder is Zero, then the received codeword is error free & hence should
be accepted.
Nut non-zero reminder presence of errors hence the corresponding codeword
should be rejected.
Received Codeword
Data
CRC
Data
(n+1) bits
If reminder is 0 then no errors.
CRC
Divisor
Reminder
14. ARQ Technique (Retransmission)
There are two basic systems of error detection & correction they are
•Automatic repeat request (ARQ).
•Forward error correction (FEC).
In ARQ system when error is detected, a request is made for the retransmission of
that signal.
The points differs ARQ & FEC are:•In ARQ system less number of check bits (parity bits) are required to be sent. This
will increase the (k/n) ratio for an (n,k) block code if transmitted using the ARQ
system.
•A return transmission path & additional hardware in order to implement repeat
transmission of codeword's will be needed.
•The bit rate of forward transmission must make allowance for the backward
repeat transmission.
16. Operations of ARQ System
The encoder produces codeword's for each message signal and its input. Each
codeword at the encoder output is stored temporarily and transmitted over the
forward transmission channel.
At the destination a decoder will decode the code words and look for errors.
If decoder doesn’t get a error than it is positive (ACK), and if he gets negative than
its negative (NAK).
If its NAK than its will return back to “controller” and it will correct the word and
pass it back to input buffer.
A word can be retransmitted twice or more no of times.
The output will be displayed as the errors are being cleared.