Вы находитесь на странице: 1из 7

Data Link Layer

Bit error rate (BER): In analog transmission, signal quality is specified in terms of SNR in dBs.
' In digital transmission, the quality of received signal is specified in terms of BER. It is the
number of errors in a fixed number of transmitted bits (A good telephone line has 1 error in
106).
CER (character error rate): It is the average number of characters received with at least one
error in a large sample of characters.
.•• FER (Frame error rate): It is the average number of frames received with at least one error in a
large sample of transmitted frames.

Error Detection Methods:


Some of the popular methods are,
i) Parity checking.
ii) Checksum error detection and
iii) CRC (Cyclic redundancy check)

Computer Networks & Protocols by S.Meenatchisundaram 105


Data Link Layer
i) Parity checking:
' Here a parity bit is added to each data word. Even parity when the weight of code formed is
even and odd parity, when the weight of the code formed is odd .
Example:
Even Parity Odd Parity
P Data word P Data word
.••

0 1010110 1 1010110
1 1100010 0 1100010

With single error or more number of errors occurring, the parity of code word is checked at
the receiver. The violation of parity rule indicated errors.
Example:
Transmitted code 11100010 Even Parity
Received code (Single error) 01100010 Odd Parity (error detected)
Received code (Double error) 01101010 Even Parity (error not detected)

Computer Networks & Protocols by S.Meenatchisundaram 106


Data Link Layer
Limitations:
'
i) Double or any even number of error goes undetected (not suitable for multiple errors).
ii) Parity checking does not show the location of the erroneous bit.
iii) Error cannot be corrected with parity checking method.
iv) Parity checking completely fails for the errors occurring in bursts (checksum and CRC can
.••
take care of burst errors).
2) Checksum error detection:
Here a checksum is transmitted along every block of data bytes. Eight bit bytes of a block are
added in an eight-bit accumulator. The resulting sum in the accumulator is the checksum (Here
the carries of MSBs are ignored). After transmitting the data bytes, the checksum is
transmitted. The checksum regenerated at the receiving end will be different if there are errors.
Advantage: (over parity check) Unlike simple parity where even number of errors may not be
deleted, in checksum there is 255 to 1 chance of detecting random errors.
3) Cyclic redundancy check (CRC): CRC codes are very powerful and are very commonly used.
These codes provide a better measure of protection. They can be easily implemented using
shift registers or software. They are also known as polynomial codes.

Computer Networks & Protocols by S.Meenatchisundaram 107


Data Link Layer
' The theory of CRC is derived from a branch of mathematics called algebraic coding theory.
Data block of 'k' bits can be represented by a polynomial in a variable 'x' having ‘k’ terms (i.e.
polynomial of order (k-1)).
The polynomial M(x) is given by
M(x)=ak-1 xk-1 + ak-1 xk-1 +…………………..+a2x2+a1x1+a0x0
.•• Where ak-1, ak-2……….ao are the bits (0 or 1) in the data block.
Let the data message to be sent be 1010001101 then,
M(x) = X9 +(0) x8 +1*x7 + ... +1*xo = (x9+ x7 + x3 + x2 +1) ------------ (1)
Higher order bit is transmitted first. To transmit the data block, a second polynomial called
generating polynomial; G(x) is used. G (x) is of degree ‘r’. 'r' is less than that of M(x), but>0.
Let G(x) = (x5 + x4 + x2 +1) --------------- (2)
The steps or algorithm for computing the checksum are:
i) Let 'r' be the degree of G(x). The data message M(x) is multiplied by xr, giving ‘r’ zero bits to
the low-order end of the frame. i.e. (k + r) bits will be present corresponding to the
polynomial xrM(x).

Computer Networks & Protocols by S.Meenatchisundaram 108


Data Link Layer
ii). The result is divided by G(x) using modulo 2 division (polynomial arithmetic is done).
' According to the rules of algebraic field theory there are no carries for addition and borrows
for subtraction. This gives a unique quotient Q(x) and a remainder R(x).
iii) The remainder is subtracted form the bit stream corresponding to xrM(x) using modulo 2
subtraction.
iv) Call the result (check summed frame for transmission) as polynomial T(x).
.••
Example: Find the CRC for a frame (message) 1010001101 and G (x) is = x5+x4+x +1.
1) ‘r’ = 5 as G(x) is of degree 5.
xrM (x) = X5 (X9+ X7 +X3 +X2 +1) = (X14 +X12 + X8 + X7 + X5)
=101000110100000
2) {xrM(x) / G(x)} gives a remainder of x3 + x2 + x= 01110
110101011
110101|1 0 1 0 0 0 1 1 0 1 0 0 0 0 0
110101
0111011
110101
0011101

Computer Networks & Protocols by S.Meenatchisundaram 109


Data Link Layer
' 00111010
110101
00111110
110101
00101100
.••
110101
0110010
110101
0001110

3) 1010001101|01110 ---------- T(x)


i.e. the polynomial to be transmitted T(x) consists of the data (message) word followed by the
remainder. The code word generated {T(x)} is completely divisible by the divisor. At the
receiver, a non-zero remainder after dividing by the same divisor, G(x) indicates errors in
transmission of the code word. If the remainder is zero, there is no error or an undetectable
error.

Computer Networks & Protocols by S.Meenatchisundaram 110


Data Link Layer
' Undetected errors in CRC:
Not all types of errors can be detected by CRC code. The probability of error detection and
types of error that can be detected depends on the choice of divisor. When a number of bits
are changed by noise, the error may get noticed or unnoticed. Let E(x) be the pattern of error
bits. For a message in error {T(x) + E(x)} will be received. If this is exactly divisible by G(x),
the error goes unnoticed. Hence proper G(x) is to be picked such that the pattern of error bits
.••
will not be divisible by it.
Error Detection Probability:
I) Single Bit Error II) Double Bit Errors
III) Odd number of errors IV) Burst of errors
Some of the common generating polynomials and their applications are,
CCITT V4.l X16 + X12 + x5 +1 used in HDLC / SDLC / ADCCP protocols.
CRC-12 Xl2 + X11 + x3 + x2 + X1 + 1 used in BISYNC protocols .
CRC-16 X16 + X15 + x2+ 1 used in BISYNC protocols.
CRC-32 X32 + x26 + ……. + x+ 1.
CRC-16 catches all single and double bit errors, all errors with an odd number of bits, all burst
errors of length ~ 16.99.998% of 18 bit and longer bursts.

Computer Networks & Protocols by S.Meenatchisundaram 111

Вам также может понравиться