Introduction to Computer Programming and Programming Language Types

What is programming&programming languages

 A computer is a general-purpose machines whichcan perform many computational task now the modern day computers that we have they canperform billions or trillions of calculations within a fraction of second. now the thingthese computer's they can't really do anything on their own. so for a computer to do something one has to give the instructions to it and these instructions will contain step by stepinformation to perform a specific task and these instructions are called as program.now the person who is going to write these instructions or the program is called as the programmer and here the programmer will write instructions or the program and the computer will execute that or computer will work on that instructions now the computers that we have they containa lot of programs in them. There are some programs which will manage the computer hardwareresources and they are called as the system programs and there are some programs whichwill provide specific functionality to a user for example the Notepad web browser musicplayer video player and all these types of programs are called as the application programs. now we know that we need to give instructionsto the computer so that the computer can work on it now the thing is how we can give theinstruction to the computer or in which language we can give the instructions to the computer.Now since this computer is a machine how we can communicate with this machine. now the language in which these instructionsare written or the language in which this program is written is called as the programminglanguage. 

types of programming languages 

now there are several types of programming languages and we are going to see the detailsabout them. now you guys may probably heard that the computerscan only understand the binary language. Now this binary language has only two values.0 and 1 so in this binary language whatever you want to say has to be in the form of this0 and 1. now here these computer's are built in such a way that they can understand orthey can recognise the pattern of the zeros and ones and then they can work on it accordingly. Now why we have built the computers to understandthis binary language? that is because this binary language whichhas only two values is easy to create in the hardware level for example if we have a wireand if the current is flowing through this wire then we can say it is 1 if the currentis not flowing then we can say it is zero. so in general we can say that one stands forsomething which exists and zero stands for something which doesn't exist so since thisbinary language is easy to create in the hardware level so the computer is built in the hardwarelevel to recognise this pattern of 0 and 1 and while building the computer for a specificpattern of 0 and 1 a specific setup operations are defined. so when the computer will see a specific patternof 0 and 1 it knows what it has to do. so now the computers can understand this binarylanguage and this binary language with the computers understand are also called as themachine language. now let's see the types of programming languagesavailable. 

now in this modern day we have a lot of programming languages available.so let's take a look at the types of programming languages.so the first type of programming language or the language in which we can communicatewith the computer is the language which the computer understands. now all of you knowthat this computer's can understand this binary language or the machine language which isthe combination of zeros and ones. so the first type of programming languagesis the machine level language And in this machine level language we have the instructionsin the form of 0 and 1. so whatever you want to say has to be in theform of zero and one and since the computers are built in such a way that they can recognisethis zeros and ones and perform some specific operation on that the combination of zerosand ones you know we can communicate with his computer in this language. now the problem with this machine level languageis in order to program in this machine level language one has to know everything aboutthe computer. so here the programmer is directly dealing with the hardware level so he is directlyworking on the memory and the data. so the programeer needs to know everythingabout the computer, computer processor the computer architecture everything about thathe has to know and that's why this machine level language is a bit difficult to learnand also think about this let's say you want to write a program in the machine level languageor you want to give instructions to the computer in the machine level language and your programconsists of thousand lines.
mrpremwingsprogram

all your instruction will contain this 0 and 1 and this combinationof the zeros and ones. first of all it is difficult to write the program and also ifyou make some mistakes in your program then it is difficult to spot and because of allthese, a normal guy can't really learn the programming easily. so to solve these kind of problems anothertype of programming languages were invented and they are called as the Assembly levellanguage. in this assembly level language instead ofthat zeros and ones combination mnemonic the symbolic codes were introduced for exampleif the programmer has to write an instruction let's say he wants to add the numbers 5 and6. then in the machine level language it hasto be in the form of this zeros and ones. so let's say this is gonna be the instructionto add the numbers 5 and 6. so in the machine level language it will looklike this but in the Assembly level language mnemonic codes for used and the programmercould write ADD 5 6. So a lot of mnemonic or the symbolic codeswhere used and the programmer could write the program in this way.so it was a lot more human readable format the programmer can understand the code justby looking at it and it was a lot easier to code than the machine level language. so now the thing is the source code of theprogram written in this assembly level language by using this mnemonic or the symbol Codescannot be directly executed in this computer that is because this computer can only understandthe machine language. so what we have to do is we have to convertthe code which is written in the Assembly level language to machine level language sothat the computer can understand it and execute it.so the program written in the Assembly level language needs to be converted to the machinelevel language and to convert that a program was used and that program is called as theassembler. 

