AQA 8525 GCSE Computer Science · 3.2 Programming
Stretch tasks Classification of Programming Languages
Quiz Challenge
A quiz game against four computer players, then short and long written answers.
- Quiz Blitz12 questions against the clock
- Quick Fire4 short answers
- Big Think2 long answers
About 20 minutes
This or That
Pixel the cat asks 8 questions. Each has two answers: pick the right one.
- Two answers to every question
- A fish treat for every right answer
- Streaks win Pixel shades, then a party hat
About 4 minutes
Memory Match
Flip the cards two at a time to match each term card to its meaning card.
- 12 cards: each term has a meaning
- One peek at every card
- Combo points for pairs found in a row
6 pairs, about 4 minutes
Sort It
Sort each statement into the right box, like the tick-box tables in the exam.
- 11 cards to sort into 2 boxes
- Drag a card, tap a box or press its number
- Combo points for cards sorted in a row
11 cards, about 4 minutes
The games need JavaScript. Every question is below, with the answers at the end.
Read the lesson: Classification of Programming Languages
Classification of Programming Languages: the questions
Quiz Challenge, round 1: Quiz Blitz
Which of these is a low-level language?
- C#
- VB.NET
- Assembly language
- Python
What does one high-level statement usually become?
- Many machine instructions
- One machine instruction
- A single bit
- One mnemonic
Which translator works almost one to one?
- Interpreter
- Editor
- Assembler
- Compiler
An interpreter produces an executable file.
- True
- False
Which translator lets a program be sold without its source code?
- Assembler
- Debugger
- Compiler
- Interpreter
Where are low-level languages still used?
Tick 2.
- Embedded systems with very little memory
- Most websites
- School spreadsheets
- Word processors
- Device drivers
Which language is the binary that a processor executes?
- Machine code
- Assembly language
- Python
- Pseudo-code
Which word means a program can run on different types of computer?
Why does interpreted code run more slowly?
- It has more comments
- It is translated every time it runs, even inside loops
- It uses more RAM chips
- It is written in assembly
Assembly language still has to be translated before it runs.
- True
- False
Which of these is an assembly mnemonic?
- WHILE
- 01101001
- LDA
Order these from highest level to lowest level.
Number these 1 to 3.
- Assembly language
- Machine code
- Python
Quiz Challenge, round 2: Quick Fire
State one advantage of an interpreter over a compiler, and why it helps. [2 marks]
Explain why a compiled program only runs on one type of machine. [2 marks]
Explain why a programmer might use assembly language to write a device driver. [2 marks]
Explain what an assembler does. [2 marks]
Quiz Challenge, round 3: Big Think
Compare high-level and low-level languages. [6 marks]
A games company is choosing between a compiler and an interpreter. Explain which it should use while developing the game, and which when distributing it. [4 marks]
This or That: tick the right answer
Which runs on any machine with the right translator?
- Python source code
- Machine code for one processor
Compiling is slow. So what is fast?
- Finding errors
- The finished program
Is assembly language the same as machine code?
- Yes: both are binary
- No: it uses mnemonics and must be assembled
Who manages memory in a high-level language?
- The language, for you
- The programmer, by hand
Which gives complete, direct control of the hardware?
- High-level languages
- Low-level languages
Why do security analysts read machine code?
- It is often all they have
- It is easier than Python
Which translator must the user have to run the program?
- A compiler
- An interpreter
ADD, LDA and STA are...
- Assembly mnemonics
- Python keywords
Memory Match: match each term to its meaning
| Term | Meaning |
|---|---|
| A High-level language | 1 Binary the processor executes |
| B Machine code | 2 Mnemonics in place of binary opcodes |
| C Assembly language | 3 Close to human language |
| D Compiler | 4 Translates one statement at a time |
| E Interpreter | 5 Running on different types of computer |
| F Portability | 6 Whole program, translated once |
Sort It: tick one box in each row
High-level or low-level language?
| Statement | High-level | Low-level |
|---|---|---|
| Can be optimised precisely for speed | ||
| Quick to write, as one statement does a lot | ||
| Python, C# and VB.NET | ||
| Complete, direct control of the hardware | ||
| Portable: runs on any machine with a translator | ||
| Close to English, so easy to follow | ||
| Used for device drivers | ||
| Memory is managed for you | ||
| Machine code and assembly language | ||
| Written for one processor family | ||
| The programmer manages memory |
Answers
Round 1: Quiz Blitz
- Assembly language Low-level languages are machine code and assembly language.
- Many machine instructions That one fact explains why high-level code is quick to write and gives less direct control.
- Assembler Each assembly mnemonic becomes one machine instruction.
- False It executes as it translates, so no executable is made.
- Compiler Customers receive only the executable.
- Device drivers; Embedded systems with very little memory Wherever direct hardware control or tiny memory use is worth the effort.
- Machine code Everything else must be translated into machine code.
- portability High-level languages are portable. Low-level code is written for one processor family.
- It is translated every time it runs, even inside loops Every run, and every time round a loop, each line is translated again.
- True An assembler turns its mnemonics into machine code.
- LDA LDA, ADD and STA are short mnemonics for machine instructions.
- Python → Assembly language → Machine code High-level, then mnemonics, then pure binary.
Round 2: Quick Fire
- Errors are reported line by line, as they are met
- So faults are quicker to find and fix
Model answerAn interpreter reports each error as soon as the line is reached, which makes faults far quicker to find and fix during development.
- The executable is machine code for one type of processor
- A different type of machine needs its own compiled version
Model answerThe executable is machine code for one type of processor, so a different type of machine needs the program compiled again, as a separate version.
- It gives direct control of the hardware and its registers
- It can be optimised for speed and memory
Model answerA device driver must talk directly to specific hardware registers, which assembly language allows, and the code can be optimised precisely for speed and memory.
- It translates assembly language into machine code
- Each mnemonic becomes one machine instruction
Model answerAn assembler translates assembly language into machine code. The relationship is close to one to one: each mnemonic becomes one machine instruction.
Round 3: Big Think
- High-level: close to English, easy to read
- High-level: portable
- High-level: quick to develop in
- One high-level statement becomes many machine instructions
- Low-level: hard to read and slow to write
- Low-level: written for one processor family
- Low-level: complete control of the hardware
- Low-level: can be optimised precisely
Model answerHigh-level languages are close to English, so they are easy to read, and they are portable, running on any machine with a translator. They are quick to develop in, because one statement becomes many machine instructions, and memory is managed for you. Low-level languages are hard to read and slow to write, and they are written for one processor family. But they give complete, direct control of the hardware and can be optimised precisely for speed and memory, which is why they are used for device drivers and embedded systems.
- While developing: errors reported line by line make debugging quicker
- To distribute: compile to an executable
- The executable runs quickly
- Players need no translator, and the source code stays private
Model answerWhile developing, an interpreter is better, because it reports errors line by line as they are met, which makes debugging quicker. To distribute the game, a compiler should be used to produce an executable: it runs quickly, the players need no translator, and the source code is not given away, which protects the company's work.
This or That
- Python source code High-level code is portable. Machine code only runs on its own processor family.
- The finished program The compiled executable runs with no translation at all.
- No: it uses mnemonics and must be assembled Assembly replaces binary opcodes with mnemonics, which an assembler translates.
- The language, for you In low-level languages, managing memory is the programmer's job.
- Low-level languages That control is why they are still used for drivers and embedded systems.
- It is often all they have Malware arrives as an executable, without its source code.
- An interpreter Interpreted programs are translated on the user's machine every time they run.
- Assembly mnemonics Short mnemonics stand in for binary opcodes.
Memory Match
- A 3 High-level language: Close to human language
- B 1 Machine code: Binary the processor executes
- C 2 Assembly language: Mnemonics in place of binary opcodes
- D 6 Compiler: Whole program, translated once
- E 4 Interpreter: Translates one statement at a time
- F 5 Portability: Running on different types of computer
Sort It
- Low-level Can be optimised precisely for speed The programmer decides every instruction.
- High-level Quick to write, as one statement does a lot One statement becomes many machine instructions.
- High-level Python, C# and VB.NET All three are high-level languages.
- Low-level Complete, direct control of the hardware That is why low-level languages are still used.
- High-level Portable: runs on any machine with a translator High-level code is not tied to one processor.
- High-level Close to English, so easy to follow High-level languages are written for people.
- Low-level Used for device drivers Drivers must talk directly to hardware registers.
- High-level Memory is managed for you The language handles memory.
- Low-level Machine code and assembly language These are the two low-level languages.
- Low-level Written for one processor family Low-level code uses one processor's instruction set.
- Low-level The programmer manages memory Nothing is handled for you.