gen. of comp

8
Generation of Computer languages What is computer lanquage? A computer language is the means by which instructions and data are transmitted to computers. Put another way, computer languages are the interface between a computer and a human being. There are various computer languages, each with differing complexities. For example, the information that is understandable to a computer is expressed as zeros and ones (i.e., binary language). However, binary language is incomprehensible to humans. Computer scientists find it far more efficient to communicate with computers in a higher level language. Generations 1. The first generation languages, or 1GL are low-level languages that are machine language. 2. The second generation languages, or 2GL are also low- level languages that generally consist of assembly languages. 3. The third generation languages, or 3GL are high-level languages such as C.C++,jav, cobol 4. The fourth generation languages, or 4GL are languages that consist of statements similar to statements in a human language. Fourth generation languages are commonly used in database programming and scripts. 5. The fifth generation languages, or 5GL are programming languages that contain visual tools to help develop a program. A good example of a fifth generation language is Visual Basic. Ist generation First-generation language is the lowest level computer language. Information is conveyed to the computer by the programmer as binary instructions. Binary instructions are the equivalent of the on/off signals used by computers to

description

Generation of computer

Transcript of gen. of comp

Page 1: gen. of comp

Generation of Computer languagesWhat is computer lanquage?

A computer language is the means by which instructions and data are transmitted to computers. Put another way, computer languages are the interface between a computer and a human being. There are various computer languages, each with differing complexities. For example, the information that is understandable to a computer is expressed as zeros and ones (i.e., binary language). However, binary language is incomprehensible to humans. Computer scientists find it far more efficient to communicate with computers in a higher level language.

Generations

1. The first generation languages, or 1GL are low-level languages that are machine language.

2. The second generation languages, or 2GL are also low-level languages that generally consist of assembly languages.

3. The third generation languages, or 3GL are high-level languages such as C.C++,jav, cobol

4. The fourth generation languages, or 4GL are languages that consist of statements similar to statements in a human language. Fourth generation languages are commonly used in database programming and scripts.

5. The fifth generation languages, or 5GL are programming languages that contain visual tools to help develop a program. A good example of a fifth generation language is Visual Basic.

Ist generation

First-generation language is the lowest level computer language. Information is conveyed to the computer by the programmer 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.

2nd generation

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

Page 2: gen. of comp

programming assist, assembly language makes use of mnemonics, or memory aids, which are easier for the human programmer to recall than are numerical codes.

3rd GenerationThe 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 became the first high-level programming language (or "source code") to be used by many computer users.

In the early 1960s, scientists at Dartmouth College in New Hampshire developed BASIC (Beginner's 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-by-line, 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.

Page 3: gen. of comp

4th Generation

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 English-like words and phrases. When they are implemented on microcomputers, some of these languages include graphic devices such as icons and onscreen 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.

Advantage and Disadvantage

1.Machine languages

Disadvantages of machine languages:1. Programs had to be written using binary codes unique to each computer.2. Programmers had to have a detailed knowledge of the internal operations of the specific type of CPU they were using.3. Programming was difficult and error-prone4. Programs are not portable to other computers.

2.Assembly language

Advantages:1. Uses symbolic coded instructions which are easier to remember2. Programming is simplified as a programmer does not need to know the exact storage location of data and instructions.3. Efficient use of computer resources is out weighted by the high costs of very tedious systems development and by lock of program portability.

Page 4: gen. of comp

Disadvantage:1. Assembler languages are unique to specific types of computers.2. Programs are not portable to other computers.

3. High-Level Languages (procedural)Advantages:

1. Easier to learn and understand than an assembler language as instructions (statements) that resemble human language or the standard notation of mathematics.2. Have less-rigid rules, forms, and syntaxes, so the potential for error is reduced.3. Are machine-independent programs therefore programs written in a high-level language do not have to be reprogrammed when a new computer is installed.4. Programmers do not have to learn a new language for each computer they program.

Disadvantages:1. Less efficient than assembler language programs and require a greater amount of computer time for translation into machine instructions.

4. Fourth-Generation Languages: (4GL's)Advantages:1. Simplified the programming process.2. Use nonprocedural languages that encourage users and programmers to specify the results they want, while the computers determines the sequence of instructions that will accomplish those results. 3. Use natural languages that impose no rigid grammatical rules

Disadvantages:1. Less flexible that other languages2. Programs written in 4GLs are generally far less efficient during program execution that programs in high-level languages. Therefore, their use is limited to projects that do not call for such efficiency.

Compiler and InterpreterCompiler: A compiler is program that converts the instruction of a high level language into machine language as a whole. A program written in high level language is called source program. After the source program is converted into machine language by the compiler, it is called an object program.

The compiler checks each statement in the source program and generates machine instructions. Compiler also checks syntax errors in the program. A source program containing an error cannot be compiled into an object program.

A compiler can translate the programs of only that language for which it is written. For example C++ compiler can translate only those programs, which are

Page 5: gen. of comp

written in C++. Each machine required a separate compiler for each high level language.

Interpreter: An interpreter is a program that converts one statement of a program at a time. It executes this statement before translating the next statement of the source program. If there is an error in the statement, the interpreter will stop working and displays an error message.

The advantage of interpreters over compilers is that an error is found immediately. So the programmer can make corrections during program development.

The disadvantage of interpreter is that it is not very efficient. The interpreter does not produce an object program. It must convert the program each time it is executed. Visual basic uses interpreter.

Compiler vs Interpreter

An interpreter translates some form of source code into a target representation that it can immediately execute and evaluate. The structure of the interpreter is similar to that of a compiler, but the amount of time it takes to produce the executable representation will vary as will the amount of optimization. The following diagram shows one representation of the differences.

Page 6: gen. of comp

Compiler characteristics:

spends a lot of time analyzing and processing the program the resulting executable is some form of machine- specific binary code the computer hardware interprets (executes) the resulting code program execution is fast

Interpreter characteristics:

relatively little time is spent analyzing and processing the program the resulting code is some sort of intermediate code the resulting code is interpreted by another program program execution is relatively slow