In this term paper we will have a brief glimpse of various languages, all called programming languages, which make it possible for us to interact with the computers. Find paragraphs, long and short term papers on ‘Programming Language’ especially written for college and IT students.

Term Paper on Programming Languages


Term Paper Contents:

  1. Term Paper on the Introduction to Programming Languages
  2. Term Paper on the Machine Language
  3. Term Paper on the Assembly Language
  4. Term Paper on the High Level Language
  5. Term Paper on Translators
  6. Term Paper on Some High Level Languages 
  7. Term Paper on the Fourth Generation Languages


Term Paper on Programming Language # 1. Introduction to Programming Languages:

ADVERTISEMENTS:

The unique characteristic which distinguishes human beings from all other species, is the ability to communicate using languages as a medium. Basically these languages, called natural language, are nothing but phonetic codes capable of being represented by groups of specially designed characters called alphabets — a person, however, need not be literate to communicate with some body of his clan in mother tongue.

But if we want to communicate with somebody outside our group, a foreigner, we will have to learn the codes — alphabets, words and their meanings, and grammars. Similarly, if we want to communicate with some inert device like a computer, we will have to develop a programming language which both of us can understand.

Unfortunately, the computers, as you know, are brain-less machines and they, naturally, do not have any mother-tongue, and no vocal ability, at least not yet. In order to solve this problem, experts have developed several need-based languages, called formal language, to interact with computers — it is certainly a spectacular achievement to enable a human being to “talk” to a machine.

In the earliest computers, many of the operations were controlled by manually setting different switch positions, as is still being done in some analog computers, which naturally took considerable time and made it impossible to utilize the full speed of processing possible with the available hardware. Hence, the next improvement was controlling these so called switches, or rather switch-like two-state devices, by using numeric codes called machine codes.

ADVERTISEMENTS:

Since our decimal number system could not be efficiently used for this purpose, a new number system using only two digits, called Binary Number System came into existence; its 0s and 1s representing “on” and “off” positions of these two state devices used in the hardware. The codes, called binary or machine codes, were series of 0s and 1s, whether to represent data, or instructions to control machine operations.

This language was called Machine Language — it worked directly with the hardware and was also called Low Level Language; requiring no translator for the computer to understand what it said, operating at the hardware level. The instructions were carried out immediately as they were received.

But to use machine language, you have to have thorough knowledge of the hardware and the memory addressing techniques — each data and instruction having unique location, given by specific addresses, the programmer has to specify those addresses for various operations — a highly skilled job. Moreover, this machine language is hardware dependent, not being portable from one hardware system to another.

To make life a bit easier for the programmers, a cousin of the machine language, called Assembly Language, came into use which allows using of small combination of English language characters, called mnemonics, an aid to memory, to represent various computer instructions — the need for using 0s and 1s were eliminated.

ADVERTISEMENTS:

The codes so developed are called assembly codes and these are much easier to remember. However, a translator is required to convert these assembly codes into the machine codes, which the machine understands. The assembly language also falls in the category of low-level language, though in terms of generation, it is called Second Generation Language; the machine language being the sole representative of the First Generation Language.

By this time, however, a short-hand code of binary system had been developed called Hexadecimal Number System, which allows four binary digits to be represented by a single hexadecimal or hex digit. Both these developments helped the programmers a lot in making lesser mistakes, but it still called for intimate knowledge of computer’s hardware and memory addressing system, and it remained hardware dependent.

The next in line came a number of languages, collectively called High Level Language, which enable the programmers to use familiar English words to a large extent without bothering about hardware architecture or its addressing system, to get programs developed. Generally, the instruction codes used in high level languages, called high-level codes, are much easier to use and remember.

Naturally, translators are also required to convert the high-level codes to the machine codes. But even then, certain sacrifices have to be made when using high level languages. Generally, these codes do not provide facilities to make 100% utilization of the computer’s hardware, because of different limitations.

ADVERTISEMENTS:

