Introduction to Programming Languages

Language:


A language is a communication media between two parties( persons, computers, etc). For Communicating with the computer we need computer languages.
Computer languages are classified into 2 categories
I. Low level languages
II.High level language


I. Low level languages:- Low level languages are machine dependent languages.
These are 2 types
1. Machine Language (or) Binary language.
2. Assembly language


1. Machine Language (or) Binary language:- Machine language takes the code in the form of binary 1’s and 0’s because the internal circuits of a computer are made of switches, transistors, and other electronic devices that can be in the form of states: on or off. Off state represents with 0 and on state represents with 1. The only language understood by computer hardware is Machine Language. Introduced in 1940’s.
Disadvantages are:- 
1. Machine Dependent.
2. Difficult to program, read, modify.
3. Error prone.



2. Assembly language:- One of the first steps in improving the program preparation process was to substitute letter symbols-mnemonics for the numeric operation codes of machine language. In1950’s, Admiral Grace Hoper, a mathematician and naval officer, developed the concept of a special computer program convert programs into machine language.

Advantages of Assembly language:-
1. Easier to understand and use.
2. Easy to read, write and correct errors, easier to modify compare to machine language.
Limitations of assembly language:-
1. Machine dependent
2. Knowledge of hardware is required.
3. Machine level coding.
Assembler:- Assembler is a translator, which translates assembly language to machine language and vice versa. For conversion it takes lot of time. So they introduced high level language.


II. High level language:- This language enable the programmer to write instructions using English words and familiar mathematical symbols. Introduced in 1960’s.

Advantages:- 
1. Easy to Read, write and modify.
2. Machine Independent.

Compiler:- A compiler is software that translates a program from high level language to machine language and vice versa at a time.

Interpreter:- An interpreter is software that translates a program from high level language to machine language and vice versa in a step by step manner.

Differences between Compiler and interpreter?


Compiler
Interpreter
1. Compiler converts all statements at a time, if any errors are there, it displays all errors as a list.
1. Interpreter converts line by line, at the time of interpreting any error is there, it displays that error.
2. After Compiling the whole program, if the program is error free then it will execute the program.
2. After interpreting the first line, if it is error free then it will execute that line.
3. It is fast.
3. It is slow.


Programming languages: A programming language is a language used for writing programs to direct processing steps to be carried out by a computer. C is a programming language used for system software and new application software.

System Software:- System Software is developed for the machine.

Ex:- Interpreter, Compiler, Operating System etc.

Application Software:- Application Software is developed for the people.

Ex:- notepad, calculator, internet applications etc.

No comments:

Post a Comment