Types of programming language, translators and IDEs

Computer Science · Software. The idea in plain words, the rules to remember, the mistake to avoid and a worked example, written and checked by Mega Lecture.

Test this topic freeAll Computer Science topics

The idea

A high-level language, such as Python or Java, uses English-like words. It is easy to read, write and debug, and the same code can be used on different types of computer. A low-level language (machine code or assembly language) is close to the hardware. It is harder to write and only works on one type of processor, but it gives direct control of registers and memory locations.

A processor can only run machine code, so all other code needs a translator: an assembler, a compiler or an interpreter.

An IDE (integrated development environment) is software that helps a programmer to write, run and correct program code.

In simpler words

High-level languages like Python use English-like words. They are easy to read and work on many computers. Low-level languages are close to the hardware and harder to write. Computers only run machine code, so other code must be translated. A compiler translates the whole program first. An interpreter translates and runs one line at a time. An IDE helps programmers write code.

An everyday comparison

A compiler is like translating a whole book before anyone reads it; the finished translation can be read again and again without the translator. An interpreter is like a live interpreter at a meeting, translating each sentence as it is spoken and stopping when something makes no sense. The comparison stops working because a compiler lists all errors together after trying the whole program.

Rules to remember

Common mistake

Students often say that a low-level language needs no translator. Only machine code needs none: assembly language must be translated by an assembler.

In the exam

Compare high-level and low-level languages using readability, portability and hardware control. Name the translator for each: assembler for assembly, compiler or interpreter for high-level. Compare compiler and interpreter point by point: whole program or line by line, all errors together or stops at first error, executable file or none. Say which suits development and which suits a finished product. List IDE features such as error diagnostics.

Worked example

A student is still writing and testing a program. A company has finished a game and wants to sell it. Which translator suits each of them?

  1. The student will make many errors, so needs each error shown at the line where it happens: an interpreter stops there.
  2. With an interpreter the student can correct that line and run the code again without translating the whole program first.
  3. The company wants customers to run the game without a translator and without seeing the source code.
  4. A compiler produces an executable file that does both of these things.

Answer: The student should use an interpreter. The company should use a compiler.

Ask about this

Type what you are stuck on. The helper finds the explanation, worked examples and the notes to read, free and instant.

Keep going

← Types of software and interruptsThe internet and the world wide web →Take a Computer Science test