Contents Parity Check Checksum Cyclic Redundancy Check Echo Check Parity Check In this process, the sender and the sender agree to use the same even parity or odd parity bit scheme. In an even parity check, it is ensured that there are an even number of 1s and 0s in the transmission. In an odd parity check, it is ensured that there is an odd number of 1s and 0s in the transmission. One of the bits in the byte is reserved for a parity bit. The parity bit is set according to whether the parity being used is even or odd. If even parity bit is used, the value of the parity bit would be 0. On the hand, if odd parity bit is used, the value of the parity bit would be 1 Once the source transmits data, the number of bits is checked by the receiver. If the number of received bits does not match what was agreed upon, it raises a red flag about the transmission’s accuracy and future communication may be halted until the reason for the mismatch has been identified. No Error Detected : Lets say that the sender and the receiver agreed on the even parity bit. The data the sender wants to send is- 00101011 The parity bit the sender uses is 0. Therefore the data that would be transmitted would look something like this- 0101011 The receiver receives the message as- 0101011 As there are even number of 1s and 0s, no error is detected Error Detected : Lets say that the sender and the receiver agreed on the even parity bit. The data the sender wants to send is- 00101011 The parity bit the sender uses is 0. Therefore the data that would be transmitted would look something like this- 0101011 The receiver receives the message as- 0001011 As there are odd number of 1s and 0s, though the sender and receiver agreed on even parity, an error is detected Drawbacks with parity check: Parity Checks do not detect an error even when the message is changed in the following situations: When two bits change simultaneously When the parity bit along with another bit change When the order or the bits change One of the ways round this problem is to use parity blocks. In this method, a block of data is sent and the number of 1-bits are totaled horizontally and vertically (in other words, a parity check is done in both horizontal and vertical directions). Checksum The sender first divides the data into sections. All these sections are then added. The data along with the 1’s complement (converting all the 0s to 1s and vice versa) of the sum (checksum) is sent to the receiver. The receiver performs the same operations on the data received. If the final answer contains all zeros then no error is detected. However, if all the bits of the answer are not zero then an error is detected No Error Detected : The data the sender wants to send is: 10010000010010101010000111110110 The sender divides this into 4 parts, each one being 1 byte long: 10010000 01001010 10100001 11110110 Adding all these bytes: 1001110001 Since there is an overflow of 2 digits, the sender would add the carry- 01110011 The 1’s complement of this would be- 10001100 This the checksum. The original data along with the checksum would be transmitted to the receiver. The receiver then performs the same algorithm as the sender did ( this time will the checksum to). The receiver would get something like- 1011111101 Since there is an overflow of 2 digits, the receiver will add the carry and get- 11111111 The 1’s complement of the number would be 00000000. As all the digits are zero, no error is detected No Error Detected : The data the sender wants to send is: 10010000010010101010000111110110 The sender divides this into 4 parts, each one being 1 byte long: 10010000 01001010 10100001 11110110 Adding all these bytes: 1001110001 Since there is an overflow of 2 digits, the sender would add the carry- 01110011 The 1’s complement of this would be- 10001100 This the checksum. The original data along with the checksum would be transmitted to the receiver. The receiver receives- 10010000 01001010 10100001 11110110 1000110 1 The receiver then performs the same algorithm as the sender did ( this time will the checksum to). The receiver would get something like- 1011111100 Since there is an overflow of 2 digits, the receiver will add the carry and get- 11111111 The 1’s complement of the number would be 00000001. As all the digits are not zero, an error is detected Cyclic Redundancy Check This involves the sending computer adding up all the 1-bits in the payload and storing this as a hex value in the trailer before it is sent. Once the packet arrives, the receiving computer recalculates the number of 1-bits in the payload. T he computer then checks this value against the one sent in the trailer. If the two values match, then no transmission errors have occurred; otherwise the packet needs to be re-sent. No Error Detected : The data the sender sends- 10011010 Adding all the values of 1 128+16+8+2= 134 The hexadecimal value of this number is- 86 The data transmitted would look something like- 86 The receiver computer then converts this into its binary value, which would be- 10011010 Adding all the values of 1 128+16+8+2= 134 As the sum of all the 1s in the data the receiver got is the same as the sum of 1s in the original data, no error is detected No Error Detected : The data the sender sends- 10011010 Adding all the values of 1 128+16+8+2= 134 The hexadecimal value of this number is- 86 The data transmitted would look something like- 8 5 The receiver computer then converts this into its binary value, which would be- 10 10 0101 Adding all the values of 1 128+32+4+1 = 165 As the sum of all the 1s in the data the receiver got is the same as the sum of 1s in the original data, an error is detected Echo Check With echo check, when data is sent to another device, this data is sent back again to the sender. The sender’s computer compares the two sets of data to check if any errors occurred during the transmission process. Though, this isn’t very reliable. If the two sets of data are different, it isn’t known whether the error occurred when sending the data in the first place, or if the error occurred when sending the data back for checking . No Error Detected : The data the sender sends- 10110110 The data the receiver receives- 10110110 The data sent back to the sender- 10110110 As the data that was sent back to the sender is the same as the data the sender originally sent, no error is detected No Error Detected : The data the sender wants to send- 10110110 The data receiver receives – 101 0110 The data that is sent back to the sender- 101 10 As the data that was sent back to the sender is not the same as the data the sender originally sent, an error is detected Thank You