As said before, we create the checksum in the sender side, and then we validate the checksum in the receiver side.


We divide the block of data into sections of n bits. Then we add all the blocks. We will get n bits and, after doing the complement, the Checksum. We will add this checksum as the last section. The receiver recovers the sections, the checksum, and checks the checksum is equal to the sum of the other sections.
Let’s see an example. We will use as data:

First, we divide it into smaller sections:

In this example, sections are of 8 bits. The leftmost section is section 1 until the rightmost one which is section 4.
Now, the sender places all the blocks in order to perform the addition:

So, the sender does the addition:

Finally, we perform the 1’s complement. That is, changing 1s to 0s and 0s to 1s:

This 1’s complement is our checksum. We append it to the end of the message:

This is what we send to the receiver. What does the receiver does?

Let’s assume the receiver is receiving the same message as in the previous example:
