Programming Language





Language is a medium of communication. There are several languages developed in separate environment and geographical conditions. Nepali, Newari, Hindi, Maithili, Bhojpuri, Urdu, English, French, Germany, Japani etc are examples of Natural languages where as BASIC, FORTRAN, COBOL, LISP, C, C++, C#, JAVA etc are artificial or fabricated languages.

We express our motion – emotions, feelings, understandings, skill, affection and hatress through the languages. In this way, language is the bold and bonafide medium of expressions.

 

(a) Computer Language: It is a type of artificial language used to communicate with computer. We know that a computer is an electronic device works on ON and OFF (1 and 0) technique to read and write data. The history of computer language evolution is linked with Ada, disciple of Charles Babbage (Father of Computer) and daughter of famous English poet Byron. Ada is regarded as “First Programmer of a world “. We use several languages to communicate with others, just like it, we use many computer languages to communicate with computers e.g. BASIC, LOGO, COBOL, PASCAL, FORTRAN etc.

Computer understands only computer language written in binary or simple English followed by special syntax. It has small vocabulary, called reserve words or keywords. Higher level language like BASIC, FORTRAN, and PASCAL etc has no more than 200 reserve words when ever 7 or 8 years old child use more than 2000 words to communicate with others. Finally, we can say that computer language is a medium of communication between man (operator) and machine (computer).

 

(b) Program and Programmer: Program is the specific set of instructions, understandable to computer. It is used to produce desired results. Person who codes instructions using syntax of any computer languages is called programmer. In this way, programmer is a human ware dedicated for software development.

 

(c) Bugs and Debugging: In general, meaning of bug is a type of insect, but in computer terminology, the meaning of bug is problems that prevent a program from working properly. The history of term “bug” is associated with MARK-1. Once a moth (bug) is clanged to it, a program did not run properly due to short -circuiting, from that time any errors linked with program is termed as “bugs“.

Debugging: To eliminate problems (bugs) from program is called debugging. Programmers try to debug while they are developing programs or software, but often bugs crept into it, so, programmers’ productivity is very low. The debugging is also called verification. Some system programs are used for debugging. Some debugger programs are:

1. Simulators

2. Logic analyzers

3. Break points

4. Trace routines

5. Memory dumps etc.

 

Features of good programming Languages

Some special features of good programming languages are given below:

  • Simplicity: Simple programming language is easy in learning and coding. All the programmers like this type of language.
  • Naturalness: A language should be natural and problem oriented. Many languages have a key word (English word) like e.g., READ – DATA, PRINT, printf, writeln, DISPLAY, etc.
  • Efficiency: Efficiency of programs coding, error handling, problem solving are major criteria of higher languages. Efficient languages are widely accepted and used major problem area.
  • Compactness: Verbose languages have no compactness. In case of COBOL, lack of compactness is a major drawback. In PASCAL, C, C ++, JAVA, these drawbacks are removed. So, indented operations can be coded very concisely.
  • Extensibility: A good programming language should allow extension through simple, natural, and elegant mechanism.
  • Suitability: A language should be suitable to working environment .For instance, the program designed for data processing job should be operative in batch mode.

 

 

Low level and High level Language

 

Computer language is a set of instructions and programmers code it. Generally, computer language is divided into two categories according to evolutionary scale. These are: (a) Low Level and (b) high level language, but 3rd type of computer language is also developed, known as advance high level language which contains 4GL and 5GL .GL stands for Generation Language.

Classification of computer language

Classification of computer language


Generation-wise Classification:

 

  • First Generation (1940-50): Machine code is the first generation language, written in binary (0s and 1s), machine oriented, complex and executed without any language translators.
  • Second Generation (1950-1958): The second generation language is called assembly language, which is written in mnemonic. It is also a machine oriented, and language translator is needed to execute program. Language translator of assembly language is called Assembler.
  • Third Generation (1958-85): is a higher level language written in simple English obeying some specific rules called syntax .It is a machine independent and problem and procedure oriented. Language translators are used to translate program into machine code. These language translators are interpreters and compilers.
  • Fourth Generation (After 1985): It is an advanced high level language and generally called 4GL. It is easier for programmers and users to handle than third generation language .It is a non-procedural language, needed one tenth the numbers of statements than high level language to produce the same effects.
  • Fifth Generation (After 1990): This language is an advanced high level or very high level language. It resembles human speech, so no specific reserve words, syntax and coding are needed. AI (Artificial Intelligence) is used to add intelligence to understand natural language. Example: Clout, Savy Retriever, HAL (Human Access Language) etc.

 