so this assembler will convert the code writtenin the Assembly level language to machine level language.now this assembly level language was lot more easy to learn and someone can learn the programminga lot more easily than the machine level language but this assembly level language also hadthe same difficulties. although it was a lot easy to write the programsthan the machine level language in assembly level language if the program size increasesthen again it is difficult to spot the errors and also the code written in the Assemblylevel language was also Computer Architecture dependent. so the code return for one type of computercannot be executed in another type of computer which has different architecture so againto solve these kind of problems a new types of languages by invented so that a lot morepeople can come and write the programs and that type of programming languages are calledas the Higher level languages. the high level languages are designed in sucha way that they are very easy for a beginner to learn and they were very close to the humanreadable language for example in this higher level language one could write the instructionto add 5 and 6 like this. so this 5 + 6 is a lot more similar to thehuman language so just by looking at the code one can understand what we're trying to doand since this higher level languages where a lot more easy to learn many people startedlearning computer programming and started creating lot more programs. 

now again the thing is the program writtenin the higher level language cannot be directly executed in the computer that is because thecomputer can only understand the machine language which can contain 0 and 1 but the higher levellanguage is very close to the human languages. so we have to convert the program which iswritten in the high level language to machine language which the computers can understandand execute. so for this high level languages there are two ways in which we can convertthe source code from high level language to machine level language and execute it andthe two methods which were used to convert the high level language program to machinelevel language one was the compilation method where a program called compiler was used. this is the compilation method another methodis called as the interpretation and for this interpretation method another type of programcalled as interpreter was used and we will see the details of this compilation and interpretationmethod a bit later but here just remember that although these are two different methodswhat they do is they convert the program which is written in the high level language to machinelevel language which the computers can understand and execute. now here this machine level language and theAssembly level language they are called as the lower level languages.because while writing the programs in this machine and assembly level language the programmerscould easily access the computer memory and directly work with the data. but with themost of this high level languages the programmers can't directly access the memory and the workwith data. but there are some languages in the high levellanguage type which allow the programmer to work with the Computer memory and the dataand they are called as the middle level languages.

 this middle level languages they provideall the features of the higher level languages and also they allow the programmer to workwith the Computer memory and data directly and since this languages provide the featureof the lower level language and also the high level language they are called as the middlelevel languages and we have the languages like C and C plus plus are these are all themiddle level languages because allow the programmer to work with the Computer memory and dataand also they provide all the features of this high level language and in the high levellanguages we have Java C Sharp python etc. this machine level language which is veryclose to the machine or you know this language the computer directly understands, it executesmuch faster than all these languages. so the execution speed of this machine languageis very high and after this machine level language we have the Assembly languages andtheir execution speed is better than the high level languages but a bit slower than themachine level language and then we have the high level languages. so now as I said before in this high levellanguages we can convert the code from higher-level language to machine code in two differentways one is the compilation method another one is the interpretation method. let's see this compilation and interpretationmethod in detail. 

so first see the compilation.so in the compilation method a program called compiler is used and this compiler Will takethe high level language program and it will convert that to the machine language and thisprocess is called as the compilation method and here what happens is this compiler willread the high level language program let's say this is high level language program itwill read this program and it will convert that to the machine language. it will convertthis entire program into machine language and then this machine language code will beexecuted. so the thing is compiler will convert entire program which is written in the high-level language to machine level language and thenthat machine level language code will be executed. now let's take a look at this interpretationmethod so here also we will be converting the program written in the high level languageto the machine level language and then executing that. and for that purpose we will be usinga program called as the interpreter.
 and this process is called as the interpretation. so the process of converting the high levellanguage program to machine language by using the program interpreter is called as the interpretationmethod now here what happens is lets say this is the source code or the programs writtenin the high level language and this interpreter what it does is first it will read the firstline of this source code or the program which is in the high level language and then itwill convert that to the machine code and then it will execute it immediately and afterthat it will go to the next line of the high level language program it will read that itwill convert that code and then it will execute it immediately and then it will go to thethird line and then again it will convert that code and then it will execute it. so in the compilation process the entire programwhich was written in the high level language was read first then it was converted to machinelevel language and then that entire program was executed at once but with the interpretationmethod the interpreter will read the program which is in the high level language line byline it and it will convert and execute each line immediately at a time. and this is howthe compiler and interpreter work. 

now there are many languages in the high levellanguage type and in that languages some follow the compilation method and some follow theinterpretation method. the languages which follow the compilation method are called as the compiled languages and for example we have C C + + etc theseare all the compiled languages where the compilation method is used to convert the program iwhichis written in these languages to the machine language and the higher level languages which follow the interpretation method are called as the interpreted languages for example wehave Python and this Python is an interpreted language. All right. this is it guys this is about thecomputers computer programming types of programming languages compilation and the interpretationmethod .

0 Comments