The programs written in these languages are also relatively much bigger in size than programs written in low level languages, for same set of operations and execution time is more. Many programmers, use assembly language for certain parts of their program, the bulk being written in a high level language; by integrating the two languages, called interfacing.

For example, the C language is a very powerful high level language originally developed for writing the UNIX Operating System. Even then, out of 13,000 lines of code 800 lines have been written in assembly language, the rest being written in C language. That is why Peter Norton says — high level languages let us tap into 90% of the computer’s skills, while assembly language lets us use 100%, if we are clever enough.

Just to give you an idea, an example is given below to show the difference between high and low level language programming. The example is an instruction for displaying a “*” on the screen.

Here one PRINT command of BASIC takes care of 4 lines of system code of Assembly/Machine Language [actually it is much more because the last two instructions have a number of built-in codes], but the size of the .bas file is 14 bytes as against 8 bytes of the machine-coded program; the latter is capable of being run independently.

ADVERTISEMENTS:

When compiled with Turbo Basic to make a stand-alone program, which can be executed directly like the machine-coded program, the file size of the BASIC program increases still further to 29,008 bytes. Naturally, the 8 byte file of assembly language runs faster than 29,008 byte file of BASIC.


Term Paper on Programming Language # 2. Machine Language:

As already stated, the various instructions under the machine level language are written by using a series of 0s and 1s. The total number of binary digits used together depends on the basic configuration of the Central Processing Unit. If the CPU is designed to operate at the level of 16 bits, then there will always be at least 16 number of 0s and 1s in a set in most of the cases for instructions.

Similarly, for 32 bits machines, there will be 32 numbers of 0s and 1s. Moreover, apart from programming to keep the instructions at a specific location during execution, the instructions in most cases have to specify the data or the location of the data, otherwise it is implied. Hence, each instruction consist of two parts — the first part contains the operation code or opcode in short, and the second part contains the operand.

The opcode signifies what operation is to be carried out and the operand indicates on-what the operation is to be carried out; it either gives the value of the data or the location of the data which is to be manipulated.

The greatest advantage is that these instructions are directly and immediately executed. Each type of microprocessor has definite instruction codes fixed by design and these group of instructions is called instruction-set. In order to make full utilization of hardware, it is essential to master the full instruction set.

As far as machine language programming is concerned, it will be extremely difficult for you at this stage of learning to grasp the intricacies of machine language. However, some simple instruction codes are given below, of an Intel 8088 /8086 16-bit microprocessor for a simple addition. Let us say, we want to add 58 with 46 and these are moved to AX [accumulator] and BX registers respectively before computation, where they are temporarily stored.

As you know, these two registers are inside the CPU. We can add the value in the register BX, which is 46, with that in the AX register, which is 58, giving the result in AX itself, value of BX remaining unchanged.

Then the codes would be:

The first instruction, which is 3 bytes long [24 bits], transfers 003A which is the hex equivalent of 58 to the AX register — B8 is the opcode and 3A00 is the operand. Similarly, in the second instruction BB is the opcode and 002E [46] is the operand. In the third instruction, 01 is the opcode and D8 is the operand, which refers to the locations of 58 and 46.

When the value of the data is given in the instruction itself, as in steps 1 and 2, it is called Immediate-addressing mode. When the value of the data is given in the register, as in step 3, it is called Register-addressing mode. When the address of the data is kept in the register, it is called Indirect-addressing mode. There are many such addressing modes in machine language programming, which are used in the operand.


Term Paper on Programming Language # 3. Assembly Language:

The tedious difficulties encountered with machine language for using 0s and 1s, resulted in development of the Assembly Language, which is also a low-level language. In assembly language programming, combination of alphabets, almost representing the meaning of the operation to be performed, are used as operation codes or opcodes — these being called mnemonics, or an aid to memory For example, LDA is used to mean load accumulator, ADD to mean addition, etc.

Our earlier example of adding 58 and 46 in machine language can be written in assembly language as:

The assembly language programs are prepared in three stages, as detailed below:

