All we known about computer that it is a electronic device. It do it task after instruction are given to it by the user.
But we should also known about it’s language too.
Computer is a machine oriented. It understand only programming language & machine language or we can say binary language.
What is Binary Language ????
Binary is a way to show any type of data (such as number and text ). Computer work only in binary language. Binary is a number system and is known as a base 2 system because it uses two characters- 0 & 1
Basic Types of Programming & Computer Languages are :
1.Low – Level Language
a) Machine Language
b) Assembly Language
a) Algebraic Formula -Type Processing
b)Business Data Processing
c) String & List Processing
d) Multi Purpose Processing
Briefly Explaination & Advantages or Disadvantages of a Languages
The set of instruction codes, whether in binary or in decimal notation, which can be directly understood by the computer without the helping of translating program is called a machine code or machine language program.
A computer understands information composed of only 0 and 1 . This means that a computer uses binary digits for its operation. The Computer’s instructions are therefore coded and stored in the memory .
A program written in the form of 0s and 1s is called a machine Language Program. One thing is that there is a specific binary code for each instruction.
1.It makes fast and efficient use of the computer
2.It requires no translator to translate the code i.e. directly understood by the computer.
1.All operation codes have to be remembered.
2.All memory addresses have to be remembered.
3.It is hard to amend or find errors in a program written in the machine language.
4.These language are machine dependent i.e a particular machine language can be used on only one type of Computer.
The instruction words which direct the computer are stored in the machine in numerical form. The programmer however rarely writes his instructions in numerical form instead, each instruction to the computer is written using a letter code to designate the operation to be performed, plus the address in the memory of the number to be used in the step of the calculation .
Later, the alphabetical section of the instruction word is converted to numerical form using an assembler .
An instruction word as written by the programmer therefore consist of two types :
a) The ” operation-code ” part which designates the operation like addition, Subtraction , multiplication etc. to be performed.
b) The address of the number to be used.
a. Programs written in machine language are replaceable by mnemonics which are easier to remember.
b. Memory Efficient.
c. It is not required to keep track of memory locations.
d. Faster in speed.
e. Easy to make insertions and deletions.
f. Hardware Oriented.
g. Requires fewer instructions to accomplish the same result.
a) Long programs written in such languages cannot be executed on small sized computers.
b) It takes lot of time to code or write the program, as it is more complex in nature.
c) Difficult to remember the syntax.
d) Lack of portability of program between computers of different makes.
High Level Language
To overcome the difficulties associated with assembly language, high-Level or procedure-oriented languages were developed.
High-Level languages permit programmers to describe tasks in a form which is problem oriented than the computer oriented .The instructions are written in a high Level Language is called statements.
The statements resemble more closely English and mathematics as compared to mnemonics in assembly language.
1.Beginner’s All Purpose Symbolic Insstruction Code (BASIC)
3.Formula Translation (FORTRAN)
4.Common Business-Oriented Language (COBOL)
5. Algorithmic Language (ALGOL)
· High level languages are programmer friendly. They are easy to write, debug and maintain.
· It provide higher level of abstraction from machine languages.
· It is machine independent language.
· Easy to learn.
· Less error prone, easy to find and debug errors.
· High level programming results in better programming productivity.
· It takes additional translation times to translate the source to machine code.
· High level programs are comparatively slower than low level programs.
· Compared to low level programs, they are generally less memory efficient.
· Cannot communicate directly with the hardware.
Translators of the computer Languages:-
A program written in high-level language is called as source code. To convert the source code into machine code, translators are needed.
A translator takes a program written in source language as input and converts it into a program in target language as output.It also detects and reports the error during translation.
Roles of translator are:
a. Translating the high-level language program input into an equivalent machine language program.
b. Providing diagnostic messages wherever the programmer violates specification of the high-level language program.
Different type of Translators
The different types of translator are as follows:
Compiler is a translator which is used to convert programs in high-level language to low-level language. It translates the entire program and also reports the errors in source program encountered during the translation.
Interpreter is a translator which is used to convert programs in high-level language to low-level language. Interpreter translates line by line and reports the error once it encountered during the translation process.
It directly executes the operations specified in the source program when the input is given by the user.
It gives better error diagnostics than a compiler.
Assembler is a translator which is used to translate the assembly language code into machine language code.