Download as ppt, pdf, or txt
Download as ppt, pdf, or txt
You are on page 1of 18

INTRODUCTION

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


b) HIGH LEVEL LANGUAGE

Low Level Language


Low level language is further divided into two parts: a) Machine language b) Assembly Language Low-level languages can be converted to machine code Lowwithout using a translators and the resulting code runs directly on the processor. A program written in a low-level language can be made to run lowvery fast, and with a very small memory footprint. Low-level languages are simple, but are considered difficult Lowto use, due to the numerous technical details which must be remembered.

Machine Language

Machine language is the only one language understood by computer.

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

Advantages of Machine Language


EXECUTION BECOMES FAST

NO NEED OF TRANSLATORS

Drawbacks of Machine Language


MACHINE DEPENDENT

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

Advantages of Assembly Language over Machine Language




Easier to Understand and use Easy to locate and correct errors Easier to modify

Disadvantages of Assembly Language




Machine Dependent Knowledge of hardware required Machine Level Coding

High Level Language

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

the program written in Assembly language into Machine Language

Assembly Language Program

INPUT

OUTPUT

Assembler

Machine Language Program Object Program

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

You might also like