Skip to topic
    ← Back to course topics

    Languages — OCR GCSE Computer Science

    Teaching note checked against the official specification.

    Test yourself on Languages with OCR GCSE practice questions.

    Start free

    A week of Premium from your first lesson · Then the free plan continues · No card, no charge

    Languages explained

    Languages covers 3 specification points, including Characteristics and purpose of different… and The purpose of translators.

    Read the full explanation

    Open a point below for its explanation and revision guidance.

    Characteristics and purpose of different levels of programming language High-level languages Low-level languages

    Programming languages sit on a spectrum from high-level to low-level. High-level languages such as Python or Java use English-like keywords, abstract away hardware details, and are portable across machines, which speeds up development and maintenance. Low-level languages are closer to the processor: machine code is binary instructions executed directly, while assembly language uses mnemonics and is specific to one instruction set. Low-level code can be very efficient and gives precise control over memory and registers, but it is harder to read, write and debug. The purpose of each level is to balance human productivity against machine control and performance. For example, a web app is usually written in a high-level language, whereas a device driver or embedded routine may be written in assembly to meet timing or size constraints.

    The purpose of translators

    A translator converts source code written by a programmer into a form that a computer can execute. The three main types are assemblers, compilers and interpreters. An assembler translates assembly language mnemonics into machine code. A compiler translates a whole high-level program into machine code before it runs, producing an executable file; this can allow optimisation and means the user does not need the source code or translator at run time. An interpreter translates and executes source code line by line, which helps with debugging because errors are reported as they are encountered, but it can be slower at run time. The purpose of any translator is to bridge the gap between human-readable code and the binary instructions a processor can carry out, while also detecting syntax errors.

    The characteristics of a compiler and an interpreter

    A compiler translates a whole high-level program into machine code before any of it runs, producing an executable file that can be distributed and run later without the translator. An interpreter translates and executes the source one statement at a time, so it stops at the first error it meets and reports it immediately. Compilers therefore give fast execution but slow development, because each change needs a full recompile; interpreters give slower execution but allow quick testing and easier debugging. For example, a Python interpreter runs a script line by line, while a C compiler builds an .exe. A student should compare both tools on speed of execution, speed of development, error reporting and portability.

    Your focus

    1. Describe the characteristics that distinguish high-level languages from low-level languages.
    2. Explain the purpose of using a high-level language or a low-level language in a given context.
    3. Compare high-level and low-level languages in terms of readability, portability, hardware control and performance.
    Show all 9 objectives
    1. State the purpose of a translator in the program development process.
    2. Describe the roles of assemblers, compilers and interpreters.
    3. Explain how the choice of translator can affect debugging, execution and distribution of a program.
    4. Describe how a compiler translates a whole program before execution and how an interpreter translates and executes one statement at a time.
    5. Compare compiler and interpreter characteristics, including execution speed, development speed, error reporting and portability.
    6. Select and justify a suitable translator for a given development scenario.

    Languages exam tips

    Marking Points
    • High-level languages use English-like keywords and abstractions such as variables, loops and functions, making programs easier for humans to read, write and maintain.
    • High-level languages are generally portable because a translator or virtual machine adapts the same source code to different hardware, reducing the need to rewrite programs.
    • Low-level languages are closely tied to a specific processor architecture and instruction set, so they are not portable between different machines without rewriting.
    • Machine code consists of binary instructions that the CPU can execute directly, whereas assembly language uses mnemonics that must be translated into machine code.
    • Low-level languages allow precise control over hardware resources such as registers and memory addresses, which can improve execution speed or reduce program size.
    • The purpose of choosing a level is to trade human productivity and portability against machine control and performance for a given task.
    • Translators convert source code into machine code or an intermediate form that can be executed by a computer.
    • An assembler translates assembly language into machine code, matching mnemonics to the processor instruction set.
    • A compiler translates an entire high-level program in one go and produces an executable file that can be run without the translator present.
    • An interpreter translates and executes source code one statement at a time, which can make debugging easier because errors are reported close to where they occur.
    • Translators detect and report syntax errors in source code, helping programmers correct mistakes before or during execution.
    • The choice of translator affects factors such as execution speed, ease of debugging and whether source code must be distributed.
    • A compiler translates the entire source program into machine code in one go, producing an executable file that can be run without the translator present.
    • An interpreter translates and executes the source program one statement at a time, so translation and execution are interleaved.
    • A compiler reports all errors together after compilation, whereas an interpreter stops and reports the first error it encounters.
    • Compiled code generally executes faster than interpreted code because translation has already happened.
    • Interpreted code is generally quicker to develop and test because a program can be run immediately after editing, without a compile step.
    • A compiled executable is platform-specific and must be recompiled for a different processor or operating system, while interpreted source can often run on any machine with a suitable interpreter.
    Examiner Tips
    • 💡When comparing levels, refer explicitly to readability, portability, hardware control and performance rather than just saying one is easier.
    • 💡Use a named example such as Python for a high-level language and assembly for a low-level language to make your answer concrete.
    • 💡If asked for a purpose, link the level to a scenario such as rapid software development or embedded device control, and justify your choice.
    • 💡Name the translator type and state what it translates from and to, for example assembly language to machine code.
    • 💡When discussing debugging, link interpreters to line-by-line error reporting and compilers to error reports after translating the whole program.
    • 💡Use a scenario such as developing a program or distributing software to justify why one translator might be preferred over another.
    • 💡Use a comparison table with rows for translation method, execution speed, development speed and error reporting to keep the answer structured.
    • 💡Name a concrete example, such as a C compiler producing an executable or a Python interpreter running a script, to make each characteristic clear.
    • 💡When asked to recommend one tool, justify the choice using the context given, for example fast execution for a released game versus quick testing during development.
    Common Mistakes
    • Error: saying that high-level languages are always faster than low-level languages. Correction: low-level code can be more efficient because it maps closely to hardware, although modern compilers often optimise high-level code well.
    • Error: treating assembly language as portable across all processors. Correction: assembly language is specific to one instruction set and must be rewritten for a different processor family.
    • Error: describing machine code as readable text. Correction: machine code is binary and is executed directly by the CPU, while assembly language uses human-readable mnemonics.
    • Error: saying a compiler runs the program line by line. Correction: a compiler translates the whole program before execution, whereas an interpreter translates and executes line by line.
    • Error: confusing an assembler with a compiler. Correction: an assembler translates assembly language into machine code, while a compiler translates a high-level language into machine code.
    • Error: claiming an interpreter produces a standalone executable file. Correction: an interpreter typically executes source code directly and does not usually create a separate executable.
    • Saying a compiler 'runs' the program: the compiler only translates; the resulting executable is run separately. Correction: describe compilation as translation into machine code, then execution of that machine code.
    • Claiming an interpreter translates the whole program first: it translates and executes statement by statement. Correction: link each translated statement to its immediate execution.
    • Stating that compiled programs never have errors: compilation catches syntax errors, but logic errors can remain. Correction: distinguish syntax errors found at translation from logic errors found by testing.