Where things go wrong in a computer system — from a typo to a corrupted transmission — and the techniques used to catch and prevent those errors.
Sources of errors:
| Category | Examples |
|---|---|
| Human error | GIGO (Garbage In, Garbage Out) — incorrect input leads to incorrect output; simple input mistakes (typos, wrong data entered) |
| Arithmetic errors | Rounding errors (small inaccuracies from rounding numbers), truncating (cutting off digits instead of rounding), fixed number of bits (a value too large for the allocated bits causes an overflow error — see 11.4.2) |
| Data transmission errors | Caused by physical issues like damaged/faulty cables disrupting the signal |
| Programming errors | Undetected logical errors — the program runs without crashing but produces incorrect results because the logic itself is flawed |
Solutions for errors — verification vs validation is a critical distinction:
Techniques for input that reduce human error at the source:
Types of data validation checks (also see 11.4.8, 11.4.14):
| Check | What it verifies |
|---|---|
| Presence check | A required field has not been left empty |
| Range check | A value falls within an acceptable minimum and maximum |
| Uniqueness check | The value doesn't already exist elsewhere (e.g. no duplicate ID numbers) |
| Length check | The data has an acceptable number of characters |
| Type check | The data is of the expected data type (e.g. a number field doesn't contain letters) |
| Logical check | The value makes logical sense in context, e.g. an end date must be after a start date |
| Check digit | An extra digit calculated from the other digits, used to detect input errors, e.g. in barcodes and ID numbers |
| Checksum | A calculated value used to verify that a larger block of data hasn't been altered/corrupted |
Data transmission check — parity: an extra bit added to a group of bits so the total number of 1-bits is always even (or always odd); if the parity doesn't match on arrival, an error is detected during transmission.
💡 Exam Tip
Verification and validation are constantly confused by students — remember: Verification checks data was captured/copied correctly; Validation checks data is reasonable according to rules. Neither guarantees the data is 100% true.