Checksum: Difference between revisions

before the section was named modular sum, however the definition is describing sum complement
m (Reverted edits by 197.155.233.218 (talk) to last version by GoingBatty)
(before the section was named modular sum, however the definition is describing sum complement)
With this checksum, any transmission error which flips a single bit of the message, or an odd number of bits, will be detected as an incorrect checksum. However, an error which affects two bits will not be detected if those bits lie at the same position in two distinct words. Also swapping of two or more words will not be detected. If the affected bits are independently chosen at random, the probability of a two-bit error being undetected is 1/''n''.
 
===ModularSum sumcomplement===
 
A variant of the previous algorithm is to add all the "words" as unsigned binary numbers, discarding any overflow bits, and append the [[two's complement]] of the total as the checksum. To validate a message, the receiver adds all the words in the same manner, including the checksum; if the result is not a word full of zeros, an error must have occurred. This variant too detects any single-bit error, but the promodular sum is used in [[J1708|SAE J1708]].<ref>{{cite web|url=http://www.kvaser.com/zh/about-can/related-protocols-and-standards/50.html |title=SAE J1708 |publisher=Kvaser.com |archiveurl=https://web.archive.org/web/20131211152639/http://www.kvaser.com/zh/about-can/related-protocols-and-standards/50.html |archivedate={{date|2013-12-11}} }}</ref>
Anonymous user