Computer Languages

views updated

Computer Languages

First-generation language

Second-generation language

Third-generation language

Fourth-generation language

Resources

A computer language is the means by which instructions and data are given to computers. Put another way, computer languages are the symbolic interface between a computer and human users. There are numerous computer languages, each with differing abilities. All are necessary, ultimately, because the form in which information can be directly handled by a computer at the physical level is in zeros and ones (i.e., binary language), but binary language is comprehensible to humans only with tedium and frequent mistakes. Computer scientists find it far more efficient to communicate with computers in a higher level language.

First-generation language

First-generation language is the lowest level computer language. The programmer conveys information to the computer as binary instructions. Binary instructions are the equivalent of the on/off signals used by computers to carry out operations. The language consists of zeros and ones. In the 1940s and 1950s, computers were programmed by scientists sitting before control panels equipped with toggle switches so that they could input instructions as strings of zeros and ones.

Second-generation language

Assembly or assembler language was the second generation of computer language. By the late 1950s, this language had become popular. Assembly language consists of letters of the alphabet. This makes programming much easier than trying to program a series of zeros and ones. As an added programming assist, assembly language makes use of mnemonics, or memory aids, which are easier for the human programmer to recall than are numerical codes.

Second-generation language arose because of the programming efforts of Grace Hopper, an American computer scientist and Naval officer. Hopper developed FLOW-MATIC, a language that made programming easier for the naval researchers using the ENIAC computer in the 1940s. FLOW-MATIC used an English-based language, rather than the on-off switch language the computer understood. FLOW-MATIC was one of the first high-level computer languages. A high-level computer language is one that is easier for humans to use but which can still be translated by another program (called a compiler) into language a computer can interpret and act on.

Third-generation language

The introduction of the compiler in 1952 spurred the development of third-generation computer languages. These languages enable a programmer to create program files using commands that are similar to spoken English. Third-level computer languages have become the major means of communication between the digital computer and its user.

By 1957, the International Business Machine Corporation (IBM) had created a language called FORTRAN (FORmula TRANslater). This language was designed for scientific work involving complicated mathematical formulas. It was the first high-level programming language to be used by many computer users.

Within the next few years, refinements gave rise to ALGOL (ALGOrithmic Language) and COBOL (COmmon Business Oriented Language). COBOL is noteworthy because it improved the record keeping and data management ability of businesses, which stimulated business expansion.

In the early 1960s, scientists at Dartmouth College in New Hampshire developed BASIC (Beginners All-purpose Symbolic Instruction Code). This was the first widespread computer language designed for and used by nonprofessional programmers. BASIC enjoyed widespread popularity during the 1970s and 1980s, particularly as personal computers grew in use.

Since the 1960s, hundreds of programming languages have been developed. A few noteworthy examples include PASCAL, first developed as a teaching tool; LISP, a language used by computer scientists interested in writing programs they hoped would give computers some abilities usually associated with intelligence in humans; and the C series of programs (i.e., C, C+, C++). The latter are object-oriented languages, where the object (data) is used by what are known as routines. The C series of programs first allowed a computer to use higher-level language programs like store-bought software.

The actual program written in the third-generation language is called the source program. This is the material that the programmer puts into the computer to obtain results. The source program can usually be translated into an object program (the language of zeros and ones that is interpretable by the computer).

Information in a source program is converted into the object program by an intermediate program called an interpreter or compiler. An interpreter is a program that converts (or executes, in programming jargon) a source program, usually on a step-by-step, line-byline, or unit-by-unit basis. The price for this convenience is that the programs written in third-generation languages require more memory and run more slowly than those written in lower level languages.

A compiler is a program that translates a source program written in a particular programming language to an object program that a particular computer can run. The compiler is a very specific interpreter, which is both language- and machine-dependent.

Block-structured language

Block-structured language grew out of research leading to the development of structured programming. Structured programming is based on the idea that any computer program can be written using only three arrangements of the information. The arrangements are called sequential, selection, and iteration. In a sequential arrangement, each programming instruction (statement) is executed one after the other. This order is vital. The execution of the second statement is dependent on the prior execution of the first statement. There is more flexibility built into the selection arrangement, where choices are typically made with an IF. . .THEN. . .ELSE structure. Iteration is also known as loop structure. Loop structures specify how many times a loop will be executed. In other words, a command can be executed a number of times until the task is completed.

PASCAL, ALGOL, and MODULA-2 are examples of block-structured languages. Examples of non-block structured languages are BASIC, FORTRAN, and LISP. Refinements of BASIC and FORTRAN produced more structured languages.

Block-structured languages rely on modular construction. A module is a related set of commands. Each module in a block-structured language typically begins with a BEGIN statement and ends with an END statement.

KEY TERMS

Binary digit Either of two digits (0 or 1) used to express numbers in binary scale. In binary scale, the base is two, and successive places denote units, twos, fours, etc. Thus, 10 in the binary scale represents the number 2 in base ten, and 100 the number 4.

Fourth-generation language

Fourth-generation languages attempt to make communicating with computers as much like the processes of thinking and talking to other people as possible. The problem is that the computer still only understands zeros and ones, so a compiler and interpreter must still convert the source code into the machine code that the computer can understand. Fourth-generation languages typically consist of Englishlike words and phrases. When they are implemented on microcomputers, some of these languages include graphic devices such as icons and on-screen push buttons for use during programming and when running the resulting application.

Many fourth-generation languages use Structured Query Language (SQL) as the basis for operations. SQL was developed at IBM to develop information stored in relational databases. Eventually, it was adopted by the American National Standards Institute (ANSI) and later by the International Standards Organization (ISO) as a means of managing structured, factual data. Many database companies offer an SQL-type database because purchasers of such databases seek to optimize their investments by buying open databases, i.e., those offering the greatest compatibility with other systems. This means that the information systems are relatively independent of vendor, operating system, and computer platform.

Examples of fourth-generation languages include PROLOG, an artificial intelligence language that applies rules to data to arrive at solutions; and OCCAM and PARLOG, both parallel-processing languages. Newer languages may combine SQL and other high-level languages. IBMs Sonnet is being modified to use sound rather than visual images as a computer interface.

In 1991, development began on a refinement of C++ that would be adaptable to the Internet. The result, in 1995, was Java. The program formed the basis of the Netscape Internet browser, but can be interpreted by all browsers. Java enables files to be acquired from the Internet in order to run programs or sub-programs that add functionality to Web pages. This adaptability has made Java a very popular language.

See also Modular arithmetic; Virtual reality.

Resources

BOOKS

Sebesta, Robert W. Concepts of Programming Languages. Indianapolis, IN: Addison Wesley, 2004.

Sudkamp, Thomas A. Languages and Machines: An Introduction to the Theory of Computer Science. Indianapolis, IN: Addison Wesley, 2005.

Tucker, Allen B. and Robert Noonan. Programming Languages. New York: McGraw-Hill Science/Engineering/Mat, 2006.

OTHER

Jason Voegele. Programming Language Comparison. <http://jvoegele.com/software/langcomp.html> (accessed October 23, 2006).

Randall S. Frost

About this article

Computer Languages

Updated About encyclopedia.com content Print Article