- Subjects
- Computer Science
- Question bank
- A1.4 Translation
A1.4 Translation questions for IB Computer Science
41 questions on Translation, written by Augment in the style of IB exam papers. Six of them are below in full, to answer on paper.
- IB Computer Science
- Part of A1 Computer fundamentals
- HL only
Questions by paper and level
| Paper | Questions |
|---|---|
| Paper 1 | 41 |
Counted on
Questions to try
Written by Augment in the style of IB exams, not past papers. Answer them on paper, then check each one against its markscheme with a free account.
A company makes smart thermostats. The firmware is written in a high-level language and translated before it is loaded onto the thermostat's microcontroller, which has 64 KB of flash memory and a low-power processor.
- (a)
State the form of the program produced by a compiler that is stored on the thermostat.
1 mark
- (b)
Outline one reason why an interpreter is not stored on the thermostat to run the firmware source code.
2 marks
- (c)
Explain why compiling the firmware before it is loaded helps the thermostat respond quickly to temperature changes.
3 marks
A primary school introduces programming to 11-year-olds using an online environment in which each line of a student's program is translated and run as soon as the student presses Run.
- (a)
Outline how the environment's interpreter deals with an error in a student's program.
2 marks
- (b)
Explain why an interpreter is suitable for these beginners.
3 marks
A start-up is writing payroll software. One developer suggests a compiled language; another suggests an interpreted one.
- (a)
Distinguish between a compiler and an interpreter in terms of when source code is translated.
2 marks
- (b)
Distinguish between a compiler and an interpreter in terms of how syntax errors are reported.
2 marks
A games studio writes its 3D rendering engine in a language that is compiled to native machine code. Gameplay rules, such as enemy behaviour and quest logic, are written as scripts that the finished game runs through an embedded interpreter.
Evaluate this use of two different translation methods in the same game.
6 marks
A web-based photo editor runs entirely in the browser. The browser's script engine first interprets the editor's code, then uses just-in-time (JIT) compilation for parts of it.
- (a)
Define just-in-time compilation.
1 mark
- (b)
The editor applies a blur filter by running the same loop once for every pixel of a 12-megapixel image.
Explain how JIT compilation speeds up the blur filter.
3 marks
- (c)
Outline one disadvantage of JIT compilation for users of the photo editor.
2 marks
A building society develops a branch-management application in a language that is translated to bytecode. Its branches use computers running three different operating systems on two different processor types.
- (a)
State the name of the software that must be installed on each computer to run the bytecode.
1 mark
- (b)
Describe how translating to bytecode allows one version of the application to run in every branch.
3 marks
Practice all 41 in Augment
Free with an account. Every question has its markscheme, and Augment keeps the ones you got wrong so you can come back to them.
More questions in Computer fundamentals
- A1.1Computer hardware and operation
- A1.2Data representation and computer logic
- A1.3Operating systems and control systems
- A1.4TranslationThis page
More on Translation
Check your answers in Augment
A free account opens all 41 questions on Translation with their markschemes, and keeps a record of what you have marked.