What is programming language?

                                                            PROGRAMMING LANGUAGE

What is programming language in simple word?

A programming language is a Vocabulary and set a grammatical rules for instructing a computer or computing device to perform specific tasks. The term programming language usually refers to high-level language, such as BASIC, C, C++, COBOL, Java, FORTRAN, Ada, and Pascal. Before Learning any language , it is important to know about the various types of languages and their features. It is interesting to know what were the basic requirements of the programmers and what difficulties they faced with the existing language. The programming languages can be classified into two types :-

1.) Low level languages.

2.)High level languages.

Low level languages

The  languages in this category are the machine level language and assembly language.

a.) Machine level language :-

Computer can understand only digital signals, which are in the binary digits i.e. 0 and 1. So the instructions given to the computer can be only in binary codes. The machine language consists of instructions that are in binary 0 or 1. Computers can Understand only machine level language.

Writing a program in machine level language  is difficult task because it is not easy for programmers to write instructions in binary code. A machine level language program is error-prone and its maintenance is very difficult. Every computer has its own machine instructions, so the programs written for one computer are not valid for other computer.

b.) Assembly level language :-

The difficulties faced in machine level language were reduced to some extend by using a modified from of machine level language called assembly language. In assembly language instructions are given in English like word , such as M0V, ADD, SUB etc. it is easier to write and understand assembly program since a computer can understand only machine level language , hence assembly language program must be translated into machine language. The translator that is used for translating is called "Assembler".

                         High-level Language  

High-level languages are designed keeping in mind the features of portability i.e. these languages are machine independent. These are English languages , So it is easy to write and understand the programs of high level language. While Programming in a high level language , the programmer is not concerned with the low level details, and so the whole attention can be paid to the logic of the problem being solved. For translating a high level language program into machine language, compiler or interpreter is used. Every language has its own compiler or interpreter. some languages in the category are - FORTRAN(formula translator), COBOL(common business Oriented Language), C, C++, JAVA. 

                      TRANSLATORS

The machine can only understand the machine level language or binary language 0's and 1's. The language translator rectify the errors within the program through different ways.

There are three types of translator, they are as follow:



* Compiler : A compiler is a programming language processor that translate a whole program written in high level language into machine language program and vice-versa. A compiler program, generally runs(executes) much faster. 

object code/object program -- The program convert into machine language is object program.

Source code/ Source program -- The program written in high level language is source program. Its can be understood by humans easily.



* Assembler : An Assembler is a program that takes basic computer instruction and convert Assembly language into machine language and vice-versa.



*Interpreter A  interpreter is computer language processor that translates a program written in high level language into the machine level language but line-by-line(statement-by-statement) and carries out the specific action in sequence.  



A compiler and interpreter are used to convert the code of high-level language into machine language. Although both compiler and interpreters perform the same task but there is a difference in their working.

A compiler searches all the errors of the program and lists them. If the program is error free then it converts the code of program into machine code  and then the program can be executed by separate commands. An interpreter checks the errors of program statement by statement. After checking one statement, it converts that statement into machine code and then executes that statement. The process continues until the last statement of program or an erroneous statement occurs.

 

Comments

Popular posts from this blog

18 Amazing programs in C.