Introduction - Computers, Programs and Generations
After completing this lesson you should be able to:
If you are new to computing or computer program or this is the first time you have used this lesson then you should start with the first topic and follow the suggested order. This lesson introduces some basic concepts which will be useful when it comes to dealing with some of the later topics.
When you have finished the lesson you will find some questions to do. These will help you to assess how much you have learned.
Since the objective of this course is to learn how to design 3GL programs it might be helpful to try to understand what is meant by some of the terms used. For instance what is a computer, what is a computer program and what is a generation in the computer programming language sense?
A computer is a machine, probably the most complex machine yet devised by man. If I were to define a computer I might say that:
If you look at the computer definition in reverse order - starting with "A computer can execute sequences of instructions" - you have a definition of a computer program - it is a sequence of instructions which the CPU interprets as arithmetical and logical operations. A computer program is stored in memory and also consists of data and instructions. The input-output circuits (I/O) enable the machine to transfer data between the machine and the external world.
Instructions and programs imply that there is some order in what the computer does, that is, there is an element of design. A program designer determines what instructions and data structures are required in order to get the machine, the computer, to complete some given task. Most significantly the designer determines the sequence in which the instructions will be carried out (executed) in order to successfully complete the program.
We have some idea of what a computer is and what a computer program is, what about generations of languages?
The notion of generation implies growth and Figure 1 depicts the growth in computer languages since the 1940's. This figure is not meant to be exact, just to give some idea of the times that the different generations appeared, time scales and the relativity of computer languages to each other and the world of problem-solving.
The vertical axis represents problem-definition in computer terms; in other words it represents how we state or write computer programs. At the bottom of the scale is the machine-oriented definition. This means that a computer program is stated in a language which is closer to the native language of the computer than it is to the native language of the program designers - you and me. At the top of this axis is the human-oriented problem definition. This means that the problem definition - the computer program - is stated in terms that are closer to the language of the designer than the language of the machine. This obviously is the preferred way of programming.
The machine understands problems stated in terms of 1's and 0's, for example:
101011110001010001000101111010010101010
but humans prefer to state problems in a human language, like this:
ADD this week's total to last weeks
The horizontal axis of Figure 1 shows time and represents the approximate time at which a given generation of computer language came into use and the period over which the language generation was or is in use.
Keep in mind that this figure is an approximation and just because it shows 3GL's finishing in the late 1980's it doesn't mean that 3GL's are no longer used. If only life was so simple! In practice there are no well-defined leaps from one generation to another and no well-defined times when one generation comes into general use. You could look into almost any significant programming project and probably find that there may be three generations of computer language being used at the same time. It is quite common to find projects that use some assembly language, some 3GL and some 4GL.
The later generations of computer language enable program designers and programmers to write programs which use approximations to human language.
Since a computer program is a sequence of instructions which operate on data we can show this in a simple model:
The model implies that the program processes data which comes from a source and goes to a destination - the data sink. Although it isn't always the case, in larger programs and programming systems the source and sink are usually external to the program. A data source will be an input or storage device like a keyboard, disk drive, scanner, tape drive, a data sink will be an output or storage device like a computer screen, printer, disk drive, tape drive, plotter etc.
The last topic in this section is a brief explanation of the terms data and information. These terms tend to be used interchangeably but should not be, even "reliable" dictionaries tend to use data as a synonym for information. Data represents a value which in the absence of a context has no specific meaning. Information is data with meaning. For example, assume we have the list of numbers:
24.56, 11.94, 27.23, 40.11
What do they mean? The meaning of the numbers depends on the context in which they are used. They might represent average temperatures in a room, or hourly payrates in a small business. The numbers might be stored on a disk drive and it would be possible to write a computer program which read the numbers from the disk drive - the data source - and treated them as temperatures. Another program could read the same numbers and treat them as dollar values. The program determines the context.
In this lesson you were introduced to some basic concepts which will helpful in understanding the later lessons. You should now be able to define what is meant by the terms computer and computer program, you should have some idea of how computer languages have developed, and you should have some undestanding of how data and information differ.
The next lesson introduces algorithms and variables, different ways of expressing algorithms and a strategy for designing algorithms.
Before going on the next lesson you might like to try these questions and assess how you went with this lesson..
Return to the index
Go to the next lesson
This publication is copyright David Beech and Learning Systems 1997-2002
and may not be reproduced by any means without the written permission of
David Beech.
9 Wyndella Street, Tasmania, Australia