A sender needs to send the two data items 0x3456 and 0xABCC: Answer the following: a)Find the checksum at the sender site. b)Find the checksum at the receiver site if there is no error. c)Find the checksum at the receiver site if the second data item is changed to 0xABCE.
Answers
Answer:
(a) At sender side:
3 4 5 6
ABCC
0 2 BC
EEEE
Sum 1 D1CC
1
Total Sum=D1CD
Complement=2E32
(b) At receiver side:
3 4 5 6
ABCC
0 2 BC
EEEE
2E 3 2
Sum 1 FFFE
1
FFFF (No error - 0000)
(c) if 0xABCC change to 0xABCE
At Receiver side
3 4 5 6
ABCE
0 2 BC
EEEE
2E 3 2
Sum 1 0 0 0 0
1
0 0 0 1
Comp. FFFE (Error)
(d) if oxABCC change to 0xABCE and 0x02BC to 0x2BA
3 4 5 6
ABCE
0 2 BA
EEEE
2E 3 2
Sum 1 FFFE
1
FFFF
Comp. 0 0 0 0 (No Error)
Explanation:
data items given in hexadecimal. So, convert it into binary and then add all these binary codes.if there is a carry then add it. finally do the 1's complement of the result after addition and it will be called 16-bit checksum at sender side. append it to the data items and send it to receiver. if at receiver after adding these codes,if answer is zero then there is no error and checksum will be same at receiver.