Professional Documents
Culture Documents
Translators
Translators
A computer language is a mean of communication used to communicate between people and the computer. With the help of computer language, a programmer tells a computer what he wants it to do. All computer languages can be classified into two broad categories: a) LOW LEVEL LANGUAGE
Machine Language
Machine language is written in 0s and 1s. The circuitry of computer is wired in such a way that it immediately recognizes the machine language and converts it into the electrical signals needed to run the computer. For eg: 01110010101 01010 0011001101
NO NEED OF TRANSLATORS
DIFFICULT TO PROGRAM
ERROR PRONE
DIFFICULT TO MODIFY
Assembly Language
It is a language which substitutes letters and symbols for the numbers in the machine language program. A program written in assembly language uses symbols instead of numbers. These symbols are known as Mnemonics. The translator that translates an assembly language program into machine language is called an Assembler. For Eg: Add a , b
Easier to Understand and use Easy to locate and correct errors Easier to modify
It is a language which enable the programmers to write instructions using English words and familiar mathematical symbols rather than mnemonic codes in assembly language. High Level language is not understood by computer. So translators are needed which translate the HLL into machine language.
Advantages of HLL
Machine Independent Easy to learn and use Fewer Errors Lower Program Preparation Cost Better Documentation Easier to Maintain
Disadvantages of HLL
Lower Efficiency Lack of flexibility Needs Translators
Computer Translators
Computer translators are used to convert the Assembly Language or High Level Language into Machine Language. There are various Computer translators like: Assembler, Compiler and Interpreter.
Assembler
It translates
INPUT
OUTPUT
Assembler
Source Program
Compiler
It translates
the program written in High Level language into Machine Language. It compiles a complete program, detects errors and convert it into machine language.
High Level Language Program INPUT OUTPUT Machine Language Program Object Program
Compiler
Source Program
Interpreter
It translates
the program written in High Level language into Machine Language. a program line by line, detects errors and convert it into machine language.
It compiles