0% found this document useful (0 votes)
9 views8 pages

Lesson 2

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views8 pages

Lesson 2

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 8

IT CAPS Content Development

Grade 11
Term 1 – Lesson 2

System software
Compilers & Interpreters – Programming
Language
Compilers & Interpreters

DEFINITION OF AN
DEFINITION OF A COMPILER INTERPRETER
• A process that translates a • A process that translates and
program in one language executes both the source code
(source code) into another and input data at the same
language (object code) time
Error Source
messages program

Source Source
program program
Source
program
Source Source Source
program program program
The translator

• When two people try to communicate with each other but cannot
understand because they both speak different languages they need the
help of a third person who understands both languages. This third
person is known as a translator.

• All software packages or programs are written in high-level languages,


e.g. C++, Visual basic, Delphi, Java etc.

• For the computer to be able to carry out the instructions (source code),
the high-level languages must be translated into machine language (e.g.
00111101) before the computer can understand and execute the
instructions so the program can run.

• The translation of high-level languages to machine language is


performed by a translator.
More on the translator
• The source code - instructions which will enable the program to run

• For the program to run the compiler or interpreter will translate the
sources code into machine language .
(e.g. 01110001)

• The computer will then load the machine code and run the program.
INTERPRETER

• The interpreter is used to interpret the program and then execute the
source code without compiling it first.

• The interpreter will read each line of code and convert it into machine
code (0 & 1s) and then execute it line by line
until the end of the program.

• An interpreter translates the source code


directly and then executes it line by line.

• Example of interpretered-based
language is: BASIC.

• High-level languages - Python, Delphi, Java.


COMPILER

• The source code is converted into machine code e.g. (0s & 1s)

• The whole program is loaded into the memory of the computer


and the program instructions begin executing

• If the compiler encounters any errors


in the source code the program
will bomb out

• Examples are - High-level


languages e.g. C++, Delphi, Java etc.
More on the compiler
• A compiler translate the text written in a computer language (the
source code) into the output called object code.

• This will create an executable program.

• The compiler translates the source code from a high-level


programming language to a lower level language e.g. machine
language.
Worksheet

Questions & Answers

System software
Compilers & Interpreters – Programming
Language

You might also like