0 votes
35 views
in Computer by (45.8k points)
closed by

What is a programming language? Write the classification of programming language.

Or

Explain the following:

1. Low-Level Language

2. High-Level Language

Or

What ‘Generation of programming language? Explain.

1 Answer

+1 vote
by (45.4k points)
selected by
 
Best answer

Programming Language: Language is a means of communication. Whenever we want to communicate with com- puter system, we need to do so using a language which is acceptable and understood by a computer. A language which is used to accomplish a task and write a solution to a given problem in the form of a program is known as the programming language. A programming language has its own set of characters, terms, instructions, Commands, syntaxes and guidelines to use these commands. A program is always written following these rules and guidelines.

Classification of Programming Languages: Programming languages can be classified on the basis of generations of computers as follows:

This classification is according to the generic upgradations in the languages as per time. As time passed by, every language made significant improvements and showed some additional features. Similar kinds of classification of programming languages can be written as following on the basis of characteristics and features of languages.

The above classification is in increasing order of developmental phases of languages too. Low-Level Language: The languages that were used in the first-generation and early second generation are called as low-level languages. They directly used computer memories and other storage hardware like registers to write programs. These languages were highly hardware dependent or machine-dependent. Programs written for one kind of hardware platform cannot be used on some other machine.

Low-level languages are further divided into the following two categories :

1. Machine Language

2. Assembly Language

1. Machine Language: As the name suggests, it used the data in writing programs which were directly understood by the computer. A computer can only accept and work on electronic signals. These electronic signals are actually a presence or absence of electronic current in a circuit. The presence of a pulse in a circuit is denoted by 1 and absence is symbolised by ‘O’. These are the only two digits which are used by a computer system and they are known as Binary digits (or abbreviated as Bits). A language that uses these two binary digits to write computer program is known as machine language. A program written in machine language comprises instructions in the form of a series of 1’s and 0’s.

Machine language instruction is divided into two parts:

  • Opcode
  • Operand (Address part)

OpCode: This is the first part of an instruction which tells to the computer, what is to be done or which operation is to be performed.

Operand: This is the second part of a machine language instruction which tells the address and location of data on which operation is to be performed.

2. Assembly Language: Assembly language was an advancement over machine language. It is considered as a low-level language of the second generation. In this language, binary representations for various types of data are replaced by some codes. These codes are known as ‘Mnemonics’. In assembly language, there are predefined mnemonics for an opcode, operands, registers (memory locations) etc. They collectively form an assembly language program.

High-Level Languages: Languages that were developed after machine language and assembly languages were put under the category of high-level languages.

Characteristics of High-Level Languages:

1. High-level languages use simple English words and commonly used mathematical symbols. This feature of high-level language makes it easier for programmers to write programs in it.

2. Programs written in high-level languages are highly readable simply by looking at a program. Any computer literate can understand the objective of the program. These languages provide better documentation facility in programs.

3. High-level languages are procedure oriented. It means that they concentrate more on procedures followed to solve any given problem.

4. Debugging of programs written in high level languages is much easier and fast as compared to assembly language.

5. Programs written in high-level languages are machine-independent. It means that these programs can run on a wide variety of hardware platforms by making slight modifications if needed.

6. High-level languages are translator based languages. This translator could either be an interpreter or a compiler.

Translator Based Languages: High-level languages can also be called as translator based languages. As explained earlier, the computer only understands machine language [le., language of 0’s and 1’s) and any other form of instruction given to it needs to be translated into machine language. High-level languages generally use simple English words and phrases which must be translated into its machine-level equivalents before execution. Therefore, for every high-level language, a separate translator is essential.

Translator: It is a kind of system software which converts a program written in high level language into machine language. This machine language code is actually executed by the computer to achieve results.

Translators can be divided into following two categories and accordingly languages are also classified as either :

1. Interpreter based language

2. Compiler based language

1. Interpreter: It is a translator for high level languages. It translates every single instruction linewise and then executes it. This process continues until the end of the program. If it encounters any error, it is informed to the user immediately. Until an error is removed, the interpreter does not proceed in a forward direction. Thus, we can say that every single line of a program (also known as source program) is checked for errors, translated and executed sequentially. Basic is an interpreter based language.

2. Compiler: It is a translator for converting programs written in high level language into machine language. Its major function is the same as that of interpreter but it works differently. It scans the entire program and lists all errors at a time. Until or unless programmer rectifies all errors, program is not translated into machine code. On successful removal of all errors, object code is created. This object code is executed to obtain the desired result. The original program before the compilation process is called a source program. Some compiler based languages are. ‘C\ C++, JAVA, COBOL, PASCAL, FORTRAN etc.

Fourth Generation Languages (4 GLs): These are a group of languages that made problem solving further easier than what was available in high level languages. High level languages are procedure-oriented languages, le., they focus more on the way of solving a problem. 4 GLs are a category of languages that focus more on the objective of the given problem than on the ways and means to solve it. These languages were designed in view of managing databases (Database is a collection of similar types of records).

Welcome to Sarthaks eConnect: A unique platform where students can interact with teachers/experts/students to get solutions to their queries. Students (upto class 10+2) preparing for All Government Exams, CBSE Board Exam, ICSE Board Exam, State Board Exam, JEE (Mains+Advance) and NEET can ask questions from any subject and get quick answers by subject teachers/ experts/mentors/students.

Categories

...