Machine Code (Machine Language)

 

(a) Computer dependent language written in binary is called Machine code or Machine Language. It has two parts:

(i) Function Part (Opcode) and

(ii) Operand (Address part)

(b) Machine code requires a high level of programming skill along with sound knowledge of computer architecture and functions.

(c) Instructions written in binary are immediately executable without help of any language translators because computer understands only machine codes.

 

Disadvantage:

  • It is difficult to understand and develop a program using machine language.
  • It is a machine-oriented language.
  • The knowledge of computer internal architectures is essential for program coding.
  • Time consuming coding.
  • Debugging is tough and difficult.

 

Assembly Language:

 

(a) It is a low-level language in which mnemonics is used as instruction. So, mnemonic type languages are used in assembly language. Some mnemonics are given below:

ADD for Addition

SUB for Subtraction

LDA for load Accumulator

STA for store Accumulator

(b) Assembly language require ASSEMBLER to translate assembly language code into computer understandable code (Machine code) .So, it is not immediately executable.

(c) Machine oriented and time consuming program coding .It requires the programmer to have enough knowledge of computer architectures.

(d) Assembly language program is not as fast as machine code .It has to be first translated into machine (binary) language code.

 

Advantages:

  • Coding is faster than machine code language because mnemonics are used for program coding.
  • Less time consumed respect to Machine code languages.
  • Debugging is easy.

 

Disadvantage

  • Machine oriented language
  • The good knowledge of machine architectures is required.
  • Time consuming
  • Translator is used to translate program into machine code.
  • Not as fast as machine code language in case of execution

 

Mnemonic:

It is a short form of words like as acronym used in assembly language or second generation computer language. It is a memory aid with a sound resembling its meaning.

Example:

ADD for ADDition

CMP for COMPerision

HIO for Halt I/O

HLT HaLT Program

LDA for LoaD Accumulator

MVC for MoVe Character

MVN for MoVe Number

SIO for Start I/O

STA for STore Accumulator

SUB for SUBtraction

 

Programming Example:

BEGIN 20

NUM1 30

NUM2 9

SUM O

LDA NUM1

ADD NUM2

STA SUM

HLT

END

In this program 30 and 9 are added and stored in variable SUM.

 

High level Language

 

(a) The time and cost of creating machine and assembly languages were quite high and this is a first motivation for development of high-level computer language.

(b)High level language contains a set of instructions written in simple English. It is a set of some symbols, words and rules to instruct machine.

(c) The language is oriented towards the problem and procedures.

(d) Program written in high level language is called source program. A language translator is used to translate into object code (Machine code).

 

Advantages:

  • Simple English is used for program coding.
  • Machine independent
  • Problem and procedure oriented.
  • The knowledge of computer architectures is not necessary. It requires less time for program coding.
  • Program can be debugged easily and program maintenance is also easy.

4GL (4th Generation Language):

 

(a) It is a high level language in which fewer instruction codes are used to accomplish a particular task.

(b) It is a non-procedural language.

(c) Major 4th generation languages are used to get information from files and databases.

(d) Database oriented programming language.

(e) Handles user queries

(f) Codes are easy to write, read and understand.

(g) Machine independent language.

Example:

COLINGO, CUPID, DBASE- IV, FLORAL, FOCUS, FOXPRO 2.5, PROLOG, RAMS, SQL, SQUARE, and NOMAD



Related posts:

  1. Generation of Computers First Generation of computer: Features of first generation computer: -         ...
  2. Procedural oriented programming Procedural oriented programming (pop):- A program in a procedural language...
  3. What is kernel? Kernel: All the operating involving processes are controlled by a...
  4. Computer Software Generally, software is classified into two major groups (a) System...
  5. Embedded Technology Embedded systems are everywhere. It is a combination of hardware...