In the previous video we have discussed what is need of programming, why do you write program. So let me give you a brief summary of the previous lecture. See computer is a general purpose machine which can perform any computational task and how computer can perform any task you have to submit some instruction. Whenever you give some instruction according to those instructions computer will perform some task right and these set of instructions are known as programs right. So computer run by programs basically. Many programs are already installed there like system programs, application programs. Fine. And computerized you can say nothing without programs. So, but language of computer is what? Binary language. Like computer can only understand 0 and 1. Fine, so when you write programs in any language, maybe like any C language or many programming languages are there, C language, C++, Java, then how computer will understand that program? First of all, that program has to be converted into machine code 0 and 1s and then according to that the computer or you can say the processor CPU will execute, will do some task and give you the output, right? So now we are going to discuss. Levels of programming languages like two categories are there. One is low level programming languages, second is high level languages. So what does it mean low level languages and high level languages? What are those languages like which languages are in this category and which languages are in this category? We will see some advantages and drawbacks of both these languages, right? So now let us discuss what are low level and high level languages. See first of all low level languages. Here two languages are there, one is machine language, second one is assembly language. Now first of all let us discuss what is machine language or it can you can also call it as machine level language or machine code, right. It is what machine oriented. See these languages are used like to write programs like when we write programs in C and C++. Same we write programs in machine language and assembly language also. But this is what? Very close to hardware. That is why it is known as low level. It is machine oriented and to write a program in machine language, you need an extensive knowledge of the configuration and the system architecture, the architecture of that computer system, that CPU. Okay? Because CPU the processor is responsible to do the task any task and then we get the output right. So, now architecture of CPUs are also different. The architectures and the specification I think you will study in the subject computer organization and architecture or maybe you have studied in that subject right. And according to those specification if you have knowledge of those specification of that processor the architecture of that processor then only you can write down any program in machine code. Because it is machine oriented it is very close to that hardware right. Like in this language how we write programs in zeros and ones. Suppose it is in memory and in this memory these are some instructions and data which is written in machine code zeros and one. This is what zeros and ones language. We write programs in zeros and ones only right. So from here CPU will fetch instruction data execute something right. Do the task and then again write back to the memory in the form of zeros and ones. Now suppose we write hello world. So in machine language how you will write? You have to convert it the every alphabet into this zeros and ones. Right? So maybe it is a bunch of zeros and ones. Suppose like this. Like this. See I am not saying that hello world would be written like this in machine language. It is just an example. So when you look at this code, can you tell me what is this? No, because humans are not able to understand the machine code, the machine language. Only computer can understand this language. But yeah, we can understand this thing. This is hello world. Right? So it's very tough to write programs in machine language. Right? and see machine language when you write program in machine language that is dependent on the computer architecture I have told you every CPU like one CPU is and second CPU every CPU is having different architecture or maybe some set of families of CPU is there that is having same architecture right and according to that architecture according to those specifications you have to write programs So, first of all you have to learn those architecture, those specifications like in one CPU, how can you write an instructions, it should be written in 20 bits. Maybe in another CPU the instruction should be written in 32 bits like this and when you perform like 1 plus 2 addition. So in these 20 bits suppose first 4 bits are for this plus that is known as opcode. Next 8 bits are for this one operand and this way second operand next 8 is for this operand. And maybe another CPU the instruction format is what you have to write in 32 bits. So in that case. Suppose first 6 bits are for opcode, opcode is what? This one, the operator and these are operands and next bits are for these operands or maybe few bits are for some other things also. So that depends on completely the architecture of the CPU, right. So in brief if I say then to write program in machine language you have to knowledge of this architecture of system architecture you can say that CPU architecture and then those specification then only you can write down programs in machine language, right. So now see so now the advantages of this machine language is what Program is written already in zeros and ones so no need to convert the program into machine language. It's already in machine language. So computer can directly execute this program. So the execution is fast, right? But drawback is what? It is not understandable by humans. Next is what? Program is written in machine language are? that system dependent, that it is dependent on the system, that computer on which you are writing, that machine dependent. So the same program you cannot run to two different machines, you cannot port these programs, programs are not portable, right. If you have written one program in one machine, that program can be executed on that machine only. If you want to execute that program on different machines, second machine, then you have to rewrite that program. According to that those machine specifications, according to that system specification, those system architecture, right? So to overcome these drawbacks next language comes that is assembly language, right? And this language, in this language we can use symbols, we can use numbers, those are called mnemonics, right? Now here what how we can write like if you want to want to write plus then you can write what? Add. And here you can write those numbers. For subtraction you can write sub right. For if you want to move something one data from one register to another register or somewhere then you can write what move. So these instructions you will come to know when you will study the subject computer system and architecture right. So see we can easily understand this is what add this instruction is what to add numbers. And in machine language how you write this in the form of zeros and ones like if 20 bits architecture is there then first 4 bits are for suppose plus and according to those specifications CP1 specification suppose plus is written as 0001. So here you write 0001 so that machine the computer can understand this is for plus and next 1 in the binary numbers and second are 2 also in binary numbers. So Can you understand this thing 0001? No. Yeah. If you have knowledge of that specification or architecture then you can understand that it is for plus. But if you write add then easily you can understand that it is for addition. So this language is what? Readable by humans. But still it is low level language because it is very strong binding with machine language. Hardware comes, then machine language, then assembly language. For each instruction written in machine language there is one to one correspondence with machine code. Here we cannot use the symbols right plus. No, you have to write down those mnemonics. Fine. Computer cannot understand this language. Computer can only understand zeros and one. So this program written in suppose this is a program. written in assembly language that first has to be converted into what? Machine code. So now who is going to convert that? Assembler. Assembler will generate machine code corresponding to this program. So advantage is what? We can, the human can understand this language right to somewhat but drawback is what? It cannot be directly executed on the machine. First have to convert it into machine code then only it can be executed. So it is slower than machine language because it can directly be executed on machine no need of conversion but here you need to translate the program into machine code. So it is slower than this one. But still drawback is what program written in machine language that is also dependent on machine. It is also dependent on that computer architecture. Because every assembly language is designed specifically for a specific computer architecture. So programs written in assembly language are not portable. To overcome this drawback, to make the programs portable so that we can run those programs in different machines. Next concept comes that is of high-level languages. C, C++, Fortin, Basic, COBOL, these are what? Java, Python, Perl, PHP, Ruby. These are high-level languages. And the program written in these languages are not machine dependent, but sometimes operating system dependent. Like program written for Windows, you cannot run that program on iOS, right? And in this language, high-level language, see why it is called as high-level language? Because it is close to... Humans, it is very far from machine code, machine dependent or that hardware. First hardware, then machine language, then assembly language, then high level languages comes. These are very close to humans, understandable by humans. And rather than dealing with those memory addresses, resistors and those machine code, high level languages deals with what? Variables, function, loops. We can evaluate mathematical expressions, right? We can use mathematical notations. We can use alphabets. It's like more of English language type. We can easily understand. That is why it is known as high level language. It is of higher, it is having higher abstractions. See because when you write a program, you don't need to go into that knowledge, into that much detail, that low level details like architecture of CPUs, the specifications. Right, that is why it is high level language. But when you write programs in machine code or some to somewhat in assembly language, you need to go much deeper those low level details, system details, the architecture, the specifications of computer system, specifications of CPUs, that processors, then only you can write down programs. That is why these are known as low level languages and this is high level language. Right? So here we can use what? This plus. When you write programs, no need to write down add. Here you can write down this plus. and this is what easy to remember like you don't need to remember for plus you have to write down add a double D for subtraction you have to write sub for move for moving a file you have to write down like mov we just write through the symbols fine but the programs written in high-level languages needs to be converted into machine code because machine the computer can only understand this language zeros and ones so who is going to convert compiler and interpreter two programs are there compiler and So, what compiler will do? It will take the complete source code, the program written in high level language and convert it into object file like obj file that machine code, complete program and then after converting the whole program then it is then machine will execute that program. But what interpreter will do? it will not compile it will not convert the complete program into machine code it reads one line by line right and then execute that program after reading line by line it is not going to convert the complete one first of all to object code and then it is going to execute no the conversion to machine code and the execution process runs parallely so drawbacks of high-level languages is what you have to convert it into machine code so definitely it is slower than machine language but the programs written in High level languages are easy to read, write and easy to understand, easy to maintain. So basically focus on, they focus on usability of the programs, not the optimal program efficiency. And program written in this high level languages are independent of computer architecture. You can say more or less independent of computer system architecture. So that's it for this video. In next video, I'm going to discuss how you can write program in C language and how that program is properly to be executed. What is the process behind the scene? Right, so now I'll see you in the next video till then bye bye take care.