Home » Blogs » What is a Programming Language? Definition and Explanation

What is a Programming Language? Definition and Explanation

Hello and welcome to learnbuster I am prem baitha and this is programming series. In this article, I am going to explain everything about programming language. So what is programming language?

To understand programming language we first need to understand a computer. A computer is a machine or device that performs processes, calculations, and operations based on instructions provided by input (by humans)-output way.

The point is the computer can’t do it by itself. We have to give instruction and the instruction which we give to the computer is called programs. the human or person who writes instruction (program) is called a programmer.

What is a Programming Language? learnbuster

Now the computer or smartphone which is also a computer is full of the program and they are doing there work. The program which is written for the hardware of your computer is called system programs.

And the program which is written for a specific task like a web browser, notepad writer, music player, and video player are called application program. If you want that computer should do some specific and unique task then you can also write your own program.

So what I explained is we have to give instruction (program) to computer then the computer will execute that program and it will run the program.

But the main question is In which language we have to write programs on the computer.

I am writing this blog in English and I think you are understanding it but the computer can’t understand it. A computer is a machine and it understands binary codes which are written in 0’s and 1’s. 1 means on and 0 means off or you can say 1 means something exists and vice verse.

Let’s take the example of electric wire if the current is flowing throw this wire than it is on (1) and if the current is not flowing then it is (0).

So the computer is built like this to understand 0 and 1 binary language in such a way that it will understand the binary pattern or code like 1100110.

Whatever instruction we have write , we write in binary code like if we want to type (A) in binary it will be 01000001 and this is binary language also called as machine level language.

Now I hope you understand the programming language but again programming language in the definition.

The programming language is a language by which we interact or communicate by machine or computer.

There are around 256 programming languages with different role in computer and network field like some of them are web-based programming languages, some are software base and hardware-based.

The first programming language is machine languages, we use 0 and 1 to write a program Like A= 01000001, B= 01000010. But the problem is, it is very hard to learn. And to use it you have to learn about computer architecture and hardware architecture. One more disadvantage is, if you did something wrong (error) while writing the program then you have to write that program again from starting.

Because of those disadvantages in 1949, a new programming language was invented assembly language. In assembly language binary code 1’s and 0’s simplified or converted to alphabets for better understanding.

Take an example if I want to do the addition of two numbers 9 + 6. In binary, It will be 1001 110011110110 0010. In assembly language, It is Add R1 R2, of course, we have to first define the R1 and R2 which is 9 and 2 according to our example. So as you can it is simple, human-readable and easy to understand.

To convert assembly level language to binary language we use assembler program. It takes assembly level language source code and converts it into machine level language which computer can execute.

What is a Programming Language? learnbuster

But there is one more problem and that is assembly level language is easy to learn and understand compare to binary level language but not that easy. And that’s why one more type of programming language is invented called high-level programming language. These high-level languages are user readable language and one can understand it by reading the code. Anyone can learn high-level language easily. This high-level language is understood by humans.

What is a Programming Language? learnbuster

As I explained above the computer only understands binary. If we write a program or code in a high-level language computer will not understand it. We have to convert that hight level Langauge code to machine level language and for that, we need two types of execution modal either a compiler or an interpreter.

What is a Programming Language? learnbuster

High-level language examples are c++, c, java, python and etc. In high-level languages, we can’t do operations on hardware which machine level language can do.

But there is some language by which we can do operations on hardware like c, c++ and these languages are also called middle-level language. because they give some feature of machine-level language and high-level language.

This execution of machine language is so fast compared to high-level language because the computer will directly understand machine language but the high-level language needs to convert into machine language and then computer execute it. so it takes time to execute the code. but nowadays computers are so fast that you will not get any problem.

As I mentioned above high-level languages can execute by two programs either compiler or an interpreter. This program takes source code of the high level coded program and converts it into a machine-level program so that computer will understand it.

So let’s talk about the compiler, the compiler will take code (all the written code in ones) and will compile it into machine language. This process is called compilation.

What is a Programming Language? learnbuster

Now in the interpreter, it works just like compiler but it executes the code one by one I mean it will take one line of code then it will convert it in machine language and then second line and third line and so on. This process is called interpretation. Some programming languages use the compiler and some interpreter.

What is a Programming Language? learnbuster

The programming language which uses compiler is called compiled language. And the programming language which uses interpreter is called interpreted language.

Some of these languages are that are compiled language:

  1. C++
  2. Objective-C
  3. C#
  4. Java

Some of Interpreted :

  1. JavaScript
  2. Perl
  3. Python
  4. BASIC

If you liked this post or tutorial please share this with those who want it.

You can comment below so that I should know what you think about this post. Just remember this. while commenting you will need a website name and if you don’t have just write any website name.

Contact me if you need any help or anything.

(What is a Programming Language? Definition and Explanation)

THE END

0 0 vote
Article Rating
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments