I was always intrigued by
checksums. Basically, a checksum allows anyone to compute if the transmitted data is correct -- without needing to contact anyone. In other words, checksums give numbers the power of built-in error computation.
Let's first take a look at a simple example of a UPC checksum (in this example, it is better known as a check digit). Suppose the UPC number is 036000241457. To compute whether this is indeed a valid UPC code, we start by adding every second number, starting with the 1
st. In other words, take 0+6+0+2+1+5=14. Next, multiply it by 3 = 42. Then, add every other digit (with the exception of the last) to the number we just got: 42+3+0+0+4+4=53. Finally, take the number and divide it by 10 -- the remainder of the division should be the last number (check digit) of the UPC code. In this case it was 7.
That wasn't too difficult was it? In most cases computers are the ones who do this lengthy task, and take fractions of a second to compute it.
Indeed, there are many more numbers that are used by us every single day which contain these marvelous algorithms. From credit cards, to ISBN numbers, and even
check routing numbers, checksums are everywhere. That is why I was so surprised to find that phone numbers don't have checksums.