Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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?

like image 934
user2122810 Avatar asked Jul 03 '26 02:07

user2122810


1 Answers

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.

like image 102
Jon Seigel Avatar answered Jul 05 '26 16:07

Jon Seigel



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!