How to calculate the Internet checksum?

internet-checksum-example
Let's say we have two segments/messages that need to be sent. We need to calculate the sum then the checksum of the two messages.
Here are some rules to follow:
1+1 = 10   , 0+0 = 0
1+0 = 1
CARRY+0+0 = CARRY

CARRY+0+1 = CARRY+0
CARRY+1+1 = CARRY+1

10101001
00111001
--------
11100010

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *