Wednesday, November 13, 2013

Chapter 3 HW

P3. The sum of the first two numbers is 01010101
                                                            01110000
                                                          =11000101
The after adding the 3rd number          +11001100
                                                             10010001

So 1's compliment will then be 01101110. UDP takes 1's compliment over the sum because at the recieving end, all the bits should be zero when there are no errors. To detect errors the check sum looks for zeros. A checksum of 1111 means there is no error in the packet. 1-bit errors can't be undetected but in some cases a 2-bit error can be undetected.

P4.a)     00110100
           +01101001
             10011101 -- So 1's compliment is 01100010

b)     11011010
      +01100101
        00111111 -- So 1's compliment is 11000000 

c)     If the first 0 is changed to 1 and the second byte (1) is changed to 0, then 1's compliment stays the same and the error is undetected.    
                                                           11110101
                                                         +00101001
                                                           11100000
       
P5. The UDP checksum cannot be certain that there are no errors. Checksum is designed to look for single errors and can be easily thrown off or tricked by 2 or more errors. For example. The binary of 2 and 5 are 010 and 101. But if 2 errors occurred where the binary was changed to 011 and 100, which is 3 and 4, the total would still equal 7. In this case the error goes undetected although the packet was changed. If only one of the binary's changed then the error would be easily detected.

P6.






















No comments:

Post a Comment