StudyVault
Home Unit Overview Exam Technique Revision Techniques ← Previous Lesson Next Lesson →

← Back to Dashboard

Overlay:
0:00 / 0:00 Narration generated using AI text-to-speech.

Validation, Verification and High-Level Languages

Data Quality in Programs

A program is only as good as the data it processes. If a user accidentally types their age as 300, or pastes an email address into a phone number field, the program can produce meaningless output or crash entirely. Two techniques guard against bad data: validation and verification. Students often confuse these two — understanding the distinction is worth marks every exam series.

Key Fact

Validation checks that data is sensible — within expected bounds, correct format, the right type. A program does this automatically. Verification checks that data was entered correctly — that what the user typed matches what they intended. A human or a double-entry system does this.

Types of Validation Check

There are six main validation checks you need to know. Each one catches a different kind of invalid data:

Validation checkWhat it testsExample
Range checkValue falls within an allowed minimum and maximumAge must be between 0 and 120
Type checkData is of the correct data typePhone number field must contain only digits
Presence checkA required field has not been left blankName field must not be empty
Length checkInput is not too short or too longPassword must be 8–20 characters
Format checkInput matches a required pattern or structurePostcode must match the pattern XX00 0XX
Check digitA calculated digit confirms the rest of the number is correctISBNs and barcodes use check digits

Below is a pseudocode routine that validates a student’s percentage score. It combines a type check (implicit in reading the score as an integer) and a range check:

INPUT score
WHILE score < 0 OR score > 100
  OUTPUT “Score must be between 0 and 100. Try again.”
  INPUT score
END WHILE
OUTPUT “Score accepted: ” & score

The WHILE loop keeps prompting until the score is valid. A single IF would only check once and could still accept invalid data on a subsequent entry.

Verification

Verification is about catching transcription errors — mistakes made while copying or typing data. A validated age of 23 might still be wrong if the user meant to type 32. There are two common verification techniques:

Double entry: The user types the same data twice. The program compares both entries and only accepts them if they match. This is common for passwords and email addresses on registration forms.

Proofreading: A human reads through entered data to check for errors. This is used in contexts where computer checking is impractical, such as checking a handwritten address against a database record.

Key Fact

Validation cannot catch all errors. If a student’s real age is 15 but they type 16, a range check (0–120) accepts 16 because it is within range and the correct type. Validation can only reject data that is clearly outside the rules — not data that is plausible but incorrect. Verification addresses this gap.

High-Level and Low-Level Languages

Every program written in a language such as Python must eventually be translated into the binary instructions that the processor understands. The level of a programming language describes how close it is to human language versus machine language.

A high-level language (such as Python, Java or C++) is designed to be readable by people. It hides the underlying hardware detail — you do not need to know how the processor registers work to write a Python loop. High-level languages are portable: the same Python code can run on Windows, macOS and Linux with little or no modification.

A low-level language is closer to the hardware. Assembly language uses short mnemonic codes (like MOV, ADD, JMP) for individual processor instructions. Machine code is the raw binary (0s and 1s) that the processor executes directly. Low-level languages give the programmer direct control over memory and processor behaviour — useful for device drivers, operating systems and embedded systems — but they are harder to write and not portable between different processor architectures.

The table below summarises the key differences:

FeatureHigh-level languageLow-level language
ReadabilityEasy — resembles EnglishHard — cryptic mnemonics or binary
PortabilityRuns on many platforms with little changeTied to a specific processor architecture
Control over hardwareAbstract — hardware details are hiddenDirect control over memory and registers
Translation neededYes (compiler or interpreter)Assembler for assembly language; machine code is already binary
Typical useWeb apps, data processing, gamesDevice drivers, OS kernels, embedded systems

To run on a processor, every high-level program must be translated. A compiler translates the whole program at once; an interpreter translates and runs it line by line. An assembler translates assembly language into machine code. These translators are covered in detail in the next lesson.

Practice Questions

Test yourself on this lesson. Pick a question, write your answer, then get it marked.

AI feedback
AI feedback is guidance, not a final exam mark. If you disagree, your teacher's view is always the tie-breaker.
← Back to unit
Video

© 2026 StudyVault · About · FAQ · Copyright & IP · Privacy · Disclaimers

StudyVault Education Ltd · registered in England and Wales, company no. 17490559 · 71–75 Shelton Street, London WC2H 9JQ