SHARE
SPREAD
HELP

The Tradition of Sharing

Help your friends and juniors by posting answers to the questions that you know. Also post questions that are not available.


To start with, Sr2Jr’s first step is to reduce the expenses related to education. To achieve this goal Sr2Jr organized the textbook’s question and answers. Sr2Jr is community based and need your support to fill the question and answers. The question and answers posted will be available free of cost to all.

 

#
Authors:
James F. Kurose, Keith W. Ross
Chapter:
Transport Layer
Exercise:
Problems
Question:4 | ISBN:9780132856201 | Edition: 6

Question

a. Suppose you have the following 2 bytes: 01011100 and 01100101. What is the 1s complement of the sum of these 2 bytes?

b. Suppose you have the following 2 bytes: 11011010 and 01100101. What is the 1s complement of the sum of these 2 bytes?

c. For the bytes in part (a), give an example where one bit is flipped in each of the 2 bytes and yet the 1s complement doesn’t change.

TextbookTextbookTextbookTextbookTextbookTextbookTextbookTextbookTextbookTextbookTextbookTextbookTextbookTextbookTextbookTextbookTextbook

Answer

(a)

Consider 2 bytes: 01011100 and 01100101

Adding the two bytes:

       01011100

    + 01100101

       11000001

The 1s complement of the sum of these 2 bytes:11000001

b)

Consider 2 bytes: 11011010 and 01100101

             11011010

          +01100101

            00111111

The 1s complement of the sum of these 2 bytes: 00111111

(c)

                 11011100

              +11100101

                11000001     <-- Same 1s complement answer

Running checksums at multiple levels throughout the network is not a waste. Because flipped bits can be so easily missed, this redundancy is the best chance of catching errors.

0 0

Discussions

Powered by Lun

Dr siraj rathore said that: Betw Lun Phuy Chaur.

Post the discussion to improve the above solution.