Chapter 29 – Classification of programming languages and translation

AQA A level Computer Science
Teaching and Learning Resources
Chapter 29 – Classification of programming languages and
translation
TASK QUESTIONS (WITH ANSWERS)
1
Under what circumstances would you compile a high-level computer program?
You would use a compiler when all the code has been written and you are ready to
distribute the finished product.
2
Explain the benefits of using a high-level language compared to an assembly language.
High-level languages use programming structures that reduce the amount of code you need
to write. They also use full words such as FOR and PRINT, which are similar to normal
language, that make programs easier to follow.
3
Explain the differences between a compiler and an interpreter.
A compiler translates all the source code in one operation. This gives a complete machine
code version of the program but the compilation process can take a long time.
An interpreter translates each line of a program as and when it is needed.
4
Why are machine code and assembly languages said to be machine-oriented?
Machine code instructions are specific to the instruction set of the computer they are
written on.
5
Explain why there are so many different high-level languages.
High-level languages are ‘problem-oriented’. That is, they are developed to solve a
particular type of problem. There are lots of different types of problems that need solving
and, therefore, lots of different languages.
6
Explain why some programmers still write programs in an assembly language.
Assembly language is translated directly into its machine code equivalent – each assembly
language ‘command’ is represented by one binary number. This can be more efficient as the
programmer controls exactly how the code is executed. Also, if the program is very specific,
for example, if it is being written to control a specific type of chip within an embedded
system, then this chip may have its own assembly language.
7
Explain why assembly language and machine code are said to have a ‘one-to-one’
relationship.
Because one assembly language instruction refers to one section of mahcine code.
8
Why must assembly language programs be assembled before they can be executed?
Computers can only execute programs that are written in machine code, so an assembly
language program must be assembled before it can be executed.
AQA A level Computer Science
© Hodder & Stoughton Limited 2015