Suppose you have the following three 8-bit bytes: 01010011, 01100110, 01110101.
a) What is the 1s complement sum of these bytes?
b) Why does UDP take the 1s compliment of the sum?
c) How does the receiver detect errors?
d) Is it possible a 1-bit error will go undetected? e) Is it possible a 2-bit error will go undetected?
Answer:
We have given 8-bit bytes: 01010011, 01100110, 01110101
a) Sum of these bytes:
01010011
+ 01100110
------------------------
10111001 ---------------> add this with remaining 8-bit byte 01110101 10111001 + 01110101 = 00101110
-------------------------
Now 1's complement of 00101110 ( either take the reverse or by adding 1 to 00101110) = 11010001
b. The checksum of UDP is given by the 1's complement of the sum but not the sum
c. At the receiver end, if the data received has all one's ( 1's) then it will be errorless. If the received data contains any number of zeros (0's) then the data has an error.
d. No, it is impossible that a 1-bit error will go undetected. 1-bit errors are detected by taking 1's complement.
e. Yes, it is possible because if 2 bits are different and sum and checksum are the same ( it is like 2 bits are not different).
RATE THE ANSWER IF HELPS ELSE LET ME KNOW YOUR ALL DOUBTS. THANK YOU!!
Suppose you have the following three 8-bit bytes: 01010011, 01100110, 01110101. a) What is the 1s...