Skip to content

Programming languages and translators

GCSE Computer Science revision notes, key terms and practice questions.

In short

High-level languages, such as Python, Java and C#, use English-like keywords. They are easier to write, read and debug, and they are portable: the same code can run on different types of processor. They must be translated into machine code.

For GCSE students in Years 10 and 11, on the AQA, OCR, Edexcel and Eduqas Computer Science courses.

High-level and low-level languages

  • High-level languages, such as Python, Java and C#, use English-like keywords. They are easier to write, read and debug, and they are portable: the same code can run on different types of processor. They must be translated into machine code.
  • Low-level languages are close to the hardware. Machine code is the binary instructions the CPU runs directly. Assembly language uses short mnemonics, such as ADD or LDA, one for each machine code instruction.
  • Low-level code gives direct control of the hardware and can be very fast and small, which suits embedded systems. But it is hard to write, and it only works on one type of processor.

Translators

  • A compiler translates the whole program into machine code in one go, making an executable file. It reports all the errors at the end. The executable runs quickly without the compiler, and the source code doesn't need to be shared.
  • An interpreter translates and runs the program one line at a time. It stops at the first error, which helps debugging, but the program runs more slowly and the interpreter is needed every time it runs.
  • An assembler translates assembly language into machine code.

The IDE

  • An integrated development environment (IDE) is software for writing programs. It usually has an editor (with syntax highlighting and automatic indentation), error diagnostics, a translator and a run-time environment.
  • Debugging tools include breakpoints (pausing the program at a chosen line), stepping through the code line by line, and watching the values of variables.

Key terms

High-level language
A programming language with English-like keywords, such as Python.
Low-level language
A language close to the hardware: machine code or assembly language.
Machine code
Binary instructions that the CPU can run directly.
Assembly language
A low-level language that uses short mnemonics, such as ADD.
Compiler
A translator that converts a whole program into machine code in one go.
Interpreter
A translator that translates and runs a program one line at a time.
Assembler
A translator that converts assembly language into machine code.
IDE
Integrated development environment: software with tools for writing and testing programs.
Breakpoint
A point where a program pauses so the programmer can inspect it.

Quick questions on Programming languages and translators

Which type of language does the CPU run directly?
Machine code: Everything else has to be translated into machine code.
What does a compiler do?
Translates the whole program into machine code in one go: It produces an executable file.
What does an interpreter do?
Translates and runs a program one line at a time: It stops at the first error.
What does an assembler do?
Translates assembly language into machine code: Each mnemonic becomes one machine code instruction.
Which of these is an advantage of a high-level language?
It is easier to read, write and debug: Its keywords are like English.
Why might a programmer use assembly language?
For direct control of the hardware and very efficient code: It suits small embedded systems.
Why is an interpreter useful while a program is being developed?
It stops at the first error, which makes debugging easier: You can see exactly where the problem is.
Which translator produces an executable file?
A compiler: The executable runs without the compiler.

Programming languages and translators: questions and answers

What is a breakpoint?
A point where the program pauses so you can inspect the variables. It is a debugging tool in an IDE.
What does syntax highlighting do in an IDE?
Colours the code to make it easier to read and spot errors. Keywords, strings and comments appear in different colours.
What is assembly language?
A low-level language using mnemonics such as ADD. It is one step up from machine code.

Practise Programming languages and translators: 12 questions

Download these notes as a PDF

Previous topic: Systems software and operating systemsNext topic: CPU architecture and the fetch–execute cycle

More in Computer systems

LycoLearn is still loading…

This can take a little longer on a busy school or home network. If nothing happens, try refreshing the page.

LycoLearn didn’t load properly

Part of it didn’t arrive. Try refreshing the page in a minute, or open LycoLearn in another browser.