CSFG
English Deutsch Beta Español Beta język polski (2.6.0)
Chapters Curriculum Guides Appendices

9. Coding - Error control

Introduction

This chapter is about guarding against errors in data in its many different forms: data stored on a hard drive, CD, floppy disk or solid state drive (such as that inside a cellphone, camera, or MP3 player); data currently in RAM (particularly on servers where the data correctness is critical); data going between the RAM and hard drive or between an external hard drive and the internal hard drive; data currently being processed in the processor; or data going over a wired or wireless network such as from your computer to a server on the other side of the world. It even includes data such as the barcodes printed on products or the number on your credit card.

If we don't detect that data has been changed by some physical problem (such as small scratch on a CD, or a failing circuit in a flash drive), the information will just be used with incorrect values. A very poorly written banking system could potentially result in your bank balance being changed if just one of the bits in a number was changed by a cosmic ray affecting a value in the computer's memory! If the barcode on the packet of chips you buy from the shop is scanned incorrectly, you might be charged for shampoo instead. If you transfer a music file from your laptop to your MP3 player and a few of the bits were transferred incorrectly, the MP3 player might play annoying glitches in the music. Error control codes guard against all these things, so that (most of the time) things just work without you having to worry about such errors.

Next:
What's the big picture?

Chapter sections

  • 9.1. What's the big picture?
  • 9.2. The parity magic trick
  • 9.3. Check digits on barcodes and other numbers
  • 9.4. QR codes
  • 9.5. The whole story!
  • 9.6. Further reading

Looking for something for primary schools? Check out CS Unplugged.

The Computer Science Field Guide is an online interactive resource for high school students learning about computer science.

Useful Links

  • About
  • Chapters
  • Interactives
  • Curriculum Guides

Community

  • Twitter
  • YouTube
  • GitHub

Help

  • Search
  • Glossary
  • Feedback

Switch to teacher mode

English | Deutsch | Español | język polski (2.6.0)

The Computer Science Field Guide material is open source on GitHub, and this website's content is shared under a Creative Commons Attribution-ShareAlike 4.0 International license. The Computer Science Field Guide is a project by the Computer Science Education Research Group at the University of Canterbury, New Zealand. Icons provided generously by icons8.

3.13.0 - 4d565b3cec214f3eac3f597ee04ac5e0b613e65b

This definition is not available in English, sorry!