thanks for this article @Ashish. I have a question: what happens if we attach the checksum value in our data and during transmission, the checksum value itself is altered. Then how do we verify if data is corrupted or checksum is corrupted?
If the checksum is corrupted then the data is corrupted. Because your message is not the data itself, but the "data+checksum" if the check fails you retransmit till the sender and receiver have the same checksums. The Wikipedia article on CRC explains in greater detail.
thanks for this article @Ashish. I have a question: what happens if we attach the checksum value in our data and during transmission, the checksum value itself is altered. Then how do we verify if data is corrupted or checksum is corrupted?
If the checksum is corrupted then the data is corrupted. Because your message is not the data itself, but the "data+checksum" if the check fails you retransmit till the sender and receiver have the same checksums. The Wikipedia article on CRC explains in greater detail.
thanks for the reply @Nishant