1/31
Name | Mastery | Learn | Test | Matching | Spaced | Call with Kai |
|---|
No analytics yet
Send a link to your students to track their progress
Why are programming languages used?
To write instructions that computers can execute.
What two levels are programming languages categorised into?
High-level languages
Low-level languages
Python is an example of a ____________ language.
high-level
What is a high-level language?
They are designed to be easy for humans to read, write, and understand.
They use instructions that are similar to structured English.
What are the characteristics of a high-level language? (4)
Utilises English-like keywords.
Provides a higher level of abstraction from underlying computer hardware.
One instruction can translate into many machine code instructions.
Code is portable — it can be run on computers with different hardware and processors after being translated.
What are the advantages of high-level languages? (4)
Easier to write, read, and debug — due to English-like syntax
Portable between different hardware
Higher abstraction from hardware — no need to manage memory directly
Less code to write — one instruction represents many machine code ones
What are the disadvantages of high-level languages? (4)
Slower to execute compared to LLL.
Must be translated into machine code before the processor can execute it.
Less memory-efficient than LLL.
Can be less efficient than code originally written in machine code.
What is a low-level language?
A language that is close to (or is) machine code.
Provides little to no abstraction from the computer’s hardware.
What are the two categories of low-level languages?
Machine code
Assembly language

What is machine code?
The lowest level of LLL.
It is represented by binary or hexadecimal numbers.
The only language a processor can directly understand and execute.
Instructions consist of an opcode and an operand.
What is opcode (operation code)?
The part of a machine code instruction that specifies the operation to be performed.
What is operand?
The part of a machine code instruction that specifies the data or memory address to be used by the opcode.
What is assembly language?
Sits between machine code and HLLs
It used mnemonics to represent machine code instructions.
One-to-one relationship
One assembly instruction translates directly into one machine code instruction.
What are the characteristics of a low-level language?
Code is specific to one type of processor — not portable.
Allows for direct control and manipulation of hardware, memory, and processor registers.
Requires lots of intellectual effort to write and understand.
What is the modern usage of low-level languages?
Reserved for specialist situations — like embedded systems and device drivers
Direct hardware control and high efficiency

What are the advantages of low-level languages? (4)
Faster and more efficient to execute as it is close to the hardware
Memory-efficient — using less memory
Gives more control over hardware, including direct control of registers
Machine code does not need to be translated
What are the disadvantages of low-level languages? (4)
Harder to read, write, and maintain due its complexity
Not portable — code is specific to a particular processor
Required the programmer to understand the processor’s architecture
Lots of intellectual effort is needed to use it
What is the purpose of translators?
Computers can only understand and execute machine code.
Any program written in a HL or assembly language (source code) must be converted into machine code (object code/executable file).
A translator is a program that performs this conversion.

