Introduction to Computer Programming | What is it? Programming Language Types
Summary
TLDRThis video script provides a comprehensive introduction to computer programming and the different types of programming languages. It begins by explaining what a computer is and how it requires instructions, called programs, to perform tasks. The script then delves into the various levels of programming languages, starting with machine-level languages that use binary code, progressing to assembly-level languages with mnemonic codes, and finally exploring high-level languages that are more human-readable. The concepts of compilers and interpreters, which convert high-level languages into machine-readable code, are also discussed. Overall, the script aims to provide a solid foundation for understanding the fundamental principles of programming languages and how they enable communication with computers.
Takeaways
- 😀 A computer is a general-purpose machine that performs computational tasks by following programmed instructions (programs) written by programmers.
- 🤖 Computers can only understand binary language (0s and 1s) at the hardware level, which is known as machine language.
- 📝 Machine-level programming is difficult and requires extensive knowledge of computer architecture and hardware.
- 📖 Assembly-level programming uses mnemonic codes instead of binary, making it more human-readable but still architecture-dependent.
- 💻 High-level programming languages (e.g., Java, Python) are designed to be more user-friendly and closer to human language.
- 🔄 High-level programs need to be converted to machine language using compilers (compilation method) or interpreters (interpretation method).
- ⚡ Compiled languages (e.g., C, C++) convert the entire program to machine code before execution, while interpreted languages (e.g., Python) convert and execute line by line.
- 🌐 Middle-level languages (e.g., C, C++) allow programmers to access computer memory and data directly, combining features of high-level and low-level languages.
- 🏃♀️ Machine language executes the fastest, followed by assembly language, and then high-level languages.
- 🧠 High-level languages are easier to learn and allow more people to write programs, leading to the creation of numerous applications.
Q & A
What is a computer?
-A computer is a general-purpose machine capable of performing many computational tasks, including billions or trillions of calculations within a fraction of a second.
Why do computers need programs?
-Computers require programs to perform tasks because they cannot do anything on their own. Programs contain step-by-step instructions for the computer to execute a specific task.
What is the role of a programmer?
-A programmer writes the instructions or programs that a computer follows to perform specific tasks.
What are system programs?
-System programs manage the computer hardware resources.
What are application programs?
-Application programs provide specific functionality to users, such as word processing, web browsing, and media playback.
What is a programming language?
-A programming language is a set of instructions written in a specific syntax that a computer can understand and execute to perform tasks.
What is binary language?
-Binary language is the basic language of computers, consisting only of 0s and 1s. Computers interpret these binary signals to perform operations.
What are the types of programming languages?
-Programming languages are categorized into machine level languages, assembly level languages, high level languages, and middle level languages.
What is the difference between compiled and interpreted languages?
-Compiled languages are converted entirely from the source code into machine language by a compiler before execution. Interpreted languages are translated and executed line by line at runtime by an interpreter.
What are examples of high-level, compiled, and interpreted programming languages?
-High-level languages include Java, C#, and Python. Examples of compiled languages are C and C++. Python is an example of an interpreted language.
Outlines
👨💻 Introduction to Computers, Programming, and Programming Languages
This paragraph introduces the concept of computers, their computational capabilities, and the need for programs and programmers to provide instructions for performing specific tasks. It explains that computers contain system programs for managing hardware resources and application programs for providing user functionality. It also highlights the importance of programming languages as a means of communicating with computers.
🗣️ Communication with Computers: Binary and Machine Language
This paragraph discusses the binary language (0s and 1s) that computers understand at the hardware level. It explains why computers are built to recognize patterns of 0s and 1s (machine language) and how specific operations are defined for each pattern. It introduces the concept of machine-level language, where instructions are represented as combinations of 0s and 1s.
⬆️ From Lower to Higher-Level Programming Languages
This paragraph explores the evolution of programming languages, starting from machine-level language and assembly-level language (which uses mnemonic codes instead of 0s and 1s). It then introduces higher-level languages, which are more human-readable and easier to learn. The paragraph also discusses the need for compilers and interpreters to convert high-level language code into machine language for execution by computers. It briefly mentions middle-level languages like C and C++, which allow direct memory access and data manipulation.
✅ Compilation vs. Interpretation: Executing High-Level Language Code
This paragraph delves into the two methods of executing high-level language code: compilation and interpretation. It explains the compilation process, where a compiler converts the entire high-level language program into machine language before execution. It then describes the interpretation process, where an interpreter reads and converts each line of the high-level language program into machine language, executing it immediately. The paragraph also distinguishes between compiled languages (e.g., C, C++) and interpreted languages (e.g., Python).
Mindmap
Keywords
💡Computer Programming
💡Programming Languages
💡Binary Language
💡Machine Level Language
💡Assembly Level Language
💡High Level Languages
💡Compiler
💡Interpreter
💡Middle Level Languages
💡System Programs vs Application Programs
Highlights
A computer is a general purpose machine that can perform many computational tasks and billions or trillions of calculations within a fraction of second.
For a computer to do something, one has to give it instructions, which are called a program.
The person who writes the instructions or program is called a programmer.
System programs manage computer hardware resources, while application programs provide specific functionality to the user, such as Notepad, web browsers, music players, and video players.
The language in which instructions are written is called a programming language.
Computers can only understand binary language, which has two values: 0 and 1.
The binary language is easy to create at the hardware level, which is why computers are built to understand it.
The first type of programming language is the machine level language, which consists of instructions in the form of 0s and 1s.
The problem with machine level language is that one needs to know everything about the computer to program in it, making it difficult to learn.
Assembly level language uses mnemonic or symbolic codes instead of 0s and 1s, making it more human-readable and easier to code than machine level language.
Code written in assembly level language needs to be converted to machine level language using a program called an assembler.
High-level languages are designed to be easy for beginners to learn and are close to human-readable language.
Programs written in high-level languages need to be converted to machine level language using either a compiler or an interpreter.
The compilation method converts the entire high-level language program to machine language before execution.
The interpretation method converts and executes each line of the high-level language program immediately, one line at a time.
Transcripts
Hi this is Anil from learning lad and in this video we are going to talk about the
computer, computer programming and the types of programming languages.
A computer is a general purpose machines which can perform many computational task now the
modern day computers that we have they can perform billions or trillions of calculations
within a fraction of second. now the thing these 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 step information 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 contain a lot of programs in them. There are some
programs which will manage the computer hardware resources and they are called as the system
programs and there are some programs which will provide specific functionality to a user
for example the Notepad web browser music player video player and all these types of
programs are called as the application programs.
now we know that we need to give instructions to the computer so that the computer can work
on it now the thing is how we can give the instruction 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 instructions are written or the language in which this
program is written is called as the programming language. now there are several types of programming
languages and we are going to see the details about them.
now you guys may probably heard that the computers can 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 this 0 and 1. now here these computer's are built
in such a way that they can understand or they 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 understand this binary language?
that is because this binary language which has only two values is easy to create in the
hardware level for example if we have a wire and if the current is flowing through this
wire then we can say it is 1 if the current is not flowing then we can say it is zero.
so in general we can say that one stands for something which exists and zero stands for
something which doesn't exist so since this binary language is easy to create in the hardware
level so the computer is built in the hardware level to recognise this pattern of 0 and 1
and while building the computer for a specific pattern of 0 and 1 a specific setup operations
are defined.
so when the computer will see a specific pattern of 0 and 1 it knows what it has to do. so
now the computers can understand this binary language and this binary language with the
computers understand are also called as the machine language.
now let's see the types of programming languages available. 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 communicate with the computer is the language which the
computer understands. now all of you know that this computer's can understand this binary
language or the machine language which is the combination of zeros and ones.
so the first type of programming languages is the machine level language And in this
machine level language we have the instructions in the form of 0 and 1.
so whatever you want to say has to be in the form of zero and one and since the computers
are built in such a way that they can recognise this zeros and ones and perform some specific
operation on that the combination of zeros and ones you know we can communicate with
his computer in this language.
now the problem with this machine level language is in order to program in this machine level
language one has to know everything about the computer. so here the programmer is directly
dealing with the hardware level so he is directly working on the memory and the data.
so the programeer needs to know everything about the computer, computer processor the
computer architecture everything about that he has to know and that's why this machine
level language is a bit difficult to learn and also think about this let's say you want
to write a program in the machine level language or you want to give instructions to the computer
in the machine level language and your program consists of thousand lines. all your instruction
will contain this 0 and 1 and this combination of the zeros and ones. first of all it is
difficult to write the program and also if you make some mistakes in your program then
it is difficult to spot and because of all these, a normal guy can't really learn the
programming easily.
so to solve these kind of problems another type of programming languages were invented
and they are called as the Assembly level language.
in this assembly level language instead of that zeros and ones combination mnemonic the
symbolic codes were introduced for example if the programmer has to write an instruction
let's say he wants to add the numbers 5 and 6.
then in the machine level language it has to be in the form of this zeros and ones.
so let's say this is gonna be the instruction to add the numbers 5 and 6.
so in the machine level language it will look like this but in the Assembly level language
mnemonic codes for used and the programmer could write ADD 5 6.
So a lot of mnemonic or the symbolic codes where 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 just by 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 the program written in this assembly level language
by using this mnemonic or the symbol Codes cannot be directly executed in this computer
that is because this computer can only understand the machine language.
so what we have to do is we have to convert the code which is written in the Assembly
level language to machine level language so that the computer can understand it and execute
it. so the program written in the Assembly level
language needs to be converted to the machine level language and to convert that a program
was used and that program is called as the assembler.
so this assembler will convert the code written in the Assembly level language to machine
level language. now this assembly level language was lot more
easy to learn and someone can learn the programming a lot more easily than the machine level language
but this assembly level language also had the same difficulties.
although it was a lot easy to write the programs than the machine level language in assembly
level language if the program size increases then again it is difficult to spot the errors
and also the code written in the Assembly level language was also Computer Architecture
dependent.
so the code return for one type of computer cannot be executed in another type of computer
which has different architecture so again to solve these kind of problems a new types
of languages by invented so that a lot more people can come and write the programs and
that type of programming languages are called as the Higher level languages.
the high level languages are designed in such a way that they are very easy for a beginner
to learn and they were very close to the human readable language for example in this higher
level language one could write the instruction to add 5 and 6 like this.
so this 5 + 6 is a lot more similar to the human language so just by looking at the code
one can understand what we're trying to do and since this higher level languages where
a lot more easy to learn many people started learning computer programming and started
creating lot more programs.
now again the thing is the program written in the higher level language cannot be directly
executed in the computer that is because the computer can only understand the machine language
which can contain 0 and 1 but the higher level language is very close to the human languages.
so we have to convert the program which is written in the high level language to machine
language which the computers can understand and execute. so for this high level languages
there are two ways in which we can convert the source code from high level language to
machine level language and execute it and the two methods which were used to convert
the high level language program to machine level language one was the compilation method
where a program called compiler was used.
this is the compilation method another method is called as the interpretation and for this
interpretation method another type of program called as interpreter was used and we will
see the details of this compilation and interpretation method a bit later but here just remember
that although these are two different methods what they do is they convert the program which
is written in the high level language to machine level language which the computers can understand
and execute.
now here this machine level language and the Assembly level language they are called as
the lower level languages. because while writing the programs in this
machine and assembly level language the programmers could easily access the computer memory and
directly work with the data. but with the most of this high level languages the programmers
can't directly access the memory and the work with data.
but there are some languages in the high level language type which allow the programmer to
work with the Computer memory and the data and they are called as the middle level languages
and this middle level languages they provide all the features of the higher level languages
and also they allow the programmer to work with the Computer memory and data directly
and since this languages provide the feature of the lower level language and also the high
level language they are called as the middle level languages and we have the languages
like C and C plus plus are these are all the middle level languages because allow the programmer
to work with the Computer memory and data and also they provide all the features of
this high level language and in the high level languages we have Java C Sharp python etc.
this machine level language which is very close to the machine or you know this language
the computer directly understands, it executes much faster than all these languages.
so the execution speed of this machine language is very high and after this machine level
language we have the Assembly languages and their execution speed is better than the high
level languages but a bit slower than the machine level language and then we have the
high level languages.
so now as I said before in this high level languages we can convert the code from higher
level language to machine code in two different ways one is the compilation method another
one is interpretation method.
let's see this compilation and interpretation method in detail.
so first see the compilation. so in the compilation method a program called
compiler is used and this compiler Will take the high level language program and it will
convert that to the machine language and this process is called as the compilation method
and here what happens is this compiler will read the high level language program let's
say this is high level language program it will read this program and it will convert
that to the machine language. it will convert this entire program into machine language
and then this machine language code will be executed.
so the thing is compiler will convert entire program which is written in the high level
language to machine level language and then that machine level language code will be executed.
now let's take a look at this interpretation method so here also we will be converting
the program written in the high level language to the machine level language and then executing
that. and for that purpose we will be using a program called as the interpreter and this
process is called as the interpretation.
so the process of converting the high level language program to machine language by using
the program interpreter is called as the interpretation method now here what happens is lets say this
is the source code or the programs written in the high level language and this interpreter
what it does is first it will read the first line of this source code or the program which
is in the high level language and then it will convert that to the machine code and
then it will execute it immediately and after that it will go to the next line of the high
level language program it will read that it will convert that code and then it will execute
it immediately and then it will go to the third line and then again it will convert
that code and then it will execute it.
so in the compilation process the entire program which was written in the high level language
was read first then it was converted to machine level language and then that entire program
was executed at once but with the interpretation method the interpreter will read the program
which is in the high level language line by line it and it will convert and execute each
line immediately at a time. and this is how the compiler and interpreter work.
now there are many languages in the high level language type and in that languages some follow
the compilation method and some follow the interpretation method.
the languages which follow the compilation method are called as the compiled languages
and for example we have C C + + etc these are all the compiled languages where the compilation
method is used to convert the program iwhich is 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 we have Python and this Python is an interpreted
language.
All right. this is it guys this is about the computers computer programming types of programming
languages compilation and the interpretation method and I really hope that you have learn
something from this video and if you like this video then give a thumbs up and if you
don't like it then give a thumbs down and also share your opinion about this video what
do you think about it and if you think that this video will help some of your friends
then do share this video with them and also you can subscribe to our channel if you want
to watch more tutorials like this and if you subscribe to our channel then when I upload
a new video you will be get notified immediately. so thank you for watching this video and I'll
see you in Next tutorial.
5.0 / 5 (0 votes)