COMPUTER PROGRAMMING LANGUAGES
Generally, a language is considered as the medium of communication among people. Likewise, to communicate with computer systems, we use computer programming languages. Usually, we provide a particular set of instructions to the computer to perform a specific task. The set of instructions given to a computer is known as a Program languages. For example, BASIC, C, C++, Java.
Such programs are written in languages close to the human languages and are called high level COBOL, Fortran, etc. Each language has its own set of keywords and special syntax for writing the program. But computer cannot understand such languages. Computer understands only binary language that consists of binary numbers that is 0 and 1. So high level programs are converted into low level language program or machine language program using translators. In this chapter, let us study different generations of computer languages.
First Generation language-Machine Language
Machine Language is the first generation Language to communicate with a computer to binary digits 0 and 1. Thus, it is also known as binary language The machine language is easy to understand and can perform various operations Being an electronic machine, a computer system recognizes electric signals Among 0 and 1,0 stands for turning off the electric pulse and 1 stands for turning on the electric pulse Computer easily understands the machine language which also Increases the processing speed of the computer.
Some disadvantages of machine language include:
You need to remember the operation codes and memory address whenever you write a program It is really difficult to find enters in a written program It is a machine dependent language it can only be used for a single type of computer.
Second Generation Language Assembly Language
The second generation computers use assembly language: This programming language is little advanced than machine language. However it is almost similar in structure and set of commands as that of machine language Instead of symbols, assembly language uses short mnemonic codes for instructions. Like ADD for Addition, SUB for Subtraction and MULT for Multiplication, etc. Using this language, a programmer may introduce names for blocks of memory that hold data.
As you know that computer understands machine language only, the assembly level language needs to be converted into machine language. Computers use assemblers for this purpose. Assemblers are translator programs that convert assembly language to machine language.
The program written in assembly language is called source program while the program that is converted into machine language is called object code or object program.
One disadvantage of this language is that, it is written for only one type of CPU.
Third Generation Language-High Level Language
Languages like C, Pascal, FORTRAN, etc. are called high level languages. They are considered as third generation languages. These languages are not machine dependent. High level languages are highly preferred languages for programming. Third generation language enables the programmer to easily read, write and maintain programs. The language is similar to English language. So, computers require translators to convert the high level language into machine language. The translator can be an interpreter or a compiler.
Interpreter converts the high level language program to a machine language via line by line execution of instructions. While, a compiler is also a translator program, that executes the whole program at once. A compiler is much faster than an interpreter.
Fourth Generation Language (4GL)
The fourth generation language is much closer to human language than other high level languages. These languages are combination of languages.
Important features of 4GLs are:
1. User-friendly and works in any operating system.
2. Primarily designed to reduce the programming effort.
3. Higher rate of execution.
4. Easy access to information for user.
5. It requires the user to specify the desired output, the computer itself will determine the sequence of instructions to be followed to achieve the result.