Friday, November 8, 2019

Programming languages and translators

Programming language :- 
     Language is a communication medium through which we can express our feelings, thoughts and emotions. 
 The language thorugh which we can communicate a computer is called computer language. Computer language are helpful for creating software and programs. 
Types of computer languages :-
* Low level language
*High level language. 

.........................................................
Low level language :- 
  Although compuger can be programmed to understand many diffrent computer languages, there is only language understood by the computer without using translation program. This language is called the low level language or machine language. Its normly written as strings of binary 1s and 0s. The low level language is far from humans and near to computer system. Computer can directly understand low level language.  The computer can execute program written in machine language very fast. 
High level language :-
High level language enable the programmer to write instructions using English words and familar mathematical symbols. So it becomes easier for him to concentrate on the logic of his problem rather than getting involved in programming details. It is easy for human and for from computer. So it os translated into many machine language instructions. A language translator are used to translate high level language into machine language.  C,  C++ , PASCAL,  COBOL are some examples of high level language. 
Procedural language :-
The introduction of more user friendly programming language resulted in a quantum leap in programmer convenience. These early languages were procedure languages. Which require programmers to solve programming problems using traditional programming logic. Example of procedurallanguage are COBOL & FORTRAN both introduced in late 1950s but still popular today. 
Object oriented language (OOPS) 
In procedural language the emphasis is on what is done. In object oriented language the emphasis is on the object of the action. The structure of oops makes programs easier to design and understand. Example of object oriented language include smalltalk, Java, and C++.
Database Query Language :-
These language are based on special kind of database called a relational database. Many database managements programs in today computer world claim to be relational but actually are not.  SQL,  MYSQL are example of database query language. 
Language translators
A software that is used to convert high level language into machine language is called language translator. 
There are following types of translator
*Compiler
*Interpreter 
*Assembler
-----------------------------------------------------
Compiler:-
Computer hardware can only understand the machine or hardware language. When we write a program in high level language it is necessary to convert the instructions into machine language. Thus a compiler is a translating program that translte the instructions of a high level language into machine language.  A compiler can translate only those source code which have been written in the language for which the compiler is meant. 
Interpreter :-
An interpreter is another type of translator used for translating high level language into machine code. It takes one statement of a high level language and translates it into machine code. Which is immediatly executed. 
Assembler :-
This is type of translator that work in the same way as compiler and interpreter work. It is a program. Which translate an assembly language program to its machine language. In short assembler are software which are used to convert assembly language into machine language

No comments:

Post a Comment

Data transmission modes

Data transmission modes :- Data transmission is the process of sending data from one device to another. It consists of sender,  reciever a...