0.1 – Why Programming Language ?

by subbu on July 19, 2013

Computer is a machine made with the number of mechanical, electrical and electronic parts. Natively computer can understand limited set of instructions and must be told exactly what to do.

A set of instructions that tells the computer what to do is called a program. Combining set of programs to solve a problem is called software. The computer machinery that executes or understands the software is called hardware.

Programmers develop the software using any computer oriented language and users operate the computer using that software. So software works as a medium (bridge) among the user and computer.

Hardware vs Software

Machine language:

Computer can’t understand the instructions given in human conversational languages like English or French. It has its native language called machine language.

Each instruction in machine language is a set of binary packets. Here each binary packet is a combination of bits (1 or 0). These instructions are architecture dependent (not portable) that is instructions to Pentium 4 differs from Macintosh PowerPC.

At initial stages of computer development, programmers had to write programs directly in machine language. It is very difficult and time consuming.

machine language

Assembly language:

Though machine language is the native language of computer, due to the complexity in learning and programming, a new language called assembly language was invented.

In assembly language an instruction is a set of words, digits and symbols, not a set of bits. Memory locations are identified by names rather numbers (addresses). This makes the language easy to learn and program.

Assembly language is so fast because assembly language is tailored to a particular CPU. Assembly code written for one CPU will not be executed on another CPU that is, not portable.

Though assembly language is easier and faster, computer can not understand assembly language directly, it needs to be translated into computer native language called machine language. A translator called assembler is used to translate the assembly code into native machine code.

We need to write a lot of code to perform a simple task. For example, in assembly language we need to write 5 instructions to write x=5*3+2;

In spite of all these disadvantages, assembly language is still being used where speed is so important.

Before the invention of C-language most of the operating systems were developed in assembly language only.

assembly language

Low level languages:

Both the machine and assembly languages are considered as low level languages because these are close to computer with zero or less abstraction. These languages can directly interact with the processor without need of a translation.

These languages are fast and efficient but having disadvantages like lengthy code, not human readable, difficulty in learning, difficulty in programming and difficult in debugging (rectifying errors).

High level languages:

To address these concerns some of the languages like BASIC, COBOL, Pascal, FORTRAN, C and C++ were developed called high level languages.

These languages have better program development efficiency. Simple English words, operators and symbols made these languages easy to learn and practice.

Comparatively with low level languages, these languages are slow and less efficient.

Next post: