9 questions · about 5% of the marks we indexed · examined in 7 of 8 sessions.
Questions by year
2026
2026 May/June · Paper 12 · Q7 (a, b, c, d, e)9 marksProgramming languages, translators and IDEs
2025
2025 Oct/Nov · Paper 12 · Q3 (a, b, c)4 marksProgramming languages, translators and IDEs
2025 Oct/Nov · Paper 12 · Q5 (a, b)5 marksInterrupts
2025 May/June · Paper 12 · Q3 (a, b(i), b(ii))11 marksProgramming languages, translators and IDEs
2024
2024 Oct/Nov · Paper 12 · Q1 (a, b, c)3 marksSystem and application software, operating system functions
2024 May/June · Paper 12 · Q4 (a, b, c)5 marksSystem and application software, operating system functions
2023
2023 May/June · Paper 12 · Q5 (a, b(i), b(ii), c)9 marksProgramming languages, translators and IDEs
2023 May/June · Paper 12 · Q10 (a)4 marksSystem and application software, operating system functions
2022
2022 Oct/Nov · Paper 12 · Q1 (e)3 marksSystem and application software, operating system functions
No questions match this filter.
References only, not question text. Open Official paper ↗ where Cambridge publishes the paper,
or see the official Cambridge past-papers page; for other papers, ask your
school. “Paper 42” means Paper 4, variant 2.
Practice questions
Original questions written by HomiLabs in the style of the exam, with answers and mark schemes. They are not
Cambridge past paper questions and have not been reviewed by Cambridge. Try each one before opening the answer.
Q1Programming languages, translators and IDEs · Core · Paper 1 style · 3 marks
(a)A games studio in Lahore writes most of its code in a high-level language. State two differences between a high-level language and a low-level language.[2]
(b)Give one reason why a programmer at the studio might still write a small part of the game in a low-level language.[1]
Show answer
(a) Any two, e.g. high-level uses English-like statements, low-level uses mnemonics or binary; high-level is machine independent, low-level is specific to one processor; one high-level statement may become many machine code instructions, one assembly instruction becomes one machine code instruction.
1 mark each for any two differences, both sides of the comparison needed (or clearly implied). Do not accept 'high-level is harder'.
(b) To directly control/manipulate the hardware (e.g. specific registers or memory locations), or to produce code that runs faster / uses less memory.
1 mark for any one valid reason.
Q2Programming languages, translators and IDEs · Core · Paper 1 style · 3 marks
(a)Name the type of translator described by each statement.(i) It translates the whole program into an executable file before the program is run.(ii) It translates and runs one line at a time and stops when it finds an error.(iii) It translates assembly language into machine code.[3]
Show answer
(a) (i) Compiler (ii) Interpreter (iii) Assembler
1 mark for each correct translator.
Q3Programming languages, translators and IDEs · Core · Paper 1 style · 4 marks
(a)A student in Karachi uses an integrated development environment (IDE) to write a program that calculates bus fares. State three functions that an IDE provides.[3]
(b)Describe how auto-completion helps the student while typing the program.[1]
Show answer
(a) Any three, e.g. code editor; translator (compiler/interpreter); run-time environment; error diagnostics; auto-completion; auto-correction; prettyprint (colour coding / indentation); auto-documenter; debugging tools such as breakpoints and stepping.
1 mark for each different function, up to 3.
(b) As the student starts typing a keyword or identifier, the IDE suggests/offers the rest of it, so the student can select it, which saves typing and reduces spelling errors.
1 mark for suggests the rest of a word/identifier as it is typed.
Q4Programming languages, translators and IDEs · Core · Paper 1 style · 3 marks
(a)The controller in a washing machine made in Faisalabad is programmed in assembly language. State what is meant by assembly language.[1]
(b)State the name of the translator used to convert the controller program into machine code.[1]
(c)Give one reason why assembly language is suitable for this controller.[1]
Show answer
(a) A low-level language that uses mnemonics (short codes such as LDA, ADD) to represent machine code instructions.
1 mark: low-level language using mnemonics.
(b) Assembler
1 mark.
(c) Any one, e.g. allows direct manipulation of the hardware; the program can be made small to fit limited memory; the program runs quickly/efficiently.
1 mark for any one valid reason linked to an embedded controller.
Q5Programming languages, translators and IDEs · Core · Paper 1 style · 4 marks
(a)A coding club uses an interpreter while it is developing a quiz app. Explain why an interpreter is useful during development.[2]
(b)When the app is finished, the club compiles it before sharing it. Give two reasons for this.[2]
Show answer
(a) The interpreter stops at the line with an error and reports it, so the programmer can correct the error and continue/re-run straight away; parts of the program can be tested before the whole program is complete.
1 mark: stops at/identifies the error line. 1 mark: error can be fixed and the program re-run immediately / test sections without translating the whole program.
(b) Any two, e.g. the users do not need a translator to run it; the executable file runs faster than interpreted code; the source code is not shared, so it cannot easily be copied or changed.
1 mark each for any two reasons.
Q6Programming languages, translators and IDEs · Core · Paper 1 style · 4 marks
(a)State two features of machine code.[2]
(b)Explain why a program written in a high-level language must be translated before a computer can run it.[2]
Show answer
(a) Any two, e.g. it is written in binary; it can be executed directly by the processor without translation; it is specific to a processor type (machine dependent); it is a low-level language.
1 mark for each feature.
(b) The processor can only execute machine code (binary instructions); high-level code is English-like text, so it must be converted into machine code first.
1 mark: processor only understands/executes machine code or binary. 1 mark: so the high-level statements must be converted to machine code.
Q7Programming languages, translators and IDEs · Standard · Paper 1 style · 4 marks
(a)Tick to show whether each statement applies to a compiler, an interpreter or both.1. It translates high-level code into machine code.2. It produces an executable file.3. It reports all the errors in the program after it has finished translating.4. The translator is needed every time the program is run.[4]
Show answer
(a) 1 both; 2 compiler; 3 compiler; 4 interpreter
1 mark for each correct row.
Q8Programming languages, translators and IDEs · Standard · Paper 1 style · 4 marks
(a)A programmer is fixing a fault in the ticket-booking program for a city metro bus service. She uses an IDE. Explain how each of these IDE features would help her.(i) Error diagnostics(ii) Prettyprint(iii) Breakpoints[3]
(b)State one other IDE feature that would help her test the corrected program.[1]
Show answer
(a)(i) Error diagnostics highlight/identify where an error is and what kind it is, so she can find and correct it quickly.(ii) Prettyprint colour-codes keywords and indents the code, so the structure is easier to read and mistakes such as a missing ENDIF stand out.(iii) A breakpoint stops the program at a chosen line, so she can inspect the values of variables at that point to find the logic error.
1 mark for each explanation that says what the feature does and how it helps.
(b) Any one, e.g. run-time environment; stepping (single-step through lines); variable watch window; built-in translator.
1 mark.
Q9Programming languages, translators and IDEs · Standard · Paper 1 style · 5 marks
(a)The control program for a heart-rate monitor used in a clinic in Nairobi is written in assembly language. Explain two advantages of writing this program in assembly language rather than a high-level language.[4]
(b)State one drawback of using assembly language for this program.[1]
Show answer
(a) Any two explained, e.g. the programmer can directly manipulate the hardware/registers, so the monitor can read its sensor precisely; the code can be optimised to use very little memory, so it fits the device's small memory; the code executes quickly, so readings are processed in real time.
For each advantage: 1 mark for the point, 1 mark for the expansion linked to the monitor.
(b) Any one, e.g. it is harder/slower to write and debug; it only works on that type of processor (machine dependent); fewer programmers know it.
1 mark.
Q10Programming languages, translators and IDEs · Standard · Paper 1 style · 3 marks
(a)Describe how a compiler translates a program and reports the errors it finds.[3]
Show answer
(a) It translates the whole high-level program in one go (before it is run); it produces an executable file of machine code (object code); if there are errors it does not produce the executable and gives an error report listing all errors found (with line numbers).
1 mark each for: translates whole program at once; produces executable/machine code file; produces a list/report of all errors at the end and no executable is produced if there are errors.
Q11Programming languages, translators and IDEs · Standard · Paper 1 style · 4 marks
(a)A program for recording exam marks was written in a high-level language on laptops at a school in Multan. The school now wants it to run on tablets that have a different type of processor. Explain why writing the program in a high-level language makes this easier.[2]
(b)Explain why a machine code version of the program compiled for the laptops would not run on the tablets.[2]
Show answer
(a) High-level languages are machine independent / portable: the same source code can be translated for a different processor, so the program does not have to be rewritten.
1 mark: machine independent/portable. 1 mark: the same code just needs translating for the new processor rather than rewriting.
(b) Machine code is specific to the processor's instruction set; the tablets' processor uses a different instruction set, so it cannot execute those instructions.
1 mark: machine code is processor/machine specific. 1 mark: the tablet's processor has a different instruction set so cannot understand it.
Q12Programming languages, translators and IDEs · Standard · Paper 1 style · 5 marks
(a)Complete the paragraph using words from the list. Not all words are used.List: assembler, binary, compiler, executable, interpreter, mnemonics, portable, sourceA programmer writes ...(1)... code in a high-level language. A ...(2)... translates the whole of this code into an ...(3)... file. Assembly language uses ...(4)... and is translated by an ...(5)....[5]
Q13Programming languages, translators and IDEs · Challenge · Paper 1 style · 5 marks
(a)A company in Islamabad is developing a weather-station app. Explain which type of translator the company should use while writing and testing the app, and which type it should use for the version given to customers. Give reasons for each choice.[4]
(b)Explain why giving customers the compiled version also protects the company's work.[1]
Show answer
(a)During development: an interpreter, because it stops at each error as it is found so errors can be corrected and the code re-run immediately, line by line.For customers: a compiler, because it produces an executable that runs without a translator on the customer's device and runs faster.
1 mark interpreter for development + 1 mark reason; 1 mark compiler for customers + 1 mark reason.
(b) Customers only receive the executable machine code, not the source code, so they cannot easily read, copy or change the program.
1 mark: source code is not distributed so it cannot be copied/modified.
Q14Programming languages, translators and IDEs · Challenge · Paper 1 style · 5 marks
(a)A drone's flight controller has a small amount of memory and must respond to its sensors very quickly. Explain why its designers might write parts of the control program in assembly language instead of a high-level language.[4]
(b)Explain why the same assembly language program could not be used on a drone that has a different type of processor.[1]
Show answer
(a) Assembly gives direct control of the hardware (registers, memory addresses, ports), needed to read the sensors and drive the motors; each instruction translates to one machine code instruction, so the code can be written to be compact, which suits the small memory; the programmer can optimise the code so it executes faster, which suits the need for quick response.
Up to 4 marks: 1 for each point and 1 for each linked expansion (direct hardware control; compact code for small memory; fast execution for quick response).
(b) Assembly language is specific to a processor's instruction set, so a different processor would need a rewritten program.
1 mark.
Q15Programming languages, translators and IDEs · Challenge · Paper 1 style · 4 marks
(a)A student's program contains two syntax errors, one on line 14 and one on line 30. Describe what happens when the program is translated with an interpreter.[2]
(b)Describe what happens when the same program is translated with a compiler.[2]
Show answer
(a) Lines 1 to 13 are translated and executed; the interpreter stops at line 14 and reports that error; the error on line 30 is not reported until line 14 has been corrected and the program is re-run to that point.
1 mark: runs until line 14 then stops and reports it. 1 mark: line 30 error only found after correcting line 14 and running again.
(b) The compiler attempts to translate the whole program; it reports both errors (lines 14 and 30) in an error list at the end; no executable file is produced, so none of the program runs.
1 mark: both errors reported together after translation. 1 mark: no executable produced / program does not run.
Q16Programming languages, translators and IDEs · Challenge · Paper 1 style · 6 marks
(a)A team in Dubai is building an appointment-booking system for a hospital. Explain how three different features of an IDE would help the team produce working, maintainable code.[6]
Show answer
(a)Any three explained, e.g.- auto-documenter: produces documentation/explanations of the code automatically, so other team members can understand and maintain it;- prettyprint: consistent colour coding and indentation, so code written by different people is easy to read;- error diagnostics: identify and highlight errors and their position, so bugs are found quickly;- run-time environment / breakpoints / stepping: run and pause the code to watch variable values, so logic errors can be traced;- auto-correction: fixes common typing errors automatically, reducing syntax errors;- auto-completion: suggests identifiers, so names are used consistently.
For each of three features: 1 mark for naming/describing the feature, 1 mark for explaining how it helps in this team context.
Q17Programming languages, translators and IDEs · Challenge · Paper 1 style · 5 marks
(a)Low-level languages include machine code and assembly language. Explain why a programmer would prefer to write in assembly language rather than machine code.[2]
(b)Explain two reasons why most application programs are written in a high-level language rather than assembly language.[2]
(c)Give one example of a task for which assembly language would be chosen.[1]
Show answer
(a) Assembly uses mnemonics instead of binary, so it is easier to read, write and remember; errors are easier to find and correct.
1 mark: mnemonics rather than binary / easier to understand. 1 mark: easier to debug / fewer mistakes.
(b) Any two, e.g. English-like statements are quicker to write and easier to debug; it is machine independent so it can run on different processors after translation; one statement can do the work of many machine instructions; more programmers know high-level languages, so it is easier to maintain.
1 mark for each reason.
(c) Any one, e.g. writing a device driver; programming an embedded controller with little memory; code that must directly manipulate a hardware register; a time-critical routine.
1 mark.
Q18Programming languages, translators and IDEs · Challenge · Paper 1 style · 4 marks
(a)A translation app has two versions: one is interpreted and one is compiled. Both are run on the same phone. Explain why the interpreted version runs more slowly.[2]
(b)State two things that a user must have on the phone to run the interpreted version but does not need for the compiled version.[2]
Show answer
(a) Each line must be translated every time it is executed (including every time a loop repeats), so translation time is added to run time; the compiled version has already been translated to machine code, so it executes directly.
1 mark: interpreter translates each line as it runs / repeatedly. 1 mark: compiled code is already machine code so no translation at run time.
(b) The interpreter (translation software) and the source code of the program.
1 mark each.
Q19System and application software, operating system functions · Core · Paper 1 style · 3 marks
(a)Identify whether each of the following is system software or application software.1. Operating system2. Word processor3. Anti-virus utility4. Photo-editing program5. Device driver for a printer6. Spreadsheet[3]
Show answer
(a) System: 1, 3, 5. Application: 2, 4, 6.
1 mark for each two correct (6 correct = 3 marks).
Q20System and application software, operating system functions · Core · Paper 1 style · 3 marks
(a)State three functions of an operating system.[3]
Show answer
(a) Any three, e.g. managing files; handling interrupts; providing a user interface; managing peripherals and drivers; managing memory; managing multitasking; providing a platform for running applications; providing system security; managing user accounts.
1 mark for each function.
Q21System and application software, operating system functions · Core · Paper 1 style · 4 marks
(a)Describe the difference between system software and application software.[2]
(b)Give one example of each type of software. Do not use brand names.[2]
Show answer
(a) System software provides the services the computer needs to run/operate and manage the hardware, and a platform for other software; application software lets the user carry out specific tasks they want to do.
1 mark for system software description, 1 mark for application software description.
(b) System: e.g. operating system, utility such as anti-virus, device driver. Application: e.g. word processor, web browser, spreadsheet, game, photo editor.
1 mark for each correct example. Brand names score 0.
Q22System and application software, operating system functions · Standard · Paper 1 style · 4 marks
(a)A delivery rider in Lahore uses a smartphone. The maps app is open while music plays and a messaging app receives a new order. Explain how the operating system manages memory and multitasking so that all three apps can run.[4]
Show answer
(a)Memory management: the OS allocates each app its own area of memory and keeps track of it; it prevents one app from using/overwriting another app's memory; it frees memory when an app is closed.Multitasking: the OS shares processor time between the apps, switching rapidly between them so they appear to run at the same time; it decides priorities (e.g. the messaging alert).
Up to 2 marks for memory management points and up to 2 marks for multitasking points.
Q23System and application software, operating system functions · Standard · Paper 1 style · 4 marks
(a)A teacher connects a new printer to a classroom computer. Explain how the operating system manages this peripheral.[3]
(b)State one way in which the operating system provides a user interface for the teacher.[1]
Show answer
(a) The OS uses/installs a device driver for the printer so that it can communicate with it; it sends data to the printer and manages the print queue (spooling); it handles interrupts/signals from the printer, e.g. out of paper.
1 mark each for any three points.
(b) Any one, e.g. a graphical user interface with windows, icons, menus and a pointer; a command-line interface.
1 mark.
Q24System and application software, operating system functions · Standard · Paper 1 style · 4 marks
(a)A laptop needs hardware, firmware, an operating system and applications. Put these four layers in order, starting with the layer closest to the hardware.[1]
(b)Describe the role of firmware such as the bootloader when the laptop is switched on.[2]
(c)Explain why applications are run by the operating system rather than directly on the hardware.[1]
Show answer
(a) Hardware → firmware → operating system → applications
1 mark for the correct order.
(b) Firmware is stored in ROM/non-volatile memory, so it is available when power is switched on; the bootloader runs first and loads the operating system into RAM/starts the OS.
1 mark: stored in ROM/non-volatile memory. 1 mark: loads/starts the operating system.
(c) The OS provides a platform/standard services so applications do not need to manage the hardware themselves, and it controls their access to the hardware.
1 mark.
Q25System and application software, operating system functions · Challenge · Paper 1 style · 6 marks
(a)A hospital uses computers that store patient records. Explain how three functions of the operating system help the computers to run safely and correctly in this hospital.[6]
Show answer
(a)Any three explained in context, e.g.- managing system security / user accounts: each member of staff logs in with their own account and password, so only authorised staff can see patient records;- file management: the OS organises records into folders, controls opening, saving, copying and deleting, and sets access rights so records are not changed by the wrong people;- handling interrupts: urgent signals (e.g. a device error) are dealt with immediately so systems keep working;- memory management: each application has its own memory so one program cannot corrupt another;- managing peripherals: drivers let the computers use printers/scanners for records.
For each of three functions: 1 mark for the function, 1 mark for an explanation applied to the hospital.
Q26System and application software, operating system functions · Challenge · Paper 1 style · 6 marks
(a)A computer has 4 GiB of RAM. A student opens several large programs at once. Explain how the operating system manages the processes and memory so the student can keep working.[4]
(b)The student notices that the computer slows down a lot when very many programs are open. Explain why.[2]
Show answer
(a) The OS allocates memory to each process and keeps a record of which memory each uses; when RAM is full it can move data/pages not currently needed to virtual memory on secondary storage; it swaps them back into RAM when needed; it schedules processor time between the processes (multitasking) so each makes progress; it frees memory when a program is closed.
1 mark each for any four points.
(b) RAM is full so more data is held in virtual memory; data must be repeatedly swapped between RAM and secondary storage, which is much slower than RAM (disk thrashing).
1 mark: virtual memory/secondary storage used. 1 mark: swapping data is slow compared with RAM.
Q27System and application software, operating system functions · Challenge · Paper 1 style · 5 marks
(a)A games company says its new game 'needs an operating system to run'. Explain why application software depends on an operating system.[3]
(b)Explain why the same game file may not run on a computer with a different operating system.[2]
Show answer
(a) The OS provides the platform on which the application runs; it gives access to the hardware (screen, keyboard, sound) through drivers, so the game does not need its own code for each device; it allocates memory and processor time to the game; it handles files such as saved games.
1 mark each for any three points.
(b) The game is written to use the services/instructions provided by one particular operating system; another OS provides different services/file formats, so the game cannot call them correctly.
1 mark: relies on the specific OS services. 1 mark: a different OS works differently so the calls fail.
Q28Interrupts · Core · Paper 1 style · 4 marks
(a)State what is meant by an interrupt.[2]
(b)Give one example of a hardware interrupt and one example of a software interrupt.[2]
Show answer
(a) A signal sent to the processor from a device or from software, telling it that something needs attention/processing.
1 mark: a signal to the processor. 1 mark: from hardware or software indicating it needs attention.
(b) Hardware: e.g. a key being pressed, the mouse being moved, a printer running out of paper. Software: e.g. division by zero, two processes trying to use the same memory location, a program requesting input.
1 mark for each correct example.
Q29Interrupts · Standard · Paper 1 style · 5 marks
(a)Describe how a processor handles an interrupt.[5]
Show answer
(a) The interrupt is placed in a queue/stored according to its priority; at the end of each fetch-decode-execute cycle the processor checks for interrupts; if the interrupt has a higher priority than the current task, the current task is suspended; the current state/register values are saved (on the stack); the interrupt service routine (ISR) for that interrupt is called/run; when the ISR is finished, the saved state is restored and the original task continues.
1 mark each for any five points.
Q30Interrupts · Challenge · Paper 1 style · 6 marks
(a)Asad is listening to music on his computer while a document prints. At the same moment he presses a key and the printer runs out of paper. Explain how the processor uses interrupts to deal with both events without the music stopping for long.[4]
(b)Explain why using interrupts is more efficient than the processor repeatedly checking every device to see whether it needs attention.[2]
Show answer
(a) Each device sends an interrupt signal; the interrupts are queued according to priority; at the end of each FDE cycle the processor checks the queue; it saves the state of the current task, runs the ISR for the highest-priority interrupt, then for the next one (e.g. shows an out-of-paper message, reads the key press); after each ISR the saved state is restored so the music program continues; this happens so fast the music continues smoothly.
1 mark each for any four points applied to the scenario.
(b) The processor does not waste time checking devices that do not need attention; it can carry on with other processing and only responds when a device sends an interrupt.
1 mark: no time wasted polling idle devices. 1 mark: processor continues useful work and responds only when signalled.
Similar questions
Questions that test the same subtopic in different years, grouped so you can work on one skill at a time.
References only: find each question in its paper (official link where available, otherwise through your school).
Programming languages, translators and IDEs4 questions · 4/8 sessions