Hands on Activity
From www.csunplugged.org – Error detection and correction: The world is a complicated and imperfect place, and errors can occur whenever information is stored or transmitted. Data stored on hard disks, DVDs and flash memory can be changed if there is a tiny fault in the device (and these occur regularly!). Information received over networks can be corrupted if there’s interference on the line or a faulty component in the system. Even scanning information from barcodes and QR codes is a form of information transmission, and small errors such as dirt or scratches on the code can change the information. Yet we rely on data so much that there could be serious implications from even a single digit error in a student’s grade, or a small change to a payment, or an incorrect reading in a medical scan. Error detection techniques add extra information to data to determine when errors have occurred. The extra information might be an extra “check digit” such as the last digit of a credit card number or barcode number on a product, or extra binary digits (bits) in data stored on a computer.
Not only can most digital systems detect errors, but many can correct them as well, back to what the data should have been. Error correction can appear to be magic, since it involves being able to put data back to how it was originally, even when you don’t know what the original data was. In fact, the first lesson plan presents a technique called “parity error correction” as a magic trick that most audiences find intriguing. In the trick the demonstrator is “magically” able to figure which one out of dozens of cards has been turned over, using the same kind of method that computers use to figure out when and where an error has occurred in a piece of data.
A related technique is used on the barcodes printed on products to check that they are scanned correctly at a checkout; the last digit in the product code is based on a mathematical combination of all the other digits, and can easily be calculated from them. If the calculation comes up with a different value for the last digit, it’s a warning that one of the digits is wrong, in which case the scanner gives a warning, and the operator might have to scan the item again, or type in the number, or look it up some other way.
The lessons in this unit show how errors can be detected, and in same cases, corrected to restore the original data. It also enables students to explore how we use some relatively simple ideas to make our digital systems so reliable that people using them don’t realize that this is all happening underneath the surface!