A programming language is an artificial language that can be used to control the behavior of a machine, particularly a computer. It is defined through the use of syntactic and semantic rules, to determine structure and meaning respectively. Programming languages are used to facilitate communication about the task of organizing and manipulating information, and to express algorithms precisely. There are large number of programming language in use. We can identify three type of programming languages :
- machine languages
- assembly languages
- high-level languages
Machine code or machine language is a system of instructions and data directly executed by a computer's central processing unit. Machine code is the lowest-level of abstraction for representing a computer program.Instructions are patterns of bits with dfferent patterns corresponding to different commands to the machine. Machine code has several significant disadvantages : very difficult for a human to read and write, a program written on one computer cannot run on a different computer, so it cannot be used to write large program or program intended to run on different machines.
An assembly language is a low-level language for programming computers. It implements a symbolic representation of the numeric machine codes and other constants needed to program a particular CPU architecture.
This representation is usually defined by the hardware manufacturer, and is based on abbreviations (called mnemonics) that help the programmer remember individual instructions, registers, etc. An assembly language is thus specific to a certain physical or virtual computer architecture
A utility program called an assembler, is used to translate assembly language statements into the target computer's machine code.
Although assembly is more friendly than machine code, use of assembly offer several disadvantages, for instance, each type of computer has its own assembly language or programming assembly requires much time and effort. Hence, assembly language is not use to write large programs. However, there are some computer application, such as in writing program that control peripherals, assembly is still a necessity.
A high-level programming language is a programming language that, may be more abstract, easier to use, or more portable across platforms.
Examples of high level languages include:
- Visual Basic
Such languages often abstract away CPU operations such as memory access models and management of scope.These languages have been implemented by translating to machine languages.
There are two types of translators
Compiler is a program that translate source code from a high-level programming language to a lower level language (e.g., assembly language or machine language)
Interpreter is a program that translates and executes source language statements one line at a time.
Published on Tue 03 July 2012 by Li Pyonjo in Computer Science with tag(s): programming languages