Programming Language

Table of Contents

Programming Language

A Programming language is a set of symbols that instructs the hardware of computer to perform a specified task. Programming language is set of rules to use these symbols called syntax. A computer can only do what a programmer asks it to do. To perform a particular task the programmer writes a sequence of instructions, called the program by using these Symbols. An instruction is a command given to the computer to perform a certain specified operation on the given data.

Computer language can be classified into the following categories:-

  • Low Level Language
  • High Level Language

 

MACHINE LANGUAGE (Late 1940):-

The set of Instructions Written as strings of binary 1s and 0s that can be understood by the computer without using a translation program, is called a machine code of machine language program.

Alphabet, Number to Binary Code –

 

ASSEMBLY LANGUAGE (Early 1950):-

It is a low level programming language in which alphanumeric mnemonic codes are used for the instructions in the computer. Each statement of such a language is translated into many machine language statements.

Basic elements

Any Assembly language consists of 3 types of instruction statements which are used to define the program operations:

  • opcode mnemonics ( opcode = operation code)
  • data sections
  • assembly directives

Program of assembly Language:-

C:\>debug

-a

0B2D:0100      START                 (Assembly directives)

0B2D:0100      MOV AX, 04

0B2D:0103      MOV BX, 06       (Data sections)

0B2D:0106      ADD AX, BX       (Opcode mnemonics)

0B2D:0108      END

 

HIGH LEVEL LANGUAGE (1950 to 1970):-

These languages enable the programmer to write instructions using English words and familiar mathematical symbols. A programming language whose structure is application oriented and is independent of the structure of the computer. Each statement of such a language is translated into many machine language statements.

High level languages are also known as problem-oriented languages because the macro instructions are especially picked to be useful for solving particular types of problems.

Program is High-Level Programming language(C):-

Swap (int v[ ], int k)

{

int temp; temp=v[k]; v[k]= v[k+1]; v[k+1]=temp;

}

FOURTH GENERATION LANGUAGE(4GL) (late 1970 onwards):-

It is non procedural language. That is, the programmer specifies what has to be done instead of how the task is to be performed.

A fourth-generation programming language is a programming language or programming environment designed with a specific purpose in mind, such as the development of commercial business software.

Some fourth-generation languages:-

  • FoxPro
  • PowerBuilder
  • WinDev
  • SQLWindows/Team Developer
  • SQL
  • PL/SQL
Language Translator (Utility S/w):-

Assembler: – Assembler is a utility (translator) program that provides facility to convert assembly language programming (source) code into machine code.

An assembler is a program that takes assembly Language instructions and converts them into a pattern of bits (machine code) that the computer’s processor can use to perform its basic operations.

Each computer’s assembly language required its one assembler.

Interpreter: – Interpreter is a utility (translator) program that provides facility to convert high level programming language source code into machine code.

  • Interpreter interpret source program line by line and convert into machine
  • Interpreted program’s size in
  • Interpreter interpret source program line by line so it is

Compiler: – Compiler is a utility (translator) program that provides facility to convert high level programming language source code into machine code.

Compiler read whole program then convert into machine code so it is less costly.

 

Difference between Interpreter & Compiler:-

Interpreter:-

Compiler:-

•   Convert Program line by line.

•   Program size is smaller.

•   Interpreting process is more costly.

• Interpreter used by:- Java, Visual Basic

•   Convert whole program at same time.

•   Program size is not smaller.

•     Compiling process in less costly then the interpreting process.

•   Compiler used by:- C, C++, Pascal, Java

You May Like to Browers More