CH 10
CH 10
Correction
• We know that when the signal travels through a transmission medium it
suffers from various transmission impairments such as Attenuation,
Distortion and Noise.
• Out of it Noise plays a major role in introducing the Error in the signal.
• Error in the signal means changing the original bit value of the signal
that means a 0 bit may change to 1 or a 1 bit may change to 0.
Original Signal 0111_____(Noise)_____ 0101 (Error)
Classification of Error
a) Single Bit Error b) Burst Error
• The term single-bit error means
that only 1 bit of a given data
unit (such as a byte, character,
or packet) is changed from 1 to
0 or from 0 to 1.
• The term burst error means that
2 or more bits in the data unit
have changed from 1 to 0 or
from 0 to 1.
• To make error detection or correction possible we add certain extra
bits at the end of data bits.
• The extra bits are also called as Redudant bits
• These redundant bits are added by the sender and removed by the
receiver.
• Their presence allows the receiver to detect or correct corrupted bits.
Detection versus Correction
• The correction of errors is more difficult than the detection.
• In the Error detection, once the receiver detects an error in the Frame it rejects the Frame sends
its Neagtive Acknowledgement to the Sender and it is the responsibilty of the sender to retransmit
the Frame again
Some popular techniques for error detection are:
1. Simple Parity check 2. Two-dimensional Parity check 3. Checksum
4. Cyclic redundancy check
• In error correction, once the receiver detects an error now the responsiblity of correcting the
error left with the receiver only. The task of the receiver is
• To know the exact number of bits that are corrupted and, more importantly, at what bit positions
the error happens.
Error Correcting Code
1 Hamming Code
Hamming Code is able to detect and correct only single bit error.
• Simple Parity Check
It is the simplest and the most popular error detection technique.
A single Parity bit is added at the end of data bits.
It is of two types
a) Even Parity b) Odd Parity
In Even Parity the total number of 1 ' s including the Parity bit should be even.
In Odd Parity the total number of 1 ' s including the Parity bit should be odd.
For example Let the Data bits to be sent are 1011001 using even parity
Parity bit is added at the end of data bit ,to make it even count the number of 1's
present in the Data bits . 4 1's in the Data Bits so for the Even Parity the the total
number of 1 ' s including the Parity bit should be even so the Parity bit 0 is appended at
the end of the Data Bits. 10110010
Encoder and Decoder for Simple Parity
Check
Assume the sender sends the dataword 1011 using Even Parity The codeword becomes
10111, which is sent to the receiver.
We examine five cases for the even parity system we are using.
Case I: The received codeword is 10111. The syndrome is 0. No Error in the received
Frame,so The dataword 1011 is accepted by the receiver.
Case 2 :One single- bit error changes a1. The received codeword is 10011.
The syndrome is 1 . Error in the received Frame so The dataword 1011 is not accepted
by the receiver.
Case 3:The parity bit, in our example changes. So now 10111 is 10110
The syndrome is 1 . Error in the received Frame so The dataword 1011 is not accepted
by the receiver.
a3 a2 a1 a0 P
1 0 1 1 1
case 4 Suppose now that we have two changes at a3 and Parity Bit .
The received codeword is 00110. The syndrome is 0. • The dataword 0011 is accepted
at the receiver. • Note that here the dataword is wrongly accepted
Case 5:
Suppose now we have three changes at a3 a2 a1 and the received codeword is 01011.
The syndrome is 1.The dataword is not accepted by the Receiver.
Checksum
• In checksum the data is divided into k segments each of m bits.
• At the sender’s side all the segments are added using 1’s complement arithmetic to get the
sum( In 1's Complement the end around carry bit is always added to the least significant
bit).
• The obtained sum is complemented to get the checksum.
• The checksum segment is sent along with the data segments.
• At the receiver’s end, all received segments are added using 1’s complement arithmetic to
get the sum.
• The obtained sum is complemented. If the result is zero, the received data is accepted;
otherwise discarded.
• Suppose the message 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 message not accepted.
• In the previous example, the decimal number 36 in binary is (100100)2. To
change it to a 4-bit number we add the extra leftmost bit to the right four bits as
shown below.
Instead of sending 36 as the sum, we can send 6 as the sum (7, 11, 12, 0, 6, 6). The
receiver can add the first five numbers in one’s complement arithmetic. If the
result is 6, the numbers are accepted; otherwise, they are rejected.
• Let us use the idea of the checksum . The sender adds all five numbers in one’s
complement to get the sum = 6. The sender then complements the result to get
the checksum = 9, which is 15 − 6. Note that 6 = (0110)2 and
• 9 = (1001)2; they are complements of each other. The sender sends the five data
numbers and the checksum (7, 11, 12, 0, 6, 9). If there is no corruption in
transmission, the receiver receives (7, 11, 12, 0, 6, 9) and adds them in one’s
complement to get 15
Cyclic Redudancy Check
D7 D6 D5 P4 D3 P2 P1
1 0 1 0 1 0 1
D7 D6 D5 P4 D3 P2 P1
1 0 1 0 1 0 1