Presentation is loading. Please wait.

Presentation is loading. Please wait.

Chapter 2 : Direct Link Networks (Continued). So far... Modulation and Encoding Link layer protocols Error Detection -- Parity Check.

Similar presentations


Presentation on theme: "Chapter 2 : Direct Link Networks (Continued). So far... Modulation and Encoding Link layer protocols Error Detection -- Parity Check."— Presentation transcript:

1 Chapter 2 : Direct Link Networks (Continued)

2 So far... Modulation and Encoding Link layer protocols Error Detection -- Parity Check.

3 Next... CRC codes -- what are they ? Retransmissions of packets -- ensuring reliability. Multiple-access -- Ethernet.

4 CRC codes Cyclic Redundancy Check –based on theory of finite fields. Use of Modulo 2 arithmetic. Can help in detecting errors and in correcting some errors.

5 Representation Each (n+1) bit message is represented by a `n’ degree polynomial. Coefficient of a term = bit in the message. Example 10011010 is represented as: M(x) = 1x 7 + 0x 6 + 0x 5 + 1x 4 +1x 3 + 0x 2 + 1x 1 + 0x 0 Think of sender and receiver exchanging polynomials.

6 Generator Polynomial Sender and receiver agree upon a divisor polynomial of degree ‘k’ --> level of redundancy. Example : C(x) = x 3 + x 2 + 1 Common generator polynomials are tabulated -- coding theory. Choice of C(x) dictates what types of errors can be detected -- depends on protocol designer.

7 Modulo-2 rules A polynomial B(x) is divisible by C(x) if B(x) is of higher degree than C(x). A polynomial B(x) can also be divisible by C(x) if B(x) is of the same degree as C(x). Remainder of division = B(x) - C(x). To perform B(x) - C(x), XOR matching coefficients.

8 Example B(x) = x 3 + x 2 +1, C(x) = x 3 + 1 Division yields a remainder of x 2. Check -- result of the simple rules from previous slide.

9 Sender Functions Message M(x) is (n+1) bits long. Sends (n+1) + k bits --> adding K bits causes a new polynomial P(x). Requirement : P(x) should be divisible by C(x).

10 Receiver functions Receiver divides received polynomial by C(x). If remainder = 0, receiver believes that there are no errors. If remainder != 0, receiver believes that there are errors -- recovery possible.

11 Steps of Operation at Sender 1.Multiply M(x) by X k --> add k zeroes at the end of the message or induce a “left” shift -- let this be T(x) 2.Divide T(x) by C(x); find remainder. 3.Subtract remainder from T(x) to get P(x) Note -- P(x) exactly divisible by C(x).

12 Steps of Operation at Receiver Consider an error E(x). Received message = P(x) + E(x). Divide by C(x). If E(x) is of smaller degree than C(x), only E(x) remains. –P(x) is perfectly divisible. So remainder is E(x) -- the error itself!

13 Example M(x) = x 7 + x 4 + x 3 + x, C(x) = x 3 + x 2 + 1 k = 3 -- first multiple by x 3 to get T(x). Divide by C(x). Remainder = 101. Subtract 101 (XOR T(x) and 101) to find P(x).

14 Common Errors x i is a common error -- one bit is changed. Look at the book for more on C(x). Add error of say 110 and see what happens to remainder at the receiver. – What is E(x) ?


Download ppt "Chapter 2 : Direct Link Networks (Continued). So far... Modulation and Encoding Link layer protocols Error Detection -- Parity Check."

Similar presentations


Ads by Google