2.5.1 Languages

0.0(0)
Studied by 0 people
call kaiCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/31

Last updated 6:51 AM on 3/9/26
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai

No analytics yet

Send a link to your students to track their progress

32 Terms

1
New cards

Why are programming languages used?

To write instructions that computers can execute.

2
New cards

What two levels are programming languages categorised into?

  • High-level languages

  • Low-level languages

3
New cards

Python is an example of a ____________ language.

high-level

4
New cards

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.

5
New cards

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.

6
New cards

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

7
New cards

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.

8
New cards

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.

9
New cards

What are the two categories of low-level languages?

  • Machine code

  • Assembly language

10
New cards
<p>What is machine code?</p>

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.

11
New cards

What is opcode (operation code)?

The part of a machine code instruction that specifies the operation to be performed.

12
New cards

What is operand?

The part of a machine code instruction that specifies the data or memory address to be used by the opcode.

13
New cards

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.

14
New cards

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.

15
New cards

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

<ul><li><p>Reserved for specialist situations — like embedded systems and device drivers</p><ul><li><p>Direct hardware control and high efficiency</p></li></ul></li></ul><p></p>
16
New cards

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

17
New cards

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

18
New cards

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.

<ul><li><p>Computers can only understand and execute machine code.</p></li><li><p>Any program written in a HL or assembly language (source code) must be converted into machine code (object code/executable file).</p></li><li><p>A translator is a program that performs this conversion.</p></li></ul><p></p>
19
New cards

What are the three types of translators, and what do they translate?

  • Compiler — HLLs

  • Interpreter — HLLs

  • Assembler — Assembly language

20
New cards

What are compilers and interpreters used to do?

Translate high-level source code into low-level machine code.

21
New cards

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

22
New cards

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.

23
New cards

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

24
New cards

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.

25
New cards

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

26
New cards

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

27
New cards

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

28
New cards

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

<ul><li><p>Machine code does not need to be translated</p></li><li><p>Allow for direct control of hardware</p></li></ul><p></p>
29
New cards
  • 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.

<ul><li><p>Easier to create as the language is closer to English.</p></li><li><p>It provides a higher level of abstraction from the underlying processor — so you don’t have to deal with allocating memory.</p></li></ul><p></p>
30
New cards
  • 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

31
New cards
  • 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

32
New cards
<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>

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

Explore top notes

note
1.1 Understanding Social Problems
Updated 1102d ago
0.0(0)
note
Chapter 29- Fungi
Updated 1177d ago
0.0(0)
note
Vitamins and Minerals
Updated 723d ago
0.0(0)
note
Training Session 6
Updated 498d ago
0.0(0)
note
Chemical Changes
Updated 1348d ago
0.0(0)
note
1.1 Understanding Social Problems
Updated 1102d ago
0.0(0)
note
Chapter 29- Fungi
Updated 1177d ago
0.0(0)
note
Vitamins and Minerals
Updated 723d ago
0.0(0)
note
Training Session 6
Updated 498d ago
0.0(0)
note
Chemical Changes
Updated 1348d ago
0.0(0)

Explore top flashcards

flashcards
Unit 7: Period 7: 1890–1945
47
Updated 73d ago
0.0(0)
flashcards
Muscles of the Face
31
Updated 1214d ago
0.0(0)
flashcards
Unit 0.All
29
Updated 940d ago
0.0(0)
flashcards
Unit 1.1
23
Updated 207d ago
0.0(0)
flashcards
7Atelier B und 8entree
74
Updated 1163d ago
0.0(0)
flashcards
AP Wrld- Vocab Unit 7
25
Updated 703d ago
0.0(0)
flashcards
AP Psych Unit 1 Biology Part 1
52
Updated 530d ago
0.0(0)
flashcards
Unit 7: Period 7: 1890–1945
47
Updated 73d ago
0.0(0)
flashcards
Muscles of the Face
31
Updated 1214d ago
0.0(0)
flashcards
Unit 0.All
29
Updated 940d ago
0.0(0)
flashcards
Unit 1.1
23
Updated 207d ago
0.0(0)
flashcards
7Atelier B und 8entree
74
Updated 1163d ago
0.0(0)
flashcards
AP Wrld- Vocab Unit 7
25
Updated 703d ago
0.0(0)
flashcards
AP Psych Unit 1 Biology Part 1
52
Updated 530d ago
0.0(0)