1. Write the source-code, using the instruction set in a text-editor.

2. Assemble the source-code to an object-code by using an assembler.

3. Link the object-code using a Linker to convert the object-code to directly executable program, which is exactly like the machine-coded program.


Term Paper on Programming Language # 4. High Level Language:

In spite of many plus points of low-level languages like full ability to control the hardware for maximum utilization, programming with low-level language is difficult, time consuming, with chances of making mistakes being very high. Moreover, these are machine dependent to some extent.

However, as far as the microcomputers are concerned downward compatibility has been maintained in the newer chips with earlier chips, and there are also non-Intel chips like those from NEC, which are compatible with Intel chips — offering the same hardware for different machines. Downward compatibility means that a low-level program written for 8088 chip, would also operate in 80386 chip; the latter providing many more additional facilities.

To overcome the difficulties faced by the low-level language programmers, high-level languages have been developed, the first one being named FORTRAN, written in 1957.

The main advantages intended to be provided by the high-level languages are:

1. Introducing the concept of variables, as we have them in school-level algebra, to hold data values of different types which can be represented easily by using the names given to these variables, without bothering about where and how these are stored.

2. Replacing mnemonics of assembly language by common familiar English words to make it much easier to follow the commands and their syntax.

3. Totally eliminating the opcode-plus-operand style of instructions, making knowledge of internal architecture of CPU and peripheral devices redundant.

4. Design standard operation oriented commands by combining several low-level instructions into one high-level instruction, making basic hardware control operation transparent to the programmer, especially in Input/output operations — the programmer being unware of what happens inside, such as, when a file is opened.

5. Divorcing the software from hardware to make the program machine independent.

6. Introducing good error checking routines for detection of syntax error and reporting to the programmer in non-cryptic manner.

7. Developing small useful programs for typical operations and storing them in special files called Library Files for repeated use, whenever required. For example, there are a number of such programs, called functions, for various mathematical, string, date, and other applications.

The basic approach of high-level language is problem oriented — providing facilities to the programmer to solve problems in various ways. For example, there are high level languages for solving commercial problems, scientific applications, industrial problems, etc. Generally, high-level languages are called Procedural Language as it requires the programmers to give the steps of the procedures to arrive at the final result.


Term Paper on Programming Language # 5. Translators:

Programs written in any programming language, other than machine language, have to be translated into the machine language before execution, as the computer can only understand machine codes and nothing else. Among the translators, the assemblers are a special class of compilers which translate assembly language mnemonics to appropriate machine codes.

For high level languages, there are two types of translators, both being extensively used. These are called compilers and instructors. There is a difference in their basic approach, although both perform similar type of jobs.

Interpreters are used in microcomputers, where it is loaded after the operating system, like say MS DOS, when it is ready with its DOS prompt. The most popular interpreter in use is that of BASIC language. The essential requirement is that the language interpreter, once it is loaded in the main memory as a layer over the operating system, all programming activities are carried under its direct control, until the programmer “exit” from the environment by using a special command like SYSTEM in BASIC.

The language interpreter provides a text-editor where the instructions are written, as per the rules of the interpreter. When the programmer gives the command to execute, each line of the instruction is translated into machine code after checking the syntax — if there is no error, it is executed and the next instruction is picked up for processing.

Thus a program written for use with interpreter is translated as many times as it is executed, the interpreter translating each instruction in logical sequence all the time. The advantage is that the programmer can quickly correct his mistakes, as the interpreter directly interacts with the programmer.

As far as the compilers are concerned, generally an external text-editor is used to write the set of instructions for the program, which is called source-code. After writing the source-code as per syntactical rules, the computer is given the filename of the source-code and is executed. The compiler converts the source- code to object-code, which is largely in machine code with some additional activities required to be done to make it fully executable, which is done at the next stage.

In the last stage, the object-code is linked with appropriate library files to produce the executable file, which can be directly executed under the appropriate environment of the operating system for which it is prepared. For example, if a BASIC program has been completed under MS DOS, it can be executed straightway at the DOS prompt by typing the name of the program file — a compiler having done all translating activities earlier, it runs much faster than the interpreted program.

