Computer programming Language.
What is programming Language?
The series of instructions given to the computer's processor to do a certain job and throw the output is commonly known as the computer program. The machine(computer) doesn't understand our common language. To interact with computer we should send instructions in a way the computer is supposed to understand. We use some specific language to communicate and write program in computer , which is known as programming language.
We may use the programming language to write a thousands lines of codes as a program, But the computer doesn't understand the instruction unless it is translated into its machine language(0&1). All the programs written in programming language(except machine level language) is first translated into machine understandable form for its successful execution. Assemblers,Compilers and Interpreter are the examples of Language translators.
Compilers and Interpreter:
Compilers and Interpreter both are used to translate high level programming language's codes into machine language. But compiler and interpreters are quite different in features.
Difference between Compiler and Interpreter
It translates a whole program at a time
It translates a line of code at a time
It generates executable codes after translation
No executable codes generated
Errors are detected only after compilation
Errors are known at each line
Less time for translation
Takes more time as compared to compiler
compiled programs are faster
Interpreted programs are rather slow
Can be used for both small and huge size program
only used in small blocks of code.
Types of programming language
There are lots of programming languages developed till date. They are classified into High level language and low level language.
- Low level language:
Machine level language or First generation language.
Assembly level language or Second generation language.
- High level language.
Procedural language or Third generation language.
Problem oriented language or Fourth generation language.
Low Level Language:
Low level languages are closer to machine architecture. Low level language are called machine dependent programming language because program written in one platform cannot be executed in another platform. Low level language are very hard to understand and program. There are lots of instruction sets and a programmer should understand all of those instruction sets and also available sets of registers and internal computer architecture too. Low level languages being too difficult are rarely used for some specific propose , so it is not a general purpose programming language.
The programming language in which every lines of instructions and statements are written in Binary form(0&1) is known as machine Language. Since the Program is written in 0&1 the CPU can directly understand and there is no need of any translation.
- Programs written in this language runs fastest of all.
- Programs written in Machine language needs no translation.
- Very difficult among all other programming language.
- Lots of instruction is required even for a small program.
- High chance of errors.
- Difficult in tracing errors and fixing them.
- Programmers are required to memorize the machine codes for different architecture.
program written in one processor architecture does not run in another processor.
Machine level language is very complex as it has to be written in 0's and 1's form. So there evolved another Programming language to simplify the complexity of programming and is known as Assembly language. Assembly languages are quite simpler then machine language because 0's and 1's are replaced by short abbreviated English words called mnemonics. ADD, SUB, MUL, DIV, HALT ets are some examples of mnemonics.
This language were first used in Second generation computers so it takes the name of Second generation programming language.Since this language does not use the concept of binary digits, the program codes written in this language should be first translated to machine understandable form using translators.
- Easier then Machine level Language.
- Faster in execution as compared to high level languages
- Higher efficiency then high level languages
- Machine dependent.
- Programs written in Assembly programming languages are slow as compared to those programs written in Machine language.
- Codes written in assembly language needs to be translated to machine language for its execution.
- Program development in this language is still slow and tedious job.
- Mnemonics used in this language are hard to remember, this makes programmer confused during coding.
High Level Language:
High level language is the simplest programming language as it uses plain English structures and mathematical notations to create a program, which is simple, clear and easy to understand as compared to first generation and second generation language. These language is known as machine independent programming language because program written in one machine architecture can be executed in all different machine architecture without any modifications.
It saves time and cost. A single line of statement can be enough to perform certain task in High Level Programming language. This is the reason why this language is favourite among most of the programmers. Some high level languages includes c, c++, Java, Python etc. High level language are used to write huge size programs.
Since high level language is not understood directly by machine, the codes and instruction written in this language is first converted using translators(compiler or interpreter). The translators checks the codes and if free from errors compiles it to form an executable programs else shows message indicating errors. High level languages are generally cateorized into two basic groups
- Procedure Oriented Language:
It is third generation language which is based in the concept of modularity. Entire program is divided into different modules, which further consists of different procedures called functions or subroutines. This language focuses on the procedures to find the problems rather then instructions. Keywords are used to write instructions which are more flexible then first and second generation programming languages.
- Statements are easy to use
- It is general purpose language.
- More procedure oriented, i.e needs step by step instructions.
- Used for batch processing operation.
- Programs are easy to understand and modify.
- Time saving
- Machine independent.
- Problem Oriented Language.
Problem oriented language is also known as application specific and is used to solve specific problems. This language is result oriented and lets the user specify what the output should be, without describing all the details of how data should be manipulated to produce the result.
- Programmers should know the machine characterstics.
- Do not need step by step instructions.
- Closer to human language and hence easy to understand and use.
- Easy to check the errors and fix them.
- Faster and easier coding is possible.
- Use of standard math symbols.
- machine independent.
- Code re-usability.
Natural language is a concept in modern technology in which instructions are given to the computer as the way much similar to how general people uses to communicate.
Some widely used programming language.
Name of the language
C programming language
AT&T Bell Labs