COMPUTER STUDIES-7010

Wednesday, June 17, 2009

PROGRAMMING LANGUAGES

A program is a set of instruction that the computer can understand. The computer can understand only binary code, all computer languages must be eventually reduced to binary code and the way this is done depends on the type of language used.

Low-Level-languages

Low-level languages are languages that are easy for the computer to understand but more difficult for the programmer to understand. Assembly language and Machine language (Machine code) collectively called low-level language.

Machine Language (or Machine code)

Machine language is the language directly understood by the machine. It consists of a series of 1’s and 0’s. Machine code is often machine specific, which means that one computer’s machine code will not be understood by a different type of computer. A program written in machine code needs no translation and is therefore very fast.

Assembly Language

An assembly language is a language that uses simple instruction such as ADD, SUB and is used in preference to machine code, since it is easier for the programmer to use and to debug (debugging means removing any mistake from the program). Once a program has been written in assembly language it needs translating into machine code by software called as assembler before it can be understood by a computer.

High-Level Language

High-level language is developed with the programmer in mind rather than the computer. Such language have the advantage that they are not as machine-dependent as machine codes or assembly language, so once a program has been written it can be used on different computers with very little alteration.

It is similar to English, which means that programming is made easier.

Advantages of high-level language

: Simple instructions similar to English make high-level language easy to understand

: It is easy to correct errors and test program.

: Program written in high-level languages can be used on different makes of computer.

Examples for high-level language

COBOL, BASIC, FORTON, C++, LOGO, JAVA, HTML (Hypertext Markup Language)

Compiler and Interpreters

Compiler & Interpreter are both programs that change high-level language instruction into machine-code. An interpreter is a translator of high level language program. These translators translate one instruction at a time.

A Compiler is a translator which is used to translate the whole source of a program at a time.

1 comment: