Different Types of Programming Language
Different Types of Programming Language
Different Types of Programming Language
1. Machine Language
2. Assembly Language
3. High-level Language
Machine Language:
1. Only language understood/directly execute by the computer without using a translation program.
2. Written as strings of binary 0 and 1.
3. Circuitry of computer is wired in a manner that it immediately recognizes the machine language instruction, and
converts them into the electrical signals needed to execute them.
4.
OPCODE OPERAND
(Operation code) (Address/ Location)
Assembly Language
1. Introduced in 1952
2. Use alphanumeric mnemonic code, instead of numeric.
Example: using ADD instead of 1110, SUB instead of 1111
3. Allow storage locations to be represented in the form of alphanumeric address.
Example: FRST, SCND and ANSR instead of 1000, 1001 and 1010.
4. Provides pseudo-instructions, which are used for instructing the system how we want the program to be
assembled inside the computer’s memory.
Example:
1. Machine Independent.
2. Can be easily ported and executed on any computer, which has the translator software for the high-level
language.
3. Programmers need not know anything about the internal structure of the computer
4. Allows programmers to mainly concentrate on logic of the problem
5. Enable programmers to write instructions using English words and familiar mathematical symbols and
expressions.
Machine independent
Easier to learn and use: Similar to natural language.
Fewer errors: Programmer concentrate more on logic. Furthermore, compilers and interpreters are
designed to automatically check syntax error.
Lower program preparation cost
Better documentation: very similar to natural language. Can easily be understood by a programmer
familiar with the problem domain.
Easier to maintain.
Lower Efficiency: take more time to execute, require more memory space.
Less Flexibility: normally do not have instructions or mechanism to control the computer’s CPU,
memory and registers.
Compiler:
Translator Program (software) that translate high-level language program into its equivalent machine language
program.
Translate source code from a high-level programming language to a lower level language.
Each high level language instruction can be translated into a set of machine language instructions, rather
than a single machine language instruction (one-to-many correspondence).
FORTRAN compiler is only capable of translating source programs, written in FORTRAN.
f
Figure:
In addition to doing translation job compilers also automatically detect and indicate syntax errors.
Compiler cannot detect logical errors.
Interpreter
Programming Paradigms represent the style of programming. There are many programming paradigms, the difference
between them is basically in concepts and representation of elements. A few points related to programming paradigms
are given below:
Non-Structure Programming:
Structured Programming: