Find the checksum byte for the following ASCII message Rolla
Find the checksum byte for the following ASCII message: \"Rolla\". Perform a check using your calculated checksum to ensure data integrity. You do not need to write the code but show your work for the calculations.
Solution
Checksum byte is calculated such that Sum of ASCII values of every character of message including checksum byte comes out to be 0 modulo 255. If not then data is manipulated otherwise data is correct
ASCII values: R = 82 ; o = 111 ; l = 108 ; l = 108 ; a = 97
Summing all these comes to 506
And 506 % 255 = 251
hence checksum byte is 255-251 = 4
Checking: now our message is Rolla with checksum byte 4
If you again calculated sum of their ASCII values, it comes out to be 251+ 4 = 255 = 0 (mod 255)
