Software Types and Language Translators: Computer Science 0478 (Cambridge O Level / IGCSE)
Syllabus 4.1, 4.2 · Strand 4 Software
- Questions
- 10
- Total marks
- 46
- Tier mix
- 10 Core
0 of 10 questions completed
Syllabus coverage
- 4.1 4 questions completed
- 4.2 6 questions completed
Software splits broadly into system software, which provides the services a computer itself needs, such as managing files, memory, peripherals and user accounts, and application software, which provides the services a user wants, such as a word processor or a game (syllabus 4.1). The operating system sits in between, running on top of firmware and hardware, and it also handles interrupts, signals from hardware (like a key press) or software (like division by zero) that momentarily pause the running program while an interrupt service routine deals with the cause.
Programming languages themselves fall into low-level languages, which map closely to hardware and are hard to read but give direct control, and high-level languages, which read more like English and are easier to write and debug but must be translated before a computer can run them (syllabus 4.2). An assembler turns assembly language mnemonics into machine code, a compiler translates an entire high-level program into an executable file before running it and reports all errors at once, and an interpreter translates and runs the code line by line, stopping as soon as it meets an error. An integrated development environment bundles a code editor, translator and error diagnostics with conveniences like auto-completion and prettyprint.
The exam-style questions below are original, written to match this syllabus objective, and each is followed by a full worked solution so you can check your method step by step.
Question 1
A tailoring shop's laptop has several programs installed: a disk-cleanup utility that removes temporary files, the operating system's built-in file manager, a printer driver for a label printer, and a custom program the shop uses to record customer orders and print invoices.
Which one of these programs is application software rather than system software?
Question 2
A school garden project uses a small computer to log data from sensors and to process the readings. A computing teacher is investigating two events that happen while the logging program is running.
Event 1: A tipping-bucket rain gauge in the garden has a tiny mechanical bucket that physically tips over every time it collects a fixed amount of rainwater. A sensor built into the bucket detects each tip and immediately signals the controlling computer.
Event 2: The logging program, while working out the average rainfall per hour recorded so far today, attempts to divide the total rainfall by the number of hours elapsed, which has become zero because the program was restarted just after midnight, before the first hour had finished.
(a) State whether Event 1 is a hardware interrupt or a software interrupt, and give one reason for your answer. [2]
(b) State whether Event 2 is a hardware interrupt or a software interrupt, and give one reason for your answer. [2]
(c) Describe what happens inside the computer, in general, from the moment either interrupt occurs to the moment the original logging program continues (or is stopped). [3]
Question 3
A start-up is building two products.
Product P is a tiny heart-rate sensor patch. Its firmware must react to the heart's electrical signal within a fraction of a millisecond, and it must directly control specialised timing circuits built into the patch.
Product Q is a phone app that counts a user's daily steps and displays a friendly weekly chart. It is being built quickly by a small team who plan to release versions for several different phone operating systems.
(a) State which type of language, high-level or low-level, is more suitable for writing Product P's firmware, and give two reasons for your choice. [3]
(b) State which type of language, high-level or low-level, is more suitable for writing Product Q's app, and give two reasons for your choice. [3]
Question 4
A small finance company is building a budgeting application in a high-level language.
During development, a programmer repeatedly changes short sections of code and immediately re-runs them to see the effect of each change. Whenever a mistake is met while running, the program stops at that exact point without checking any of the code that comes after it.
Before the app is released to customers, the finished, fully tested source code is turned into a single stand-alone file that customers can install and run without needing the original source code or any translator installed on their own computer. During this final translation step, if any error still remains in the code, a full list of every error found anywhere in the program is reported together, all at once.
(a) Identify which type of translator, compiler or interpreter, is being used during development, and describe how it processes the code to produce the behaviour described above. [3]
(b) Identify which type of translator, compiler or interpreter, is being used to prepare the release version, and describe how it processes the code to produce the behaviour described above. [3]
(c) Explain one reason the finance company chooses to use the translator identified in (a), rather than the one identified in (b), while the app is still being developed. [2]
Question 5
A robotics club member has finished writing the control program for a line-following robot in an IDE. Before testing it on the physical robot, they want to execute the program immediately inside the IDE itself, so that any messages the program prints are displayed on screen straight away, without opening a separate program to run the code.
Which feature of the IDE provides this?
Question 6
A school library's shared computer runs a general-purpose operating system that many different students use throughout the day, often for more than one task at a time.
Situation 1: Each student logs in with their own username and password. Once logged in, a student can open, edit and delete the files in their own personal folder, but cannot open another student's folder or change the settings that control the whole computer.
Situation 2: While one student researches a project in a web browser, another window has a document open in a word processor. The operating system repeatedly decides, many times every second, which of the two programs gets to use the processor next, so that both appear to run at the same time.
Situation 3: While the browser and the word processor are both open, the operating system keeps track of which area of RAM each program is using, and stops one program from reading or overwriting the memory that belongs to the other program.
(a) Identify the operating system function shown in Situation 1, and describe how it protects each student's work. [3]
(b) Identify the operating system function shown in Situation 2, and describe how it allows both programs to appear to run at once. [2]
(c) Identify the operating system function shown in Situation 3, and explain why it is needed. [3]
Question 7
A user notices that their laptop has become slower at opening files, after years of installing and deleting many programs. A technician explains that the data belonging to each file has become scattered across many separate physical locations on the hard disk, instead of being stored together. The user runs a utility program that reorganises the data on the disk so that each file's data is stored in one continuous area, without changing what any of the files actually contain.
Which utility program is being described?
Question 8
An engineer is writing a very small program directly in assembly language to control a robot arm's motor. The program uses mnemonics such as LDA, ADD and STA, each one standing for a single operation the processor can carry out.
(a) Name the type of translator needed to convert this assembly language program into a form the processor can execute, and describe, in general terms, how it processes the mnemonics to produce machine code. [3]
(b) State one way in which this translation process differs from how a compiler translates a program written in a high-level language such as Python. [2]
(c) Explain why the assembly language program, even though it is already a low-level language, still cannot be run directly by the processor without this translation step. [2]
Question 9
A student is writing a program in an IDE for a class project.
Feature 1: As the student types, keywords such as IF and WHILE automatically appear in bold blue text, text written between quotation marks appears in green, and each line inside a loop is automatically indented one level further than the line before it.
Feature 2: Before the student even tries to run the program, a wavy red line appears under a line where a closing bracket has been left out, together with a message stating the line number and explaining that a bracket is missing.
(a) Identify the IDE feature shown in Feature 1, and state two specific things it is doing to help the student read and write the code. [3]
(b) Identify the IDE feature shown in Feature 2, and explain how it differs from simply running the program and having it crash or behave incorrectly. [3]
Question 10
A games company wants the final, released version of its game to run as fast as possible on a player's console, since exactly the same code will be run over and over again with no further changes made to it.
Which statement explains why using a compiler, rather than an interpreter, for this final release best supports that goal?