High Level Language


Term Paper on Programming Language # 6. Some High Level Languages:

In terms of generation of computer languages, the high level languages are called third generation languages, the machine language and assembly language being called first and second generation languages respectively.

Some of the important third generation languages [3GLs] are briefly discussed below:

Fortran [Formula Translation]:

Designed in 1957 by a team of IBM headed by John Backus. It is used for scientific calculation extensively.

COBOL [Common Business Oriented Language]:

It was designed during 1959-60. As the name suggests, it is used extensively for commercial application.

Under the COBOL format, every program has four distinct divisions called Identification Division, Environment Division, Data Division, and Procedure Division.

PL/1 [Programming Language “One”]:

It was designed by a committee organized by IBM in mid-1960s. It was aimed to be universal language for both scientific and commercial application. It combined some of the feature of COBOL, FORTRAN, and ALGOL.

ALGOL [Algorithmic Language]:

It was developed in 1958 by an international group of mathematician of Europe and USA. It is used for scientific and mathematical work.

BASIC [Beginner’s All-Purpose Symbolic Instruction Code]:

It has been developed by T.E. Kurtz and J.G. Kemeny at Dartmouth College, USA, in early 1960 as an interactive language. It is not suitable for large volume of data. Extremely popular. It is a simpler version of FORTRAN. Later developments are called Quick BASIC, Visual BASIC, etc.

PASCAL [Named to honour Blaise Pascal]:

It has been developed by Niklaus Wirth in 1969 at Federal Institute of Technology, Switzerland. It is a structured language and was developed to teach programming as a systematic activity. It is a descendant of ALGOL.

APL [Sometimes called A Programming Language]:

It is an interactive language developed by Kenneth Iversion between mid-1950s and mid-1960s. It does not have the usual control structures like IF-THEN-ELSE.

ADA [Named in the honour of Lord Byron’s daughter Lady Augusta Lovelace — the first programmer of the world]:

The development of the program was sponsored by the Department of Defence, USA, in 1980. It was a product of international design competition.

RPG [Report Program Generator]:

Developed in 1960s to generate output reports. Can be used in business application problems.

SNOBOL:

Designed during 1960s as a string processing language by Ralph Griswold of Bell Laboratories.

LISP [List Processor]:

It is designed by John McCarthy in late 1950s. It is used in the area of artificial intelligence programming.

PROLOG [Programming Logic]:

It is a declarative language used in artificial language programs.

C:

This language which has many of the features similar to low-level language was developed by Dennis Ritchie in 1972 at Bell Laboratories. It is an efficient programming language, which has been used for writing the UNIX operating system. Can be used for scientific and business problems.

LOGO:

It was developed in late 1960s by Seymour Papert at MIT, USA. It is an interactive program which can be used by the children to draw pictures. It is also used for serious scientific work.


Term Paper on Programming Language # 7. The Fourth Generation Languages:

The term 4GLs refer to Fourth Generation Languages, because these are thought to be at a higher level than the High Level Languages, which are called the Third Generation Language. This class of programming packages provide built-in greater facilities to the users, especially in the area of data base management. They stress more on what aspect of a solution than the how part of it.

For example, in dBase III Plus or similar packages, a data base file can be created by simply using a CREATE command and then it offers the facility to define its structure easily; which would have required lot of program codes for the same facility in any high level language.

A 4GL is often regarded as a very high level language, which provide additional facilities to the programmer in defining data, data validation procedures, detailing processing steps, designing screens for input/output operations, handling user queries, etc. — all these being able to do without very little user programming codes, as is common with high level languages.

In fact, word-processing packages, electronic spread-sheets, and data base packages all qualify as 4GLs, although it is specially used for data base packages incor­porating query languages like ORACLE, INGRES, SYBASE, INFORMIX, etc. These can be regarded as advanced application generators — which writes the source code in high level language when what is to be done is given to them.