Header Ads

Header ADS

Computer Programming Language-Types &Example

 

Computer Programming Language-Types &Example

Computer Programming Language-Types &Example

The programming language has been developed periodically for years. Each stage of development has made programming language more user-friendly, easier to use and stronger. Each step of improvement in the development of programming language can be referred to as a generation. Programming language, their performance, reliability and determination can be divided into five different generations. June

• First generation language (1GL)

• second generation language (2GL)

• Third generation language (3GL)

• Fourth generation language (4GL)

• Fifth generation language (5GL)


First generation: machine language

First-generation programming languages are also called lower-level programming languages because they were used to program computer systems in very low level abstracts, ie machine-level programs. Machine language, also referred to as the local language of the computer system, is the first generation programming language. In the machine language, a programmer can only issue instructions on the computer system in the form of binary. Therefore, machine language programming works with only two numbers. 0 and 1. Machine language programs are entere into the computer system by setting proper switches available on the front panel system. These switches are actually the device used to change the direction of the electric flow. The active status of the switch represents binary value 1 and the disabled status of the switch represents binary value, 0. Programs written in machine language are performed directly by the computer system CPU and therefore the language against modern programming does not need to use a translator in a machine language.

As seen in the figure, the instructions in the machine language are made up of only two parts, openings and operands. The opening part of the machine language instruction specifies the operation performed by the computer system, and the opening part of the machine language instruction specifies the data on which the operation will be performed. However, the Instruction format of any instruction in the machine language depends on the CPU architecture.

The advantage of the first generation programming language is:

★ They are translated free and can be directly edited by the computer.

★ Programs written in these languages use memory in a efficient way because it is possible to monitor each bit data.

★There are many difficulties in using the first generation programming language. ”A program in machine language is very difficult to develop.

★ Programs developed in these languages do not understand very easily, that they did not actually create these programs.

★ Programs written in these languages are prone to such frequent errors that they are very difficult to maintain.
★ The defects of programs developed in these languages cannot be detected and easily modified.

★ A programmer has to write a lot of instructions to perform even a common task in these languages. Therefore, we can say that these languages are the result of poor productivity when developing programs.

★ Developing programs in these languages are hardware dependent and thus they are non-portable. 


Second generation: Assembly language

Like first-generation programming languages, second-generation programming languages also belong to the category of low-level programming languages. The second generation of programming languages consists of assembly languages that use the concept of mnemonics to write programs. As with machine language, assembly language programmers must have internal knowledge of CPU registers and set instructions before creating a program.

The above code shows the use of the symbolic namie, mov in an assembly language instruction.
Using symbolic names, a value can be transferred to a specific CPU register. The use of symbolic names made these languages somewhat more user-friendly than the first generation programming languages. However, second-generation languages were still machine-dependent. Therefore, adequate knowledge of the internal architecture of the computer system is required while developing programs in these languages.

Unlike machine language programs, programs written in assembly language cannot be directly executed by the computer system's CPU because they are not written in binary form. Some process is required to convert assembly language programs into machine understandable form as resu. . An assembler is a translation program that converts assembly language programs into machine language instructions.

Assembler acts as an intermediary between assembly language programs and machine language programs. It takes as input a program written in assembly language and produces corresponding machine language instructions as output.

Following are some of the advantages of second generation programming languages:
★ Programs developed in these languages are easier to develop, understand and modify than first generation programming languages.

★ Error detection and correction is relatively easy in these languages compared to first generation programming languages.

Following are some disadvantages of second generation programming languages:

★Programs developed in these languages do not execute as fast as programs developed in machine language. This is because the computer system needs to convert these programs into machine language before they can run them.

★The programmer of these languages must have a thorough knowledge of the internal architecture of the CPU to create a program.

★ Assembly language programs like machine language programs still result in poor productivity.


★Third generation: High-level languages

Third generation programming languages were designed to overcome various limitations of first and second generation programming languages. Third and later generation languages are considered high-level programming languages because they enable the programmer to concentrate only on the logic of the program without thinking about the internal architecture of the computer system. In other words, we can also say that these languages are machine independent languages. Third generation programming languages are also quite user-friendly as they free the programmer from the burden of remembering operation codes and instruction sets while writing a program. Instructions used in third and later generation languages can be specified in English-like sentences, which are easy for a programmer to understand. The programming paradigm employed by most third-generation programming languages was procedural programming, also known as imperative programming. In the procedural programming paradigm, a program is divided into a large number of procedures, also known as subroutines. Each method has a set of instructions to perform a specific task. A method can be called by other methods when a program is executed by the computer system. Third-generation programming languages were considered domain-specific programming languages because they were designed to develop software applications for a specific field. For example, the third generation programming language, COBOL, was designed to solve a large number of problems related only to the business field.

