1.3.7 High - and Low-Level Languages and Their Translators PDF
1.3.7 High - and Low-Level Languages and Their Translators PDF
1.3.7 High - and Low-Level Languages and Their Translators PDF
Q1 2016-Nov, P13
State two advantages of using a high-level language and two advantages of using a low-level language.
...................................................................................................................................................................
...................................................................................................................................................................
...................................................................................................................................................................
............................................................................................................................................................. [4]
Q2 2016-Nov, P12
1 (a) Give two reasons why a programmer would choose to write code in a low-level language.
1 .....................................................................................................................................................
.........................................................................................................................................................
.........................................................................................................................................................
2 .....................................................................................................................................................
.........................................................................................................................................................
.................................................................................................................................................... [2]
(b) High-level languages require either an interpreter or a compiler to translate the program.
Tick (3) to show which statements refer to interpreters and which refer to compilers.
Q3 2015-June, P12
9 (a) Five statements about interpreters and compilers are shown in the table below.
(b) State why a compiler or an interpreter is needed when running a high-level program on a
computer.
.........................................................................................................................................................
.........................................................................................................................................................
.....................................................................................................................................................[1]
.........................................................................................................................................................
.........................................................................................................................................................
.....................................................................................................................................................[1]
.........................................................................................................................................................
.........................................................................................................................................................
.....................................................................................................................................................[1]
A: 1 0 1 0 1 1 0 1
1 1 0 0 1 1 1 0
1 0 1 1 0 1 1 1
B: LDA X
INC X
STA Y
C: FOR x ← 1 TO 10
READ n
ENDFOR
Identify, using the letters A, B or C, which of the above codes is an example of assembly code,
high-level language code or machine code:
Q4 2015-June, P11
10 Five statements about interpreters and compilers are shown in the table below.
Q5 2012-June,P12
……………………………………………………………………………………………………………………………………………… [1]
……………………………………………………………………………………………………………………………………………………
……………………………………………………………………………………………………………………………………………………
……………………………………………………………………………………………………………………………………………………
……………………………………………………………………………………………………………………………………………… [1]
……………………………………………………………………………………………………………………………………………………
……………………………………………………………………………………………………………………………………………………
……………………………………………………………………………………………………………………………………………………
……………………………………………………………………………………………………………………………………………… [1]
1 …………………………………………………………………………………………………………………………………………………
……………………………………………………………………………………………………………………………………………………
2 …………………………………………………………………………………………………………………………………………………
……………………………………………………………………………………………………………………………………………… [2]
Q6 2011-June,P12
7 (a)
1 h = 0
2 c = 0
3 REPEAT
4 READ x
5 IF x > h THEN x = h
6 c = c + 1
7 PRINT h
8 UNTIL c < 20
1 …………………………………………………………………………………………………………………………………………………
……………………………………………………………………………………………………………………………………………………
2 …………………………………………………………………………………………………………………………………………………
……………………………………………………………………………………………………………………………………………… [2]
1 …………………………………………………………………………………………………………………………………………………
……………………………………………………………………………………………………………………………………………… [1]
Q7 2010-June, P11
10 (a) Compilers and interpreters translate high-level languages. Give two differences between
compilers and interpreters.
1 …………………………………………………………………………………………………………………………………………………
……………………………………………………………………………………………………………………………………………………
2 …………………………………………………………………………………………………………………………………………………
……………………………………………………………………………………………………………………………………………… [2]
…………………………………………………………………………………………………………………………………………………..
……………………………………………………………………………………….…………………………………………………….. [2]
…………………………………………………………………………………………………………………………………………………..
…………………………………………………………………………………………………………………………………………………..
……………………………………………………………………………………………………………………………………………… [1]