KS4 - Programming Learner worksheet
Lesson 1 - Translators
Programming languages
Introduction
These questions have been designed to check your understanding of high-level
and low-level languages, with attention to translators.
You will need:
● Activity 2 ‘Lost in translation’ handout
Q1 Match the definition to the description:
High-level language Represented by 0s and 1s. This is
the only language that a computer
can execute.
Low-level language Executes the programs that
programmers write in high-level
languages.
Interpreter Translates a program into an
executable file that will work
independently from the source
code.
Compiler Written in machine code or
assembly language, this can be
quickly executed by a computer.
Translator Translates and executes a program
one line at a time.Like the source
code, it is always required for the
code to execute.
Machine code Written in formal, structured
English; this type of programming
language is easier for humans to
read, maintain, and debug.
Page 1 Last updated: 14-05-21
Q2 Write example code for each language listed below:
(Note for the assessor: A learner could write many variations here, but
there should be key characteristics for each example given)
Machine code 1010100101010101011001
Assembly 1 ADD 2
language
Any high-level Print(“Hello Chat”)
language
Q3 If a program written in assembly language uses 400 lines of code, how many
lines of machine code will there be?
Answe 400 Lines
r:
Q4 What is needed in order to translate assembly language to machine code?
Answe Assembler
r:
Q5 Machine code is specific to the processor is it written for (fill in the blank)
Q6 Who first conceived the idea of a compiler?
Answe Grace Hopper
r:
Q7 List three reasons why high-level languages are more suitable for
programmers than low-level languages?
Reason Easier to read as it is similar to English syntax
1
Reason Easy to write as it represents English and arithmetic more than
2 assembly code does
Reason Easier to correct errors as I can be read and written by a variety of
3 people
Page 2 Last updated: 14-05-21
Q8 Why are translators necessary?
It allows programmers to write in high level languages, which are in structured
English, so that it can then be converted to assembly then to machine code in
order for computers to run it. High level languages are easier for a wider
audience to access therefore translators help their code to run
Q9 Compare and contrast compilers to interpreters.
Interpreters translate and run the high level code into machine code line by line
which makes it easier to detect and fix errors within the code. This causes it to
take longer to run
Compilers translate the entire high level code into machine code at the same
time, allowing for it to be run quicker, however it is harder to debug the code.
Compilers however can be used in operating systems as they are quick to run
and the high level code cannot be accessed. Interpreters are better for
developers as they aid in fixing mistakes in the code
Explorer task
Create a mind map of all the key terms listed on the ‘Lost in translation’
handout.
Assembly
Machine Code
code Code written
Written in in mnemonics
1s and 0s and operands
that can to make code
directly be easier to
executed read. It is
by the translated
with an
Assembl
er High level
Each line language
Keyword
of Represents
s
assembly arithmetic
code = and English
one line syntax which
of is even
machine easier to
Page 3 read,
Last updated: 14-05-21
Compilers and maintain
Interpreters and debug
Compilers fully code.
translate the high Translates to