Unlike assembly language, programs developed in third and later generation programming languages are not directly executed by the computer system's CPU. Translator programs are needed to convert these programs into machine language. There are two types of translation programs, namely, compilers and interpreters.

A program written in any high-level language can be converted into machine-level instructions by a compiler or interpreter. Both translation programs, compilers and interpreters, are used for the same purpose without a single point of difference. The compiler translates the entire program into a machine language program before executing any instructions. If an error occurs, the compiler generates an error message that is displayed on the screen. All errors must be corrected before recompiling On the other hand, the interpreter executes each statement as soon as it is translated into machine language instructions. Therefore, the interpreter performs instructions as well as translation simultaneously. If an error is encountered, execution is terminated after displaying the error message.

Following are some of the popular third generation programming languages:

★ FORTRAN

★Basic

★Cobol

★C/C++

Some of the advantages of third generation programming languages are given below:

★ Programs are easy to develop, learn and understand.

★Programs developed in these languages are highly portable compared to programs developed in first and second generation programming languages. So, we can also say that third generation programming languages are machine independent programming languages.

★Programs written in these languages can be created in much less time compared to first and second generation programming languages. This is due to the fact that third generation programming languages are quite user-friendly and provide built-in tools necessary for developing an application.

★Since programs written in these languages are less prone to errors, they are easier to maintain. •

★ Third generation programming languages provide more advanced documentation and debugging techniques than first and second generation programming languages.

Following are some disadvantages of third generation programming languages:

★ Compared to assembly and machine language programs, programs written in third-generation Ono programming languages are executed more slowly by computer systems.

★Programs written in these programming languages have a much higher memory requirement than programs written using assembly and machine languages.


★Fourth generation: very high-level languages

This generation of languages were considered very high-level programming languages. The process of developing software using third generation programming languages requires a lot of time and effort which affects the productivity of a programmer. Furthermore, most third-generation programming languages were domain-specific. Fourth generation programming languages were designed and developed to reduce the time, cost and effort required to develop a variety of software applications. Most of the fourth generation programming languages were general-purpose programming languages. This means that most of the fourth generation programming languages can be used to develop software applications related to any domain. During this generation, the concept of Database Management System (DBMS) also evolved greatly. Therefore, most programming languages of the fourth generation had database-related features for working with databases. This language has simple, English-like syntax rules. Since 4GLs are non-procedural languages, they are easier to use and therefore more user-friendly. Instead of specifying how to do it, we need to specify what we need.
The following are some of the fourth generation programming languages:
★SQL
★Xbase++
★CSS
Cold fusion
★Power Builder
Apart from being machine independent, other important advantages of fourth generation programming languages include the following:

★ Fourth generation programming languages are easier to learn and use than third generation programming languages. • These programming languages require less time, cost and effort to develop different types of software application.

★These programming languages allow efficient use of data by implementing various database concepts.

   ★Compared to third generation programming languages, these languages require less number of instructions to perform a specific task.
★ Programs developed in these languages are highly portable compared to programs developed in other generation languages.

Following are some disadvantages of fourth generation programming languages:

   ★ Compared to programs developed in previous generation programming languages, programs developed in 4GL are executed at a slower speed by the CPU.

★Compared to third generation programming languages, programs developed in these programming languages require more space in the computer system memory.

  

★Fifth Generation: The Language of Artificial Intelligence

This generation of programming languages mainly focuses on constrained programming. Constraint programming, which is somewhat similar to declarative programming, is a programming paradigm in which the programmer must specify the solution to be found within the constraints rather than specifying the method or algorithm to find the desired solution. The main fields in which fifth generation programming languages are employed are Artificial Intelligence (AI) and Artificial Neural Networks (ANN). AI is a branch of computer science in which computer systems are programmed to have human intelligence characteristics. It helps to make the computer system so intelligent that it can make decisions on its own while solving various complex problems. On the other hand, ANN refers to a network that is used to simulate the workings of a human brain. ANN is widely used in voice recognition systems, image recognition systems and industrial robotics.
Following are some fifth generation programming languages:

★ Mercury
★ Prolog
★OPS5

Two important advantages of fifth generation programming languages are as follows:

★ These languages can be used to search databases in a fast and efficient manner.

★ Fifth generation languages allow users to interact with computer systems in a simpler and simpler manner. Programmers can use common English words while interacting with computers and systems.

FAQ:

Examples of programming language?

★ Mercury
★ Prolog
★OPS5
★SQL
★CSS
★Power Builder
★ FORTRAN
★Basic
★Cobol
★C/C++

No comments

Powered by Blogger.