Classification of programming language






Programming language are classified into two categories,
                
 1. Low level language 
                   i.  machine language
                   ii.assembly language
 
   2.High level language                                                      
                i.   Third generation language                                            
                ii.   fourth generation language                                       
                iii. fifth generation language                                                    

                


             High Level Language   
i.  Third generation language(3GL) :-  Third generation language(3GL) is a programming language that is machine dependent,i.e. programs written in that language can be compiled to run on many devices. Compare this to a first-generation programming language (machine code) , or a second generation programming language(assembly language).In those language, the program is written specifically for a certain type of CPU and instruction set. Third generation language(3GL) first appeared in the 1950s with the development of FORTRAN, ALGOL,and COBOL. These languages are considered “high-level” even though they are a much lower-level than high-level programming languages such as C++,C,JAVA, etc…

Advantage of third generation language(3GL) 
1. Easy to develop program because the instruction are written similar to English like. structure and mathematical expression. 
2. It is machine independent so, we can execute program in any type of computers. 
3. It is easy to modify and debug. 
4. Programmer does not require depth knowledge about hardware while programming. 

Disadvantage of third generation language(3GL) 
1. Program has to be translated into machine code so, translation may take extra time. 
2. They are less user friendly than 4th generation programming language.
3. Less efficient language than 4th generation programming language.`

ii. Fourth generation language(4GL) Fourth generation language (1970s-1990) are programming languages closer to humans languages than typical high-level programming languages . 4GLs are designed to reduce the overall time, effort and cost of software development. 4GL are language that consists of statement similar to statements to humans language. Fourth generation languages are commonly used in database programming and scripts example include Perl, PHP, python, Ruby, and SQL. 

 Advantage of fourth generation language 

1. It is efficient and user friendly language.
2. It is platform(operating system) independent. 
3. It help for rapid application development . Programmer can code and design program in short period of time. 

Disadvantage of fourth generation language

 1. Fourth generation program takes more memory therefore, it also take more time for execution of program.
 2. It is not suitable for hardware interfacing problem. 

iii. Fifth generation language(5GL) :- Fifth generation of computers starts in 1940 with vacuum tube circuitry and goes to the present day. Natural language such English, Nepali etc would be used in computers because they make computer more intelligent and user friendly. They are used particularly in the area of robotics, artificial intelligence and expert system. 5GL are programming languages that contain visual tools to help development of a program. Example of fifth generation languages include Mercury,OPS5,LISP and Prolog.


              Low Level Language
i. Machine language :- Machine language is the lowest-level language. Machine languages are the only languages understood by computers. Machine language are almost impossible for humans to use because they consist entirely of numbers. Programmers, therefore, use either a high-level programming language or an assembly languages.
                                                         Machine code or machine language is a set of instruction executed directly by a Computer's central processing unit(CPU). Each instruction performs a very specific
task, such as a load, a jump, or an ALU operation on a unit of data in a CPU register or memory. Every program directly executed by CPU is made up of a series of such instruction.

Advantages of machine language
  1. Programs written in machine language can be executed very fast by the computer. This is mainly because machine instruction are directly understood  by the CPU and no translation of the program is required.
  2. Efficient use of primary memory.
Disadvantages of Machine Language
  1. Machine Dependent:- Because the internal design of every type of computer is different from every other type of computer and needs different electrical signals to operate. The machine language also is different from computer to computer.
  2. Difficult to program:- Although machine language is easily  used by the computer.It is very difficult to write a program in this language. It is necessary for the programmer either to memorize dozen  of code  numbers for the command in the machine's instruction set or constantly refer to reference card.
  3. Difficult To Modify:- It is difficult to correct or modify machine language programs. Checking machine instruction to locate errors is very difficult and time consuming. Similarly, Modifying  a machine language program later is so difficult that many programmers prefer to code the new logic a refresh, instead 0f modifying the old program.
  4. Error prone:- A Programmer has to remember the opcodes, and must  keep track of storage location of data instruction for writing machine language programs. Hence,it becomes very difficult for him/her to concentrate fully on the logic of the problem.This frequently results in programming errors.

 ii .Assembly language :-   Assembly language are mnemonic representation of computer instructions. It is possible to program in machine code , but if it is a lot of work. You have to memorize or look up how each instruction is encoded in bits. An assembly language programs gets translated to machine code using a program called assembler. Instead of writing a string of commands like 011010101 to do one things, you can write something like “MOV AL, 61h”. ADD keywords is used for addition ,SUB keyword is used for subtraction , MUL keyword is used for multiplication etc. Example:ADD A,B. There are different assembly language for different CPU architecture but they are all more or less similar. 
 
Advantage of Assembly language

1. The symbolic programming of Assembly language is easier to understand and saves a lot of time   and effort of the programmer.
2. Assembly language is easier to correct errors and modify the instructions.
3. Assembly language has the same efficiency of execution as the machine level language. Because this is one-to-one translator between Assembly language program and its corresponding machine    language program.
4.  Memory Efficient.
5. Faster in speed. 

Disadvantage of Assembly language 

1. Long program written in such languages can not be executed on small sized computers.
2. It takes lot of time to code or write a program, as it is more complex in nature. 
3. Difficult to remember the syntax. 
4. Lack of portability of program between computers of different makes. 
5. No SDKs(System Development Kit). 

1 comment:

theengineerschoice01@gmail.com