Levels of Programming Languages Flashcards

Card 1 of 9

All 9 cards in this deck

What is a high-level programming language?

A programming language written in a form close to human language, which must be translated into machine code by a compiler or interpreter before it can run.

What is a low-level programming language?

Machine code or assembly language — written for one specific type of processor and giving direct control of the hardware and memory.

Give two reasons why some programs are written in a low-level language.

Direct control of hardware/memory; faster execution time.
Also: machine code does not need translating, and the code can be optimised to use less memory.

Give two reasons why a programmer would choose a high-level language.

It is easier and quicker to write, read and maintain; it is portable, so the same source code can be translated to run on different types of computer.

True or false? Machine code must be translated before a computer can run it.

False. Machine code does not need to be translated / compiled / interpreted — the processor executes it directly.

Give two disadvantages of writing a program in a low-level language.

Any two of: the code is difficult to read, write and debug; it is not portable, as it normally runs on only one type of processor; it takes longer to write.

Give two disadvantages of a high-level language compared with a low-level language.

Any two of: it must be translated before it can run; the program usually runs more slowly; it tends to use memory less efficiently; it gives less direct control of the hardware.

How many machine code instructions does one high-level statement usually stand for, compared with one assembly language instruction?

One high-level statement usually stands for many machine code instructions. One assembly language instruction usually stands for just one machine code instruction.

Which level of language requires the programmer to understand how the processor is built and how it handles memory: high-level or low-level?

Low-level. A high-level programmer does not need to know about the processor's internal structure or how memory is managed.