What are the three types of translators, and what do they translate?
Compiler — HLLs
Interpreter — HLLs
Assembler — Assembly language
What are compilers and interpreters used to do?
Translate high-level source code into low-level machine code.
What is a compiler?
Translates the entire source code file at once
It checks the entire program for syntax errors and reports them all at the end of the process
The code doesn’t run until all syntax errors are corrected
If translation is successful it creates a standalone executable file
What are the characteristics and benefits of compilers?
The executable file runs very quickly because no further translation is needed at runtime.
An executable file can be distributed and run on other computers without the need for the compiler or the original source code.
They can optimise the code to make it run faster and use less memory.
Reports all errors at once after attempting to compile the entire program.
What are the drawbacks of compilers?
Can be harder to debug because the program does not run if there are syntax errors — all errors are reported at once
Any change to the source code requires the entire program to be recompiled — can be time-consuming
The generated executable file is specific to a particular processor — will not run on others
What is an interpreter?
Translates and executes the source code line-by-line.
It reads a line, converts it to machine code, executes it, and then moves to the next line.
If there is a syntax error, it stops execution and reports the error.
What are the characteristics and benefits of interpreters?
Programs runs up to the point of an error — makes it easy to identify the exact location of the error.
Changes to the code can be tested immediately without a long recompliation process
Interpreted languages are more portable — the source code can be run on any machine that has the correct interpreter installed
What are the drawbacks of interpreters?
Interpreted programs run more slowly because each line must be translated every time the program is executed.
Interpreter and source code must be present on the computer every time the program is run.
The source code must be distributed — allows others to copy or modify it.
Code is not optimised
Compilers vs. Interpreters:
Feature | Compiler | Interpreter |
|---|---|---|
Translation Process | Translates the _________ _________ at once, before __________. | Translates and executes the program ______________. |
Output | Creates a standalone ___________ _____ (________ code). | Does not produce an ___________ _______. |
Execution Speed | _________ execution after the initial compilation. | ________ execution, as translation occurs during __________. |
Error Handling | Reports all _________ _______ at the _____ of compilation. Program won't run. | Stops at the first _________ ______ encountered. |
Debugging | Can be more difficult as errors are not identified during __________. | Easier to debug, as ________ are pinpointed as they occur. |
Runtime Requirements | No __________ needed to run the executable file. | Both the __________ and _______ ________ are needed to run the program. |
Source Code Protection | _______. The source code is not distributed with the executable. | ______. The source code must be distributed. |
Portability | Executable is _______________. | Source code is ________ if an interpreter exists for the platform. |
Optimisation | Can perform code optimisation for _______ and __________ _________. | Does not _________ code. |
entire program
execution
line-by-line
executable file
object
executable file
Faster
Slower
runtime
syntax errors
end
syntax error
runtime
errors
translator
interpreter
source code
High
Low
platform-specific
portable
speed
memory efficiency
optimise
Give two reasons why some programs are written in a low-level language. [2]
Machine code does not need to be translated
Allow for direct control of hardware

A programmer uses a high-level language and an Integrated Development Environment (IDE) to create a computer game.
Describe two advantages to the programmer of using a high-level language instead of a low-level language. [4]
Easier to create as the language is closer to English.
It provides a higher level of abstraction from the underlying processor — so you don’t have to deal with allocating memory.

A programmer uses a high-level language and an Integrated Development Environment (IDE) to create a computer game.
The IDE includes a translator, such as a compiler or an interpreter.
Identify whether each statement describes the use of a compiler, an interpreter, or both. [3]
Statement | Compiler | Interpreter | Both |
Translates high-level code to low-level instructions. | |||
Produces an executable file. | |||
Program needs to be translated every time it is run. |
Both
Compiler
Interpreter
The table contains four statements about programming languages.
Identify whether each statement describes a low-level programming language or a high-level programming language. [4]
Statement | Low-level | High-level |
The same language can be used on computers that use different hardware | ||
It allows the user to directly manipulate memory | ||
It allows the user to write English-like words | ||
It always needs to be translated into object code or machine code |
High-level
Low-level
High-level
High-level
![<p>Complete the description of programming languages and translators by writing the correct term from the box in each space. [5]</p><ul><li><p>Jack writes his program in a ........................................ language. This needs to be translated into assembly or machine code before it can be executed. This is done using a translator. </p></li><li><p>One type of translator is an interpreter. This converts one line of code and then executes it, before moving to the next line. It ........................................ when an error is found, and when corrected continues running from the same position. This translator is helpful when debugging code. </p></li><li><p>A second type of translator is a compiler. This converts all of the code and produces an error report. The code will not run until there are ........................................ errors. </p></li><li><p>The ........................................ file produced can be run ........................................ the compiler.</p></li></ul><p></p>](https://assets.knowt.com/user-attachments/0970d4f9-5738-4eef-a247-b9ba809b89cf.png)
Complete the description of programming languages and translators by writing the correct term from the box in each space. [5]
Jack writes his program in a ........................................ language. This needs to be translated into assembly or machine code before it can be executed. This is done using a translator.
One type of translator is an interpreter. This converts one line of code and then executes it, before moving to the next line. It ........................................ when an error is found, and when corrected continues running from the same position. This translator is helpful when debugging code.
A second type of translator is a compiler. This converts all of the code and produces an error report. The code will not run until there are ........................................ errors.
The ........................................ file produced can be run ........................................ the compiler.
high-level
stops
no
executable
without