• No results found

VERTICAL REDUNDANCY CHECK:

In document Cs6551 Computer Networks Notes (Page 36-41)

 It is also known as parity check. In this technique a redundant bit called a parity bit is appended to every data unit so that the total number of 1s in the unit including the parity bit becomes even for even parity or odd for odd parity.

 In even parity, the data unit is passed through the even parity generator. It counts the number of 1s in the data unit. If odd number of 1s, then it sets 1 in the parity bit to make the number of 1s as even.

 If the data unit having even number of 1s then it sets in the parity bit to maintain the number of 1s as even.

36 | P a g e CS6551 COMPUTER NETWORKS

 When it reaches its destination, the receiver puts all bits through an even parity checking function.

 If it counts even number of 1s than there is no error. Otherwise there is some error.

EXAMPLE:

The data is : 01010110 The VRC check : 010101100

 In odd parity, the data unit is passed through the odd parity generator. It counts the number of 1s in the data unit.

 If even number of 1s, then it sets 1 in the parity bit to make the number of 1s as odd. If the data unit having odd number of 1s then it sets in the parity bit to maintain the number of 1s as odd.

 When it reaches its destination, the receiver puts all bits through an odd parity checking function. If it counts odd number of 1s than there is no error. Otherwise there is some error.

EXAMPLE

The data is: 01010110 The VRC check: 01010111 CYCLIC REDUNDANCY CHECK

CRC is based on binary division. In this a sequence of redundant bits, called 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 its destination, the incoming data unit is divided by the same number. If at this step there is no reminder, the data unit is assumed to be intact and therefore accepted. A remainder indicates that the data unit has been changed in transit and therefore must be rejected.

Here, the remainder is the CRC. 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.

First, a string of n-1 0s is appended to the data unit. The number of 0s is one less than the number of bits in the divisor which is n bits. Then the newly elongated data unit is divided by the divisor using a process called binary division. The remainder is CRC. The CRC replaces the appended 0s at the end of the data unit.

The data unit arrives at the receiver first, followed by the CRC. The receiver treats whole string as the data unit and divides it by the same divisor that was used to find the CRC

remainder. If the remainder is 0 then the data unit is error free. Otherwise it having some error and it must be discarded.

Error Detection- CRC Generator

37 | P a g e CS6551 COMPUTER NETWORKS

Error Detection- CRC Checker

Error Detection- CRC Polynomials

• The divisor in the CRC generator is most often represented as an algebraic Polynomial.

• Reasons:

– It is short

– It can be used to prove the concept mathematically

CHECKSUM

The error detection method used by the higher layer protocols is called checksum.

It consists of two arts. They are, 1. checksum generator 2. checksum checker Checksum Generator:

• The sender follows these steps:

– The data unit is divided into ―k‖ sections, each of ―n‖ bits

38 | P a g e CS6551 COMPUTER NETWORKS

– All sections are added using one‘s complement to get the sum – The sum is complemented and becomes the checksum.

– The checksum is appended and sent with the data.

Checksum Checker:

• 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

EG:

Error Correction Techniques

• Retransmission  When an error is discovered, the receiver can ask the sender to retransmit the entire data unit

39 | P a g e CS6551 COMPUTER NETWORKS

• Forward Error Correction :

• A receiver can use an error-correcting code, which automatically corrects certain errors

• Single-bit errors:

• Can be detected by the addition of parity bit which helps to find ―error‖ or ―no error‖ which is sufficient to detect errors

• To correct errors the receiver can simply invert 0 to 1 or 1 to 0, but the problem is

―locating‖ the position of error

• To do so requires enough redundancy bits

• Condition: 2r >= m + r + 1

Error Correction-Hamming Code

• Hamming Code can be applied to data units of any length and uses the relationship between data and redundancy bits

• For example: a 7-bit ASCII code requires 4 redundancy bits that can be added to the end of the data unit or mixed with the original data bits, which are placed in positions 1, 2, 4 and 8 i.e x0,x1,x2,x3 and so on.

• In the Hamming Code, each “r” bit for one combination of data bits as below:

r1: bits 1, 3, 5, 7, 9, 11 r2: bits 2, 3, 6, 7, 10, 11 r3: bits 4, 5, 6, 7

r4: bits 8, 9, 10, 11

40 | P a g e CS6551 COMPUTER NETWORKS

Example of Redundancy bit Calculation

Error Correction-Burst Error Correction

• Instead of sending all the bits in a data unit together, we can organize ―N‖ units in a column and then send the first bit of each , followed by the second bit of each and so on

• In this way, if a burst error of M bits occurs (M<N), then the error does not corrupt M bits of one single unit; it corrupts only 1 bit of a unit.

• Burst Error Correction - Example

In document Cs6551 Computer Networks Notes (Page 36-41)