0% found this document useful (0 votes)
56 views2 pages

Computer Network No.5 (Cont... Datat Link Layer) From APCOMS

The document discusses error correction techniques used in the data link layer of computer networks. It describes forward error correction, which allows a receiver to automatically correct certain errors without needing retransmission. The Hamming code is presented as a forward error correction technique that uses redundant bits interspersed with data bits to detect and correct single-bit errors. The document explains how the Hamming code works by using redundant bits as parity bits for different combinations of data bits to encode the data and detect errors.

Uploaded by

Naveed
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
56 views2 pages

Computer Network No.5 (Cont... Datat Link Layer) From APCOMS

The document discusses error correction techniques used in the data link layer of computer networks. It describes forward error correction, which allows a receiver to automatically correct certain errors without needing retransmission. The Hamming code is presented as a forward error correction technique that uses redundant bits interspersed with data bits to detect and correct single-bit errors. The document explains how the Hamming code works by using redundant bits as parity bits for different combinations of data bits to encode the data and detect errors.

Uploaded by

Naveed
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

Faisal Amjad CPS 422

CPS 422 THE PERSPECTIVE


Computer Networks

DATA LINK LAYER DATA LINK LAYER

Packetizing Addressing

Media Access Control

Flow Control Error Control

Faisal Amjad CPS 422

FORWARD ERROR CORRECTION


ERROR CORRECTION
‰A Receiver can use error correcting codes
to automatically correct certain errors.
ERROR CORRECTION BY RETRANSMISSION
‰Theoretically any number of errors can be
corrected.
FORWARD ERROR CORRECTION
‰To “Correct” an error the receiver must
know the “location” of error in received
data.

Faisal Amjad CPS 422 Faisal Amjad CPS 422

FORWARD ERROR CORRECTION (Contd…) FORWARD ERROR CORRECTION (Contd…)

‰To correct a “single-bit” error in an ASCII ‰What if an error occurs in redundancy bits???
character, the error correcting code must ‰So we have to cater for 10 bits (7 data + 3
determine which of the 7 bits has changed. redundant)
‰So it has to distinguish between eight ‰Hence 3 bits are insufficient for 7 bit data.
different states:
‰To calculate “r” redundant bits for “m” data
o No error
o Error in position 1
bits, consider this:
o Error in position 2 o r must be able to indicate m + r +1 states. Why????
o … o For m + r error states and 1 no-error state.
o Error in position 7 ‰Since r can represent 2r states, so 2r must
‰It “seems” 3 redundant bits are required to be greater than or equal to m+r+1
represent these 8 states (000 – 111). o 2r >= m + r + 1
Faisal Amjad CPS 422 Faisal Amjad CPS 422

1
THE HAMMING CODE THE HAMMING CODE

‰Can be applied to data units of any length and ‰Each redundant r bit is the parity bit for one
uses the same relationship between data and combination of data bits as fol :-
redundant bits. o r1 bits 1,3,5,7,9,11
‰Redundant bits are interspersed with data o r2 bits 2,3,6,7,10,11
bits at positions which are powers of 2, e.g. o r4 bits 4,5,6,7
1,2,4,8... o r8 bits 8,9,10,11
‰These bits are represented as r1,r2,r4,r8 etc. ‰Plug in the data bits at their respective
locations
11 10 9 8 7 6 5 4 3 2 1
‰Calculate each r bit as parity of the bit-
d d d r8 d d d r4 d r2 r1 combination mentioned above
11 10 9 8 7 6 5 4 3 2 1
Data bits are : 1001101 1 0 0 1 1 0 1

Faisal Amjad CPS 422 Faisal Amjad CPS 422

Error detection using Hamming code


Bit-combination ASSIGNMENT # 2
r1 bits 1,3,5,7,9,11
r2 bits 2,3,6,7,10,11 ‰Write a note on the performance of fol:
corrupted r4 bits 4,5,6,7
r8 bits 8,9,10,11 o Simple Parity check
o Two-Dimensional parity check
11 10 9 8 7 6 5 4 3 2 1

1 0 0 1 0 1 0 0 1 0 1
o CRC
o Checksum
1 0 0 1 0 1 0 0 1 0 1
o Hamming Code
1 0 0 1 0 1 0 0 1 0 1

1 0 0 1 0 1 0 0 1 0 1

Error position = 7 0 1 1 1

Faisal Amjad CPS 422 Faisal Amjad CPS 422

You might also like