 Hello and welcome to this video on error detection using cyclic redundancy code check. Myself Mr. Vipul Kondekar from Valchin Institute of Technology, Sholapur. At the end of this session, students will be able to differentiate between the two error control schemes error detection and error correction. Students will be able to calculate the CRC code for the given data using generator polynomial and identify the presence of error whether in the data transmitted data if error is there or not can be identified with the help of CRC. These are the contents of this video presentation. We will talk about error control technique, error detection correction, CRC code what generator polynomial, division how we carried out at the time of encoding and how decoding is done to identify the error in the transmission. When you are talking about the error control basically when you are transmitting the data the data is going over channel. Channel itself is sometimes unreliable so when you want to make your communication reliable or unreliable channel you need to have some sort of error control techniques. Now this error control can be done in two different ways either you can go for error correction techniques this is also called as forward error correction or forward error control you transmit the data if error is detected then try to correct the error at the receiver side itself. So this technique is called as error correction where you detect the error as well as correct the error. And then another approach which is called as which is also called as reverse error control is error detection technique. Here only error is detected and once the error is detected then receiver will ask for a retransmission of the data to the sender so retransmission will take place. You are using error correction or detection ultimately what you do for that is suppose n number of bits you are sending as a code word so that n bits will be made up of actual m number of message bits to that r bits or redundant bits are getting added. So actual code word send will have message bits along with some redundant bits and then these redundant bits will give you ability of detecting the error or correcting the error. Now think when to use error correction technique and when to use error detection technique. Now we will go for CRC cyclic redundancies check technique for error detection. So here only error is detected d number of data bits suppose you want to send so what we do is we take the help of g as a generator polynomial so that generator polynomial has let us say r plus one number of bits then what we do is we use that r bits in such a that we concatenate the data bits along with the CRC code which is generated by using a modulo to division technique. Now this modulo to division is when you are doing in mod to operation your addition and subtraction is analogous to XOR operation itself with in the example we will see how this mod to division is carried out. So you will use generator polynomial and then data will get divided by that generator polynomial. Now receiver knows that generator polynomial so what receiver does receiver again divides that transmitted code which is generated by the same generator polynomial and if the reminder is nonzero then error is detected and if reminder is zero then there is no error in the transmission this is what conclusion you can make. This CRC is quite popular technique it is widely used in the practice for Ethernet or 802.11 Wi-Fi ATM as well. Now let us try to understand this CRC check how it is carried out if you have some data d so to that data I already at the transmitter side I append n number of bits now how many bits you will append it depends on if your divisor which will be decided by the generator polynomial has n plus one number of bits this number of zeros will be n means if your divisor has five bits here four bits you will append. Now data along with this appended zeros this whole thing is divided by the divisor and this divisor will be decided by the generator polynomial and whatever is the reminder of that that reminder is called as CRC code and that CRC code will be of n bits. Now what I can do is these n bits can be appended here so data previously all zeros were there but while sending what I do is data and instead of zeros this CRC bits will be appended here and at the receiver side what I do whatever is the received data I will use the same divisor very important thing is this divisor and this divisor has to be same and then I will check for the reminder and if reminder is zero then it means that there is no error in the transmission and if reminder is non-zero means the error has occurred in the transmission so that data has to be rejected and then this receiver will ask for retransmission to the sender. Now let us try to understand different generator polynomials available these are few standard generator polynomial examples so let us take this is one generator polynomial x raise to 7 x raise to 5 so then from this generator polynomial I can form a divisor and the divisor will be what wherever that x raise to 7 means 7 degree is available so there I write 1 so x raise to 0 is 1 fine so x raise to 1 is present I write 1 x raise to 3 and x raise to 4 are not present in this polynomial so at these locations I write 0 0 as well x raise to 6 is not available here I write 0 so based on this generator polynomial I can have binary equivalent of the divisor now what I do is these are some standard generator polynomials use if you are using a synchronous transmission ATM so CRC 8 is used as well as this CRC 16 is used for HDLC high data link layer control protocol as well same thing is used for Bluetooth also and for LANS Ethernet this CRC 32 is the generator polynomial used for the error control now let us try to understand how error is detected using CRC now assume that this is the data you want to say so data has four bits now I decide that the generator polynomial based on generator polynomial this is the divisor what I have so divisor has four bits so what I do is I append three zeros here then I carry out mod 2 division so when you are calling out mod 2 division you look at the most significant bit appearing here and if that bit is 1 I write quotient as 1 and then if quotient is 1 this whole divisor I will be writing here so this is 1 0 1 1 now actually in regular division you are carrying out here subtraction but if it is mod 2 division this subtraction is analogous to the XORing operation so this 1 XOR 1 will be 0 so like this I do that XORing operation I get here 0 1 0 and then as here I have four bits I take one bit from here this is the appended three appended zeros are there so now look at this here again most significant bit is 0 so the quotient part I write it as 0 and then if left most bit is 0 use 0 0 0 as a divisor so again I write 0 0 0 here now again I do mod operation here most significant bit is 1 so I write here 1 and then I write divisor as it is I do mod 2 subtraction I get this result finally I get this reminder reminder is 1 1 0 so now what I do is how I form code word is code word is formed by actual data bits appended with the reminder what you got here so this will be the data word which will be sending now assume that this data word is sent let us have two cases where the data word is sent which has no error and this is the same data word sent but what you find here is this bit is altered this bit is becoming 0 actually it was 1 so now what happens again what I do is I use the same generator polynomial for the receiver side again I carry out mod 2 division and then what I get I check for the reminder here now if I find that reminder is 0 0 0 it means that there is no error in the transmitted data but here if I look at this division here I know that this error has occurred but how the system will come to know error has occurred so system will carry out again mod 2 division at the side of receiver for decoding's purpose and then when that division is carried out what result you get is non-zero and when the result is non-zero you can conclude that data word has got error so that has to be discarded and the receiver will ask for retransmission of the data to the sender so this is how CRC will be doing the error detection that error control will be of forward error control where sorry that will be of reverse error control where the receiver will detect the error and once the error is detected receiver will ask for retransmission of the data and then it will be expected it is expected that when you are transmitting read when you are retransmitting the data there will not be any error so basically when you go for error detection technique you assume that the channel is reliable and because of some reason if error has occurred then when the data is retransmitted the probability of occurrence of the error in the retransmitted data is very less in that case we go for using error detection techniques so this is how the CRC code can be used for error control it can detect the occurrence of the error so these are the references used for this video presentation thank you