0% found this document useful (0 votes)
5 views3 pages

Understanding High-Level Programming Languages

The document consists of a test for Computer Science students focusing on high-level and low-level programming languages. It includes questions about the definition of high-level languages, types of translators, and comparisons between compilers and interpreters. Additionally, it presents code examples and requires students to identify benefits of different programming languages and suitable translators for specific scenarios.

Uploaded by

alibinaseer
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views3 pages

Understanding High-Level Programming Languages

The document consists of a test for Computer Science students focusing on high-level and low-level programming languages. It includes questions about the definition of high-level languages, types of translators, and comparisons between compilers and interpreters. Additionally, it presents code examples and requires students to identify benefits of different programming languages and suitable translators for specific scenarios.

Uploaded by

alibinaseer
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Computer Science – 2210

(Test # )
Date : Name :

1 Programmers can use a high-level language to write a computer program.

(a) Explain what is meant by the term ‘high-level language’.

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

............................................................................................................................................... [2]

(b) A program written in a high-level language is translated into machine code. This is so that it
can be processed by a computer.

Name one type of translator that can be used.

.............................................................................................................................................. [1]

(c) Describe how your answer to part (b) translates this program.

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

.............................................................................................................................................. [3]
2 Look at these two pieces of code:

A: CLC B: FOR Loop = 1 TO 4


LDX #0 INPUT Number1, Number2
loop: LDA A,X Sum = Number1 + Number2
ADC B,X PRINT Sum
STA C,X NEXT
INX
CPX #16
BNE loop

(a) Which of these pieces of code is written in a high-level language?

[1]

(b) Give one benefit of writing code in a high-level language.

[1]

(c) Give one benefit of writing code in a low-level language.

[1]

(d) High-level languages can be compiled or interpreted.

Give two differences between a compiler and an interpreter.

[2]
8 Dimitri is writing a computer program in a high-level language.

He needs to send just the machine code for the program to his friend, electronically.

It is important that the program is executed as quickly as possible.

Identify which translator will be most suitable for Dimitri to use. Explain your choice.

Type of translator .............................................................................................................................

Explanation ......................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................
[4]

You might also like