Chhetri AcademyGCSE & A level Paper Builder

3.3Programming languages and translators

Edexcel GCSE Computer Science (1CP2) · Computers

Practise Programming languages and translators. 11 exam-style questions on this subtopic, at up to four difficulty levels, with full mark schemes and a progress tracker. Free, no account needed.

Build a paper on this topic

▶ Watch videos on Programming languages and translators (Craig 'n' Dave Edexcel on YouTube) · Practise all of Computers

Quick recall

Cover the answers and test yourself. The app has these as flashcards that come back just before you'd forget them.

Define the term 'machine code'.
Binary instructions the CPU executes directly.
Part of a program is shown below.
LDA 30
ADD 31
STA 32
State the type of programming language used.
Assembly language (low-level)

Sample questions

Written for this site in the style of Edexcel exam questions. They are not taken from real past papers.

Question 1Easy3 marks
(a) Identify the translator that converts assembly language into machine code.[1]
  • Compiler
  • Interpreter
  • Assembler
  • Debugger
(b) Give two characteristics of high-level programming languages.[2]
Show the answer and mark scheme
(a) Answer: Assembler
(b) Answer: Any two from: English-like keywords; one statement → many instructions; portable; needs translating; easier to read and debug.
  • uses English-like keywords
  • one statement is translated into many machine code instructions
  • portable: programs can run on different types of processor once translated
  • must be translated (compiled or interpreted) before it can be run
  • easier to read, write and debug than low-level languages
  • has built-in functions and libraries
Question 2Medium4 marks
Explain two differences between a compiler and an interpreter.[4]
Show the answer and mark scheme
Answer: Compiler: whole program at once, produces an executable, runs fast. Interpreter: line by line, needed every run, stops at the first error.
  • a compiler translates the whole program into machine code before it is run
  • whereas an interpreter translates and executes the program one line (statement) at a time
  • a compiler produces an executable file that can be run without the compiler or the source code
  • whereas an interpreter must be present every time the program runs, and no executable file is produced
  • a compiler reports all the errors it finds after translating the whole program
  • whereas an interpreter stops at the first error it finds and shows where it is
  • compiled programs run faster because they have already been translated
  • whereas interpreted programs run more slowly because each line is translated every time it is run
Question 3Hard4 marks
A company sells a computer game. Explain why it distributes the game as a compiled executable file rather than as source code.[4]
Show the answer and mark scheme
Answer: It protects the code from copying and tampering, runs faster, and needs no translator on the player's machine.
  • users cannot see or easily copy the source code, so the company's intellectual property is protected
  • competitors cannot easily reuse the code in their own games
  • users cannot easily change the code, e.g. to cheat or to remove copy protection
  • the game runs faster because it has already been translated into machine code
  • users do not need to install a compiler or interpreter to play the game

Stuck? Get 1-to-1 help. Chhetri Academy tutors GCSE and A level Maths and Science online, with a free 30-minute trial lesson.

Book a free trial