Introduction to Programming Languages
Transcript
Welcome to everything computerised I'm CA and today in this video we'll gonna discuss about what is a programming language why do we need a programming language and what are the various types of programming languages so watch this video till end and let's get started. Let's understand what is a programming language. When we want to communicate with each other we use a certain language for instance I am speaking you are listening we are communicating with each other with the help of English language. Similarly when we want to communicate with a machine we also need a certain language and this language is known as a programming language so basically a programming language helps
us to communicate with the machine or computer or any other digital device. So this was the basics of a programming language. Now let's understand the deeper perspective of a programming language. We all know that we need to follow some rules in a language let's take the example of English language. To write or to speak in English, we follow certain set of rules known as grammar. Grammar is nothing but it is a set of rules which we need to follow.
For example how we pronounce a certain word how we frame a certain sentence regarding a word, the way we speak the way we write etc. similarly in a programming language we are given with some set of rules and regulations which we have to follow in order to communicate with the computer system. These set of instructions are known as algorithms. So simply an algorithm is a set of rules or we can say a sequence in order to perform a specific task. We all
know a computer cannot work on itself and we need to give instructions to it and the only possible way we can give instructions to a computer is communicating with it and in order to communicate with the computer we need a language and that language is known as a programming language. So indirectly programming language is a set of algorithms which we have to follow. Like any other language, programming language is also divided into two parts, first is the syntax and another is semantics. So what is syntax. Syntax is the structure in which something is expressed. For example in English the structure of a sentence, the pronunciation, the way it is written, the full stop, the punctuation mark, the articles, the grammar, these all belong to a syntax and the semantics is referred to the meaning like with the help of a syntax we have framed a certain sentence and the meaning it is carrying
it is known as the semantics. So in programming language we need to follow some syntax in order to write a command or any other related stuff and the meaning it is generating to the computer is known as the semantics. So now that we have understood what is a programming language let's come to the definition of a programming language " a programming language is a vocabulary and set of grammatical rules for instructing a computer or computing device
to perform a specific task. Each programming language has a unique set of keywords and special Syntax for organizing program instructions." Now as we have understood what is a programming language let's take a look at the evolution of programming languages. Now with the advancement in technology the way we interact with the computers, the way we give instructions to the computer I have also changed with time. There are different generations of programming
languages depending upon the advancement in technology. Before that let's take a look at which type of instructions to computers understand. Computers are electronic devices and they can understand only electrical signals. The two ways in which we can give signal to a computer is a high signal and a low signal. A high signal refers to a high voltage and a low signal refers to a low voltage. In computers represent High Voltage as 1 and low voltage
as a 0. We can give instructions to a computer with the different combinations of high voltages and low voltage that is 0 and 1. Indirectly computer understands only 0 and 1. So the syntax of the combination of the 0 and 1 gives rise to the programming language known as the machine language. So machine language is that programming language which is directly understood by the computer. Computer is very well able to understand the machine language
so the 0 and 1 are known as the binary digits and the combination of 0 and 1 gives rise to a language that is known as the machine language. So machine language is a type of programming language like we have English, German, Spanish, Hindi as the types of languages, similarly machine language is a type of programming language. So the programming language which is directly understood by the computer is the machine language. Now that we have understood
the machine language let's come to the evolution of programming languages. With the advancement in technology, the way we interact with the computer have changed and the way we write a program that is programming languages have also changed. this change is divided into five generations so basically we have five generations of programming language. The first generation is the machine level language. the first generation of programming languages
was used between 1940 and 1959. These where Machine based languages in general machine language which constituted 0 and 1 that is the binary digits. This programming language was used to program the first generation of computer that is the vacuum tube computer and the early versions of the transistor computers. As the computer is able to understand the machine language directly the programs written in the machine language were generally very
fast. As the computer directly understands the machine level language, it did not require the use of translators. We will learn about translators later in this video. As the machine language was not so efficient it had a lot of drawbacks. First that each and everything was needed to be converted into the binary digits and therefore for a simple specific task the program would become very lengthy. Secondly as the binary coding is very difficult,
not everyone was able to understand the code so it became very complex. Third, a program written on one machine was not able to run on another machine because the coding of each and every machine is different and hardwares of the machines are also different from each other so the program was not portable. A programmer had to program different codes for each and every machine to work. As the coding of the programs in machine language was very lengthy,
so the programming of the machine language was very much time consuming. Here is the example of a simple code written in machine language in order to print hello world on the screen. Because it was very difficult to write a machine code in a machine language, the programmers decided to design a new language which could be very easy as compared to the machine language and it came to be known as assembly language and it falls under the second
generation of programming languages and was used in the duration of 1959 and 1965. The Assembly language made use of Mnemonics which is the symbolic representation. As it is used in symbolic representation for various codes it became easier to write and understand the code. The chances of errors also decreased and therefore it was less error-prone. As it was easier than machine language it became easy for the programmers to understand it
and hence the time required to write a code in assembly language was less than that of the machine language and hence saved time. Though the assembly language was better than the machine language, it had many disadvantages. First was that computer could not understand the Assembly language for that we needed to convert the Assembly language into machine language. So for that we needed a program known as a assembler. Assembler is a program
that translates assembly language into machine level language. So when we have completed our coding it needed some time to convert the Assembly code into the machine code and hence it was more time consuming as compared to the machine code. It needed more time to run the program as compared to the machine language. The second disadvantage is that any code written on one machine was not able to run on the machine hence the code written
was not portable. The machine language and the assembly language, both were machine dependent that is the program written on one computer could not run on another computer, a programmer has to write different codes for each and every computer to work and because of the increasing demand of computers it became nearly impossible to program each and every computer and therefore there was a need for a programming language in which a program written on one
computer could be easily run on another computer with some modifications and this gave rise to the third generation of programming languages. The first generation and second generation of programming languages are known as low level languages. Due to the machine dependency of the first and the second generation of computers, there was a need for a programming language in which a program written on one computer could easily run on another computer
with a little modification and therefore gave rise to the third generation of programming languages. It was developed in 1965 and is used till now. So the benefits of the third generation of programming languages were, it was machine independent, that is a program which was designed on one computer could easily run on another computer without any modification or with little modifications, so it was portable. It used English words to denote variables,
programming structures and commands and hence it reduced the difficulty of learning a programming language, it became very easy to write programs. It supported structured programming that is a large program can be divided into smaller sections each performing a specific task related to the program. Because of the benefits of this generation of programming language it was also known as programmer friendly language. The first introduced third generation programming
languages were FORTRAN, ALGOL and COBOL. As it used English words, it was also known as high level language. Despite of these advantages, it had some disadvantages also. First that the computer can understand only machine language and so we need a translator to translate this high level language into machine language. As it required some time to translate the code into the machine code the execution of the program was time taking. Some modern third
generation programming languages are C + +, C, C#, Java. Now after the third generation of languages comes the fourth generation of languages. The fourth generation of languages are closer to human language than any other language and are accessible to people without formal training as programmers. It uses common English like syntaxes and phrases, unlike the third generation of languages in which a limited number of English words were used.
They allow multiple common operations to be performed with a single programmer entered command and they prove to be more programmer friendly, powerful and versatile. It can operate more with large collections of information at once rather than focusing on just bits and bytes like the other languages did. Because it was able to process large amount of data at a time, it was used for Database Management, report generation, mathematical Optimisation,
GUI development and web development. It instructs the computer on what to do rather than focusing on how to do it and hence it is a non procedural programming language. The programmer is required to enter the task which is to be carried out and the method in which the task is carried out is left to the language and hence the program written in fourth generation languages are easier. But as the language carries out the task itself the control of the programmer
over the program and the resources is very limited. Fourth generation language packages are very lengthy and hence need more disk space and large memory capacity. Some commonly used fourth generation languages are SQL, NATURAL, M-POWER, LANSA. With the advancement in technology, the programmers thought that the computer should be able to solve a particular problem without the help of the programmer and led to the concept of the fifth generation
of programming language. This concept was first introduced in Japan in the early 90s and is now considered to be the future of programming. The fourth generation of programming languages were designed to build specific programs but the fifth generation of programming languages are designed to make the computer solve any given problem without the help of the programmer. And in this way the user only needs to worry about what problems need to
be solved and what conditions need to be met without worrying about how to implement a routine or algorithm to solve them. The fifth generation of programming languages are used mainly in the development of artificial intelligence research. As it uses automated systems, development and maintenance of the fifth generation programming languages becomes more complicated and requires more resources for their work efficiency. OPS5 and MERCURY are examples of fifth generation
of programming languages. The first and the second generation of programming languages are known as the low level languages whereas the third, fourth and fifth generation of programming languages are collectively known as high level languages. The low level languages for machine dependent whereas the high level languages were machine independent. The low level languages uses binary digits or the symbolic representations known as the Mnemonics
in order to write a code whereas the high level languages uses English words and phrases. The low level languages were not portable that is the program written on one computer was not able to run on another computer but in high level languages the program written on one computer could be easily run on another computer so they were portable. The programs written on the low level languages could directly interact with the hardware
of the system whereas the program written in high level languages could not directly interact with the hardware of the system. The low level languages are very difficult to learn and implement whereas the high level languages are easy to learn and implement. This is a brief summary of the generations of programming languages. Now that we have understood what are programming languages, let's understand what are translators
or simply language translators. Previously in this video I have mentioned that there is no need of translators in machine language so let's discuss about it now. We all know that the computers can understand only the machine language that is the combination of 0 and 1 that are the binary digits but as it was very difficult for the programmers to write each and every code in binary digits and hence it was nearly impossible to write very long and complex codes in binary digits so there was a need to develop the other programming language which was easier to write and learn so assembly language and the other high level languages were developed. We know that the computer can understand only the machine language, it was impossible to implement those programs on computers and hence there was a requirement to convert that code into the machine code so that the computers could implement them
and gave rise to the language translator. The language translators are the programs which convert the source code written in any other programming language into machine code that is the object code so that the computer could implement them. Language translators are also known as translators and language processors. Mainly there are three types of language translators, first is assembler, second is compiler and third comes the interpreter.
Let's first talk about what are assemblers. So an assembler is a type of computer program that converts the codes written in assembly language into machine language. It takes the source code written in assembly language and converts into the object code in machine language which can be directly executed by the processor. Now comes the compiler So a compiler is a special type of language translator that converts the source code written in one language generally high level language into machine code. Similarly an interpreter also converts a source code written in any other language into machine language. But the basic difference between the compiler and interpreter is the way of working. A compiler scans the entire program and translates it into the machine code as a whole and therefore it takes less time to execute the program program whereas an interpreter converts the
the program into machine code statement by statement and therefore the overall time taken by the interpreter to execute a program is increased. Another big difference between the compiler and interpreter is that the compiler generates the error message only after scanning the whole program whereas the interpreter translates the program until the first error is met and if an error is encountered it stops the execution. Programming languages like C and C++ use compiler whereas Python and Ruby use interpreter. This is all about programming languages. Don't forget to like and share this video and do subscribe my channel if you haven't yet. Please vote my way of explanation by tapping on the infocard above.
Keep watching and see you in the next video. *subtitles by CA*

Ask anything
We've read this whole study set, so questions about it get the best answers.