user2122810
user2122810

Reputation: 93

finding the checksum

We have three 16-bit words:

0110011001100000
0101010101010101
1000111100001100

sum of the first two

0110011001100000
0101010101010101
-----------------
1011101110110101

adding the sum to the third

1000111100001100
1011101110110101
-------------------
10100101011000001

but the book says for that part that it's:

0100101011000010

It says that the last addition had overflow which was wrapped around but i don't understand.

After that it obtains the 1st complement:

1011010100111101

which becomes the checksum.

I don't understand the adding the sum to the third part. Can anyone explain?

Upvotes: 3

Views: 7369

Answers (1)

Jon Seigel
Jon Seigel

Reputation: 12401

Here's adding the sum to the third value.

Note the indentation. The overflow bit is the leftmost bit.

 1000111100001100
 1011101110110101
-----------------
10100101011000001
^

Add the overflow to the truncated result:

 0100101011000001
 0000000000000001
-----------------
 0100101011000010

Which is the desired result for that step.

Upvotes: 4

Related Questions