Startertutorials Blog
Tutorials and articles related to programming, computer science, technology and others.
Subscribe to Startertutorials.com's YouTube channel for different tutorial and lecture videos.

Categories: Programming. 4 Comments on Basics of Programming Languages
Basics of programming languages

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.

 

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: 1) Machine Language, 2) Assembly Language and 3) 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.

 

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.

 

assembly-language

 

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:

  1. BASIC (Beginners All Purpose Symbolic Instruction Code).
  2. FORTRAN (Formula Translation).
  3. PL/I (Programming Language, Version 1).
  4. ALGOL (Algorithmic Language).
  5. APL (A Programming Language).
  6. COBOL (Common Business Oriented Language).
  7. RPG (Report Program Generator).
  8. LISP (List Processing).
  9. Prolog (Program in Logic).
  10. C++
  11. Java
  12. Visual Basic
  13. C

 

high-level-lang

 

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.

How useful was this post?

Click on a star to rate it!

We are sorry that this post was not useful for you!

Let us improve this post!

Tell us how we can improve this post?

Suryateja Pericherla

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.

4 Comments

You can follow any responses to this entry through the RSS 2.0 feed.

Very important information, thanks a lot.

Dr. antonios Antoniou, PUCP

is interpreter good for bigginers

Sir, this is great. Would like to learn more on Computer Networking

Leave a Reply

Your email address will not be published. Required fields are marked *