Basic Concept: Checksums

What they are. Why we use them. How we create and used them.

(filename: checksum.htm)

You are speaking to someone on the phone. You give them a friend's telephone number... say 1-555-123-1212

They write it down as "1-555-123-1231". Easily done.

In computing, most of the time, the channels we use are more reliable that human facilities. But sometimes the channel is susceptible to errors, or perhaps a human is in the chain somewhere.

Then we use checksums.

Suppose computer "pcAlice" was sending 1-555-123-1212 to computer "pcBob".

She might send the number, PLUS what she gets when she adds all the digits up. (1+5+5+... comes to 28, so she'd send "28" after sending the telephone number.

pcBob then looks at he has written down, which he thinks is what pcAlice sent... but it isn't! He wrote down "1-555-123-1231". Add those digits up, and you get 29. But! pcAlice said that her digits added up to 28.

Using checksums helps you catch errors

Further considerations...

That's a very crude example. Just for a start, 1-555-321-2121 would give the same result as 1-555-123-1212.

But my crude example shows you the basic idea. After that, all of the "extra bits" are just there to make it work better. For instance, to get different checksums from 1-555-321-2121 and 1-555-123-1212, you could add to your system. Before you added the digits, you would add 1 to the first, 2 to the second, 3 to the third, and so on.

There are even systems that give you a good chance of recovering the right number, if you discover from "checking the checksum" (!) that there was a problem.

Checksums are not limited to checks on the transmission of numbers. If you wanted to calculate a checksum to "abc" you could add 1+2+3.

This barely scratches the surface

The systems in use would fill at least one book, probably more. (ISBNs and UPCs both include a checksum, for instance.)

The thing to remember is this: A "data source" calculates, by some rule, a "checksum" to send along with some data that it is sending. The data receiver... be it a separate device, or merely another module in a single computer system... receives the data and the checksum, and independently calculates a checksum from the data it received... and then compares what it calculated with the checksum it received.

A final note: Notice the cleverness of the system: If there can be an error in the transmission of the data, there can be an error in the transmission of the checksum, right?

Not a problem! Whether the error is in the data or in the checksum, they still have a low chance of "matching", so the fact that there's been an error... somewhere... is still revealed!

Clever, the things the boffins have come up with, no?

A few words from the sponsors...

Please get in touch if you discover flaws in this page. Please mention the page's URL. (wywtk.com/bc/checksum.htm).

If you found this of interest, please mention in forums, give it a Facebook "like", Google "Plus", or whatever. If you want more of this stuff, help!? There's not much point in me writing these things, if no one feels they are of any use.

index sitemap
What's New at the Site Advanced search
Search tool (free) provided by FreeFind... whom I've used since 2002. Happy with it, obviously!

Unlike the clever Google search engine, this one merely looks for the words you type, so....
*    Spell them properly.
*    Don't bother with "How do I get rich?" That will merely return pages with "how", "do", "I"....

Please also note that I have three other sites, and that this search will not include them. They have their own search buttons.

My SheepdogSoftware.co.uk site, where you'll find my main homepage. It has links for other areas, such as education, programming, investing.

My SheepdogGuides.com site.

My site at Arunet.

How to email or write this page's editor, Tom Boyd. Please cite page's URL if you write.

Valid HTML 4.01 Transitional Page has been tested for compliance with INDUSTRY (not MS-only) standards, using the free, publicly accessible validator at validator.w3.org. Mostly passes.

AND passes... Valid CSS!

Why does this page cause a script to run? Because of the Google panels, and the code for the search button. Also, I have my web-traffic monitored for me by eXTReMe tracker. They offer a free tracker. If you want to try one, check out their site. Why do I mention the script? Be sure you know all you need to about spyware.

....... P a g e . . . E n d s .....