In this article we will learn about basics of programming languages. First we will look at different types of computer languages and then learn about different generations of programming languages. Hope you had already learned about basic networking concepts.
Contents
Computer Languages
To communicate with a computer, we use computer languages or also known as programming languages. To write a program, we must use the computer languages. A computer language is a set of predefined words that are combined into a program according to predefined rules (syntax).
Watch this video to learn about types of programming languages:
Over the years, computer languages had evolved from machine language to high-level languages. There are generally three types of computer languages. They are:
- Machine Language
- Assembly Language
- High-level languages
Machine Language
In the earliest days of computers, the only programming languages available were machine languages. Each computer has its own machine language which is made up of streams of 0’s and 1’s.
The only language understood by a computer is the machine language. This language is tightly coupled with the computer hardware. It is difficult to write and maintain code in machine language.
Assembly Language
The next evolution in programming came with the idea of replacing binary code for instruction and addresses with symbols or mnemonics. Because they used symbols, these languages were first known as symbolic languages.
The set of these mnemonic languages were later referred to as assembly languages. It is easy to write and maintain programs in assembly language than in machine languages.
High-Level Language
Although assembly languages greatly improved programming efficiency, they still required programmers to concentrate on the hardware they were using. Working with symbolic languages was also very tedious, because each machine instruction had to be individually coded.
The desire to improve programmer efficiency and to change the focus from the computer to the problem being solved led to the development of high-level languages.
Examples of high-level languages are:
- BASIC (Beginners All Purpose Symbolic Instruction Code).
- FORTRAN (Formula Translation).
- PL/I (Programming Language, Version 1).
- ALGOL (Algorithmic Language).
- APL (A Programming Language).
- COBOL (Common Business Oriented Language).
- RPG (Report Program Generator).
- LISP (List Processing).
- Prolog (Program in Logic).
- C++
- Java
- Visual Basic
- C
Translation
Programs today are normally written in one of the high-level languages. To run the program on a computer, the program needs to be translated into the machine language of the computer on which it will run.
The program in a high-level language is called the source program. The translated program in machine language is called the object program. Two methods are used for translation: compilation and interpretation.
Watch this video to learn about compilers, interpreters and assemblers:
Translator
A translator is a program, which converts the code written in one language into another language. The widely used translators are compilers and interpreters.
Compiler
A compiler is a translator which converts the program written in high-level language into assembly code or into another form of intermediate code or directly into machine code. A compiler converts the whole source code at once into object code and then executes it. So, compiler is faster than a interpreter.
Interpreter
An interpreter is a translator which converts the source program into object or machine code. The interpreter converts the source code line-by-line and executes it immediately, which results in less performance. Thus, an interpreter is slower than a compiler.
Generations of Programming Languages
There are five generations of programming languages. There are classified based on how close the programming language is to human beings.
Watch this video to learn about generations of programming languages:
First Generations Languages (1GL): The first generation language is the machine language. It consists of only 0’s and 1’s. It is very difficult write programs in machine language.
Second Generation Languages (2GL): The second generation language is the assembly language. Assembly language consists of symbols known as mnemonics, english words rather than 0’s and 1’s. Programs written in assembly language are converted to machine language using a translator known as assembler.
Third Generation Languages (3GL): The third generation languages are high-level languages which are similar to english. It is easy to write programs using high-level languages. Programs written in high-level language are converted to machine language by using a translator like compiler or interpreter. Third generation languages are problem oriented languages. Examples: C, FORTRAN, COBOL, PASCAL etc.
Fourth Generation Languages (4GL): The fourth generation languages are non-procedural languages. Programmers have to specify only what to do but not how to do it. These languages are developed for users having minimum programming language. Examples: SQL, ABAP etc.
Fifth Generation Languages (5GL): The fifth generation languages are declarative languages which are used in artificial intelligence and expert systems. Example: Prolog etc.
Now it’s time to learn about program development steps.
Suryateja Pericherla, at present is a Research Scholar (full-time Ph.D.) in the Dept. of Computer Science & Systems Engineering at Andhra University, Visakhapatnam. Previously worked as an Associate Professor in the Dept. of CSE at Vishnu Institute of Technology, India.
He has 11+ years of teaching experience and is an individual researcher whose research interests are Cloud Computing, Internet of Things, Computer Security, Network Security and Blockchain.
He is a member of professional societies like IEEE, ACM, CSI and ISCA. He published several research papers which are indexed by SCIE, WoS, Scopus, Springer and others.
Very important information, thanks a lot.
Dr. antonios Antoniou, PUCP
is interpreter good for bigginers
What do you mean?
Sir, this is great. Would like to learn more on Computer Networking