Community resourceWorksheet

1CP2-P-8.3 Compilers interpreters and translation

Part 3 of 5 · 1CP2-P-8 · Environment, languages and intellectual property

A processor cannot directly execute high-level source code. A compiler translates the whole program and normally produces executable object code before it runs. An interpreter translates and executes source statements during each run. Both can report errors; their workflow differs.

Students will:

  • distinguish source code, object code and machine code
  • compare compiler and interpreter workflows
  • separate translation characteristics from possible advantages
  • choose and justify a translator for a context

Inside: 5 explanation cells, 1 fill-in-the-blanks cell, 2 multiple-choice questions and 4 written answers. 14 marks, about 45 minutes.

Series: 1CP2-P-8 · Environment, languages and intellectual property, part 3 of 5.

Shared by Coding PathwayVerified teacher

  • 12 cells
  • About 45 minutes
  • CC BY-SA 4.0
  • Shared 17 Aug 2026

Preview

The whole resource, exactly as a class sees it. Answers and marking are held back.

Compilers, interpreters and translation

A processor cannot directly execute high-level source code. A compiler translates the whole program and normally produces executable object code before it runs. An interpreter translates and executes source statements during each run. Both can report errors; their workflow differs.

1. Compare the routes

Compiler and interpreter translation routessource codehuman-readable formcompilerwhole program firstinterpretertranslate and executeexecutable producedrun later without source translatorprogram runsinterpreter needed each time

A compiled executable can be distributed without the source translator and can run repeatedly after translation. An interpreted program needs the interpreter and source representation when it runs, making step-by-step testing convenient. Do not claim one route always finds every error or is always faster in every circumstance.

Fill in the blanks3 marks
A gap 1 translates the whole program before normal execution. An gap 2 translates and executes during a run. The processor ultimately receives gap 3 instructions.
  • compiler
  • interpreter
  • machine-code
  • source
Multiple choice1 mark

Which translator normally creates a separate executable before the program is run?

  • ACompiler
  • BInterpreter
  • CText editor
  • DOperating system scheduler

2. Match workflow to context

A company distributing a closed-source desktop application may compile it so users run an executable and do not need the translator. During classroom development, an interpreter can give immediate feedback while statements are executed. These are contextual reasons, not universal advantages.

Written answer2 marks

Describe two characteristics of a compiler.

State what it translates and what it produces; do not give only advantages.

Students type their answer here.

Written answer2 marks

Describe two characteristics of an interpreter.

Refer to translation during each run.

Students type their answer here.

Multiple choice1 mark

Which claim is unsafe?

  • ABoth translators can report source-code errors
  • BAn interpreter is involved each time interpreted source runs
  • CA compiler guarantees that a program has no logic errors
  • DCompilation happens before normal execution
Written answer3 marks

A developer will run the same finished program many times on machines without a translator installed. Explain why compilation may suit this situation.

Link the executable to repeated use.

Students type their answer here.

Written answer2 marks

Explain one difference between compiler and interpreter workflows.

Make one direct paired comparison.

Students type their answer here.

Examination method

Keep three ideas separate: source-code level, translation route and program behaviour. A compiler can accept a program that still contains a logic error because translation checks form, not whether the result meets the user's intention.

Route forward

You can distinguish language level from translator type and respond to ‘characteristic’ questions directly. Next you will examine intellectual property and how software licensing controls permitted use.