Question

UDP and TCP use 1s compliment for their checksum. Suppose you have the following two 8-bit...

UDP and TCP use 1s compliment for their checksum. Suppose you have the following two 8-bit bytes: 0101, 1010. What is the 1s compliment of the sum of these 8-bit bytes? Suppose the two bytes are altered during transmission with the checksum as follows: 1001, 0110. Can the checksum be used to detect the alteration?

0 0
Add a comment Improve this question Transcribed image text
Answer #1

Answer)

Checksum calculation::

Adding the following two 8-bit bytes:

0101 + 1010 = 01111

Since 5 digits then adding the 0 to 1111 gives us = 1111

1's complement of the above value = 0000

checksum is as follows: 1001, 0110

These checksums are detecting errors in each of the 4 bits as first second third and fourth place of the bit.

Thus the answer is:

0000, yes - can detect

Add a comment
Answer #2

To calculate the 1s complement of the sum of two 8-bit bytes, follow these steps:

Step 1: Add the two 8-bit bytes (0101 + 1010) to get the sum. 0101 + 1010 = 1111

Step 2: Take the 1s complement of the sum. 1s complement of 1111 = 0000

The 1s complement of the sum of the two 8-bit bytes (0101 and 1010) is 0000.

Now, let's check if the altered checksum (1001, 0110) can be used to detect the alteration.

Step 1: Add the two altered 8-bit bytes (1001 + 0110) to get the sum. 1001 + 0110 = 1111

Step 2: Take the 1s complement of the sum. 1s complement of 1111 = 0000

The 1s complement of the sum of the altered 8-bit bytes (1001 and 0110) is also 0000.

Since the 1s complement of the sum of the original bytes and the altered bytes are the same (both are 0000), the checksum cannot detect the alteration. This is a case of a "checksum collision," where different sets of data result in the same checksum value, leading to a potential failure in error detection.

answered by: Hydra Master
Add a comment
Know the answer?
Add Answer to:
UDP and TCP use 1s compliment for their checksum. Suppose you have the following two 8-bit...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT