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

Untitled

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.

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:

Untitled

First, we divide it into smaller sections:

Untitled

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:

Untitled

So, the sender does the addition:

Untitled

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

Untitled

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

Untitled

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

Untitled

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

Untitled