Translator Program PDF
Translator Program PDF
1. TRANSLATOR PROGRAM
Translator programs are system software which converts the high-level language instructions into
machine code. It converts instructions written in one language to another without changing the initial
logic in terms of computer language.
The high-level languages are needed to convert into a low-level language because the computer can't
understand commands like "int i = 10". The processor only understands a very limited set of instructions,
and any high-level language code needs to be translated into a set of machine-readable instructions.
1. INTERPRETER
It is a high-level language translator that converts individual high-level computer language program
instructions (source code) into machine instructions. It translates and executes each statement line-
by-line during the running of the program.
…………………
………..
……………
………
Interpreter 1010100010
……………………. 1101101001 Process Output
………… Software
……………….
…..
ADVANTAGES OF INTERPRETER
Interpreter is easier to use for beginners.
Errors are immediately displayed.
Each error is corrected separately until program is able to be executed.
It can be interpreted, change or start again while program is running.
DISADVANTAGES OF INTERPRETER
Every time it has to be translated every time it is executed.
The process of translation using interpreter is very slow.
Interpreted programs can only run on computers that also have the interpreter.
1 Page
Website: sirtanviriqbalkhan.tk
Facebook: www.facebook.com/tanvirik
Email: [email protected]
PHONE: +923212490887
SYLLABUS CODE: 22101/01 Author: Tanvir Iqbal Khan
O’ LEVEL COMPUTER SCIENCE Subject Specialist – O’ Level Computer Science
A’ Level Computing
2. COMPILER
A software program that converts (translates) a complete software program written in high-level
language SOURCE CODE (such as PASCAL or FORTRAN) into machine language. The entire source
code is edited, compiled, and run at one time as compared to an INTERPRETER that is run one line at
a time.
…………………
………..
……………
………
Compiler 1010100010
……………………. 1101101001 Process Output
………… Software
……………….
…..
DISADVANTAGES OF COMPILER
Translated program cannot be change without going back to the original source code.
Compiled program cannot be copied.
3. ASSEMBLER
A software program that converts (translates) each symbolic instruction written in ASSEMBLY
LANGUAGE into the MACHINE LANGUAGE (binary code) of a computer.
Assembler is a computer program which is used to translate program written in Assembly Language
in to machine language. The translated program is called as object program. Assembler checks each
instruction for its correctness and generates diagnostic messages, if there are mistakes in the
program. Various steps of assembling are:
…………………
………..
……………
………
Assembler 1010100010
……………………. 1101101001 Process Output
………… Software
……………….
…..
Website: sirtanviriqbalkhan.tk
Facebook: www.facebook.com/tanvirik
Email: [email protected]
PHONE: +923212490887
SYLLABUS CODE: 22101/01 Author: Tanvir Iqbal Khan
O’ LEVEL COMPUTER SCIENCE Subject Specialist – O’ Level Computer Science
A’ Level Computing
ADVANTAGES OF ASSEMBLER
As close to the machine as possible - each assembly instruction corresponds directly to a
machine instruction.
Depending on the skill of the programmer, assembled programs can be extremely fast.
Compiled assembly programs are usually rather small.
DISADVANTAGES OF ASSEMBLER
Difficult to learn.
Errors can be difficult to track down.
Often cause the program (or machine) to crash unpredictably.
Usually not portable to other computer systems.
o SOURCE CODE
Source code is what a programmer writes, but it is not directly executable by the computer. It must
be converted into machine language by compilers, assemblers or interpreters.
o OBJECT CODE
The code produced by a compiler or assembler from the source code, usually in
the form of machine language that a computer can execute directly, or sometimes
in assembly language. Object files contain compact code, often called "binaries"
…………………
………..
……………
………
Translator 1010100010
…………………….
………… Program 1101101001
……………….
…..
3 Page
Website: sirtanviriqbalkhan.tk
Facebook: www.facebook.com/tanvirik
Email: [email protected]
PHONE: +923212490887