Software, operating systems and translators – O Level Computer Science (2210)
Question text
6
A programmer can use translators, such as an interpreter and a compiler, when developing a
computer program.
(a) Give one similarity between a compiler and an interpreter.
…
… [1]
(b) Describe two differences between a compiler and an interpreter.
Difference 1 …
…
…
…
Difference 2 …
…
…
…
[4]
(c) Identify one other type of translator.
… [1]
Question text
9
Padma opens an application on her computer.
An interrupt is generated to inform the Central Processing Unit (CPU) that the application has
been opened.
(a) Give three other examples of when an interrupt signal could be generated.
1 …
2 …
3 …
[3]
(b) State what would happen if interrupt signals were not used in a computer.
…
… [1]
Question text
2
Both an interpreter and a compiler can be used when writing a program in a high-level language.
(a) Explain why a programmer would make use of both an interpreter and a compiler.
…
…
…
…
…
…
…
… [4]
(b) Give three reasons why a programmer would choose to write a program in a high-level
language, instead of a low-level language.
Reason 1 …
…
Reason 2 …
…
Reason 3 …
…
[3]
Question text
8
Leonard has a new laser printer to print letters for his business.
Leonard connects his printer to his computer using the USB port.
(a) Give three benefits of using the USB port to connect the printer to the computer.
Benefit 1 …
…
Benefit 2 …
…
Benefit 3 …
…
[3]
(b) State two benefits and one drawback of Leonard using a laser printer, instead of an inkjet
printer, to print the letters.
Benefit 1 …
…
Benefit 2 …
…
Drawback …
…
[3]
(c) An interrupt signal is sent from the printer to the computer.
(i)
Give two examples of when a printer would generate an interrupt signal.
Example 1 …
Example 2 …
[2]
(ii)
Many devices send interrupt signals.
Identify the software in the computer that will receive and manage all interrupt signals.
… [1]
Question text
2
A programmer uses a high-level language to write a computer program.
(a) Four statements are given about high-level programming languages.
Tick (3) to show if each statement is True or False.
True
False
Statement
(3)
(3)
High-level languages need to be translated into machine code to run on a
computer
High-level languages are written using mnemonic codes
High-level languages are specific to the computer’s hardware
High-level languages are portable languages
[4]
(b) Tick (3) to show which of the following is an example of a high-level language program.
Tick
Example program
(3)
1011100000110000
0000011011100010
INP
STA ONE
INP
STA TWO
ADD ONE
a = input()
b = input()
if a == b:
print("Correct")
else:
print("Incorrect")
[1]
Question text
7
The Von Neumann model for a computer system has several components that are used in the
fetch-execute cycle.
(a) One component is main memory.
(i)
Describe what is meant by main memory and how it is used in the Von Neumann model
for a computer system.
…
…
…
…
…
… [3]
(ii)
State two other components in the Von Neumann model for a computer system.
1 …
2 …
[2]
(b) Computer systems often use interrupts.
Five statements are given about interrupts.
Tick (3) to show if each statement is True or False.
True
False
Statement
(3)
(3)
Interrupts can be hardware based or software based
Interrupts are handled by the operating system
Interrupts allow a computer to multitask
Interrupts work out which program to give priority to
Interrupts are vital to a computer and it cannot function without them
[5]
Question text
7
Annie writes a paragraph of text as an answer to an examination question about programming
languages.
Using the list given, complete Annie’s answer by inserting the correct six missing terms. Not all
terms will be used.
•
Assembly
•
Converter
•
Denary
•
Hexadecimal
•
High-level language
•
Low-level language
•
Machine Code
•
Source Code
•
Syntax
•
Translator
The structure of language statements in a computer program is called the
… . A programming language that uses natural
language statements is called a … . When programs
are written in this type of language they need a … to
convert them into … .
A programming language that is written using mnemonic codes is called a
… . An example of this type of language is
… language.
[6]
Question text
6
(a) Many programmers write computer programs in high-level languages. The programs need to
be translated into machine code to be read by the computer.
State two types of translator that can be used.
Translator 1 …
Translator 2 …
[2]
(b) Explain two reasons why a computer programmer may choose to write a program in a high-
level language, rather than a low-level language.
Reason 1 …
…
…
…
Reason 2 …
…
…
…
[4]
(c) Three examples of computer code are given in the table.
Tick (✓) to show whether each example of computer code is High-level language, Assembly
language or Machine code.
High-level
Assembly
Machine
Computer code
language
language
code
(✓)
(✓)
(✓)
10110111
11001100
01011100
FOR X = 1 TO 10
PRINT X
NEXT X
INP X
STA X
LDA Y
[3]
Question text
8
Describe the purpose of an interrupt in a computer system.
…
…
…
…
…
…
…
… [4]
Question text
7
David is writing a program using a high-level language. The program will be published and sold for
profit.
(a) David uses an interpreter when creating the computer program.
State three features of an interpreter.
Feature 1 …
…
Feature 2 …
…
Feature 3 …
…
[3]
(b) David compiles the program when he has completed it.
Explain two benefits of compiling the program.
Benefit 1 …
…
…
…
Benefit 2 …
…
…
…
[4]
(c) David needs to send a large section of the programming code as an email attachment.
He uses lossless compression to reduce the file size.
Explain how the file size is reduced.
…
…
…
…
…
… [3]
Question text
7
Translators, such as a compiler and an interpreter, are used when writing and running computer
programs.
Describe how a compiler and an interpreter translates a computer program.
Compiler …
…
…
…
…
…
Interpreter …
…
…
…
…
…
[6]
Question text
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]
Question text
6
Selma writes the following four answers in her Computer Science examination.
State which computer terms she is describing.
“It is a signal. When the signal is received it tells the operating system that an event has occurred.”
Selma is describing …
“It takes source code written in a high level language and translates it into machine code. It
translates the whole of the source code at once.”
Selma is describing …
“The part of the central processing unit (CPU) that carries out calculations.”
Selma is describing …
“When data is transmitted, if an error is detected in the data received a signal is sent to ask for the
data to be retransmitted. This continues until the data received is correct.”
Selma is describing …
[4]
Question text
10 Six statements about assembly language are shown.
Tick (3) whether the statement is true or false.
Statement
true
false
(3)
(3)
Assembly language uses mnemonic codes.
Assembly language programs do not need
a translator to be executed.
Assembly language is a low-level
programming language.
Assembly language is specific to the
computer hardware.
Assembly language is machine code.
Assembly language is often used to create
drivers for hardware.
[6]
Permission to reproduce items where third-party owned material protected by copyright is included has been sought and cleared where possible. Every
publisher will be pleased to make amends at the earliest possible opportunity.
To avoid the issue of disclosure of answer-related information to candidates, all copyright acknowledgements are reproduced online in the Cambridge International
Examinations Copyright Acknowledgements Booklet. This is produced for each series of examinations and is freely available to download at www.cie.org.uk after
the live examination series.
Cambridge International Examinations is part of the Cambridge Assessment Group. Cambridge Assessment is the brand name of University of Cambridge Local
Question text
2
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]