In: Computer Science
Suppose you have the following two data sequences: 1101110101100110, and 0101010101010010. What is the value you should put in the checksum field if those are the only data you have?
How To Calculate Checksum :
1) Do the binary addition for all data.
2) Wrap up it there is any carry.
3) Find the 1's complement of the above result.
1 1 1 1 1 1 1 1
1 | 1 | 0 | 1 | 1 | 1 | 0 | 1 | 0 | 1 | 1 | 0 | 0 | 1 | 1 | 0 |
0 | 1 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 1 | 0 |
+ --------------------------------------------------------------------------------------------------------------------
0 | 0 | 1 | 1 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 1 | 1 | 0 | 0 | 0 |
^
1--------------------------------------------------------------------------------------------------------------| 1
-----------------------------------------------------------------------------------------------------
0 | 0 | 1 | 1 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 1 | 1 | 0 | 0 | 1 |
Now, we have to find its complement. That means, change 1 to 0 and 0 to 1
1 | 1 | 0 | 0 | 1 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 1 | 1 | 0 |
This is the checksum correct option is 3.
I have tried to explain it in very simple language and I hope that I have answered your question satisfactorily. Leave doubts in the comment section if any.