

Programming Language
Unit 6 Summary - Part 2



Programming language is used by programmers to create software



Programming Language Types

High level programming language
It's easier for humans to understand, widely used by programmers, but it needs a translator to translate it to machine code.

Low level programming language
It's called assembly language (which is near machine code).
It's hard for humans to understand, but it's a language that computers understand.

The Difference Between
Assembly Language vs Machine Code
-
Assembly language uses mnemonics/ short meaningful commands, it usually has 3 letters.
-
Assembly language must be translated.

-
Machine code is in binary.
-
Machine code can be directly executed by CPU.





Assembler vs Interpreter vs Compiler

-
Assembler uses machine code.

-
Interpreter uses high programming language and interprets your coding. It works slowly, and stops if there's an error. It's easy to fix your coding if you make a mistake with an interpreter.

-
Compiler uses high programming language and has its own executables, so it takes time to build. It runs fast, and if there's an error it tells you. It's hard to fix a compiler.



Oxford AQA IGCSE 2019

05.1.
Figure 4 shows three computer programs. One has been written in a high-level language, one in assembly language and one in machine code.
Figure 4

Tick (√) one box to indicate which program in Figure 4 has been written in assembly language.

Answer:
C

05.2.
Explain two differences between assembly language and machine code. [2 marks]
__________________________________________________________________________________
Alternative answers:
-
Assembly language commands written using mnemonics / short meaningful commands, while machine code instructions written in binary.
-
Machine code commands can be directly executed by processor/CPU, while assembly language commands must be translated (before they can be executed).
-
Assembly language allows the use of labels for branching/jumps, while machine code uses memory addresses for branching/jumps.
05.3.
Explain why most computer programs are written in high-level languages. [2
marks]
__________________________________________________________________________________
Alternative answers:
-
Faster development time.
-
Code is easier to understand / easier to learn.
-
Code is easier to debug / easier to avoid/spot input errors.
-
Portability of code // code not processor-oriented.
-
Availability of additional features (over low-level languages); examples: data structures, subroutines, built-in functions, libraries.
-
high-level programming expertise more widely available.
-
high-level languages can be problem-oriented.

Oxford AQA IGCSE Specimen Paper

02.1.
State the name of a high-level programming language. [1 mark]
__________________________________________________________________________________
Alternative answers:
-
Python,
-
(Visual) Basic,
-
C#,
-
Java,
-
Pascal
-
etc.

02.2.
Explain the main differences between high-level and low-level programming languages. [3 marks]
__________________________________________________________________________________
Alternative answers:
-
HLL problem-oriented;
-
LLL processor/machine-oriented;
-
HLL uses English-like keywords;
-
LLL uses mnemonics;
-
HLL provides data structures (A example eg arrays);
-
HLL provides mechanism for calling subroutines;
-
HLL code must be translated before it can be executed;

Oxford AQA IGCSE Mock Paper

04.1.
Figure 4 shows three computer programs.
One has been written in a high-level language, one in assembly language and one in machine code.
Figure 4

Shade in one circle to indicate which program in Figure 4 has been written in machine code. [1 mark]


04.2.
A program written in a high-level language can be translated into machine code using either a compiler or an interpreter.
Explain two differences between a compiler and an interpreter. [2 marks]
__________________________________________________________________________________
04.3
Describe a situation for which it would be more appropriate to use an interpreter than a compiler to translate a high-level program.
Explain why an interpreter would be more appropriate. [2 marks]
__________________________________________________________________________________

