Program is a set of instruction given to the computer to perform particular operation.
Programming language is the set of instructions through which humans interact with computers.
There are two type of programming language
- Low level programming language
- High level programming language
Low level language program
Low level language programs are related to specific architecture and hardware of specific types of computer. It is much less human readable in nature. Example:
- Assembly level programming
Assembly level programming used to develop a code for specific hardware. We use plenty of mnemonic code. Assembler is used to convert assembly level language to machine level language where machine can understand.
Ex: ADD A, B
- Machine level programming
Machine level programs are in the form of binary in 0s and 1s
Ex: 11010100 11001011
High level language program
It is totally different language from what computer understands. Syntax of high level language is easy to understand by human. Since machine can’t understand this language, required compiler/interpreter to convert high level program to machine level programming language. Ex: C, C++, Java, Python etc.
Assembler is used to convert LLL to machine code whereas Compiler or Interpreter are used to convert MML to machine code.
Compiler is a program that converts high level program to machine code that processor can understand. In other word compiler is a program that converts human readable language to machine readable language. Code conversion process is totally different than Interpreter. Compiler converts code into machine code before program run. Compiler process is faster compare to interpreter.
Compiler takes entire program as an input for execution. Programming languages like C, C++, C# etc. are using Compiler.
Interpreter also converts high level program to machine code. It converts the code during program is running.
Interpreter takes single line of code as an input for execution. Programming languages like PHP, Perl etc. Ruby languages are using Interpreter.