You are on page 1of 3

GCSE CS (2210) / IGCSE CS (0478) P1 NOTES BY AWAB AQIB

CHAPTER 1.3: HARDWARE AND SOFTWARE


1.3.7 High Level & Low Level Languages

HIGH LEVEL LANGUAGES

-High-level source code contains easy-to-read syntax


-That is later converted into a low-level language, which can be run by a CPU
-The instructions are close to English language and easy to write
- works on many different machines/operating systems (portable)
-Python, Java, C++, Pascal are some examples
-High-Level code example:

print (“Hello world!”)


a=2
sum = print (a + a)

LOW LEVEL LANGUAGES

-A programming language that provides little or no abstraction of programming concepts


-Is very close to writing actual machine instructions
-Assembly and machine code are some examples
-uses up less memory
- work directly on registers/CPU
-can increase the speed of processing a program / executes instructions faster
-direct access to computer processor

-Machine Code example:


1010010101 1000000 101010100

HIGH LEVEL VS LOW LEVEL LANGUAGES


High Level Language Low Level Language
-easier to write code as is made up of -can work directly on memory locations
English like statements -can be executed faster
-easier to modify code as is made up of -translated programs require less memory
English like statements
-portable language code
-only need to learn a single language
that can be used on many computers
-supports built-in libraries which saves time
rewriting functionalities
-no need to manipulate memory addresses
hence specialist knowledge isn’t required
-easier to debug code

awabaqibb@gmail.com https://www.youtube.com/c/awabaqib/
GCSE CS (2210) / IGCSE CS (0478) P1 NOTES BY AWAB AQIB
CHAPTER 1.3: HARDWARE AND SOFTWARE
1.3.7 High Level & Low Level Languages

TYPES OF TRANSLATORS FOR CODE

1. Compiler
-A compiler is a software program that transforms high-level source code
-that is written by a developer in a high-level programming language
-into machine code as a complete unit / at once
-produces an executable file in machine code
-a report of errors is generated
-optimizes the source code to run efficiently
Advantages of using a Compiler
-compiled program can be executed without a compiler
-therefore, allows faster execution
-provides an executable file
-file is machine independent and can be used on any hardware
-allows to just send machine code
-produces an error report
-no need for a compiler to run the executable file, user can run directly

2. Interpreter
-An interpreter translates high-level instructions into an intermediate form
-line by line, which it then executes
-stops the execution of a program as soon as it encounters an error
-In contrast, a compiler translates high-level instructions directly into machine language.
-slow speed of execution of program loops

Advantages of using an Interpreter


-Advantage of interpreter over a compiler is portability since its specific to the computer.
-Easy to identify where an error is / to debug a program
-Stops if it finds an error
-Will only continue when error is fixed

awabaqibb@gmail.com https://www.youtube.com/c/awabaqib/
GCSE CS (2210) / IGCSE CS (0478) P1 NOTES BY AWAB AQIB
CHAPTER 1.3: HARDWARE AND SOFTWARE
1.3.7 High Level & Low Level Languages

SUMMARY OF COMPILER AND INTERPRETER

3. Assembler

-An assembler is a type of computer program that translates software programs


-written in assembly language into machine language’s code and instructions
-that can be executed by a computer
-is specific to a computer hardware and often used to write drivers for hardware
-converts the code into machine code in one go like compiler
-uses mnemonic codes

-example of Assembly code:


INP X
STA Y
MOV AX, BX

awabaqibb@gmail.com https://www.youtube.com/c/awabaqib/

You might also like