Introduction To Computer PDF
Introduction To Computer PDF
Introduction To Computer PDF
The Course
Course Aims
Course Objectives
Assessment
Tutor Marked Assignment
End of Semester Examination
Summary
2
INTRODUCTION
Computer is fast becoming the universal machine of the 21st century. Early computers
were large in size and too expensive to be owned by individuals. Thus they were
confined to the laboratories and few research institutes. They could only be programmed
by computer engineers. The basic applications were confined to undertaking complex
calculations in science and engineering. Today, computer is no longer confined to the
laboratory. Computers and indeed, computing have become embedded in almost every
item we use. Computing is fast becoming ubiquitous. Its application transcends science,
engineering, communication, space science, aviation, financial institutions, social
sciences, humanities, the military, transportation, manufacturing, extractive industries to
mention but a few.
Also, early computers were designed to accept numeric data but over the years
computers have been developed to accept not only numeric data, computers can now
process multimedia data – text, audio and video. The combination of computer
technology and communications technology gave birth to what is now widely known as
Information and Communication Technologies (ICT). ICT has changed the face of
virtually, all fields of human endeavour, ranging from science to engineering, commerce
and industry, international trade, transportation, culture and tourism, education and
research, among others. Nowadays, literacy is not only measured by the ability to read
and write, but also include computer literacy. The wave of globlisation which has been
largely propelled by the collapse of barriers of distance between nations and peoples in
the world as result of ICT, makes it imperative for the modern man to have at least the
basic knowledge of computers. This course is meant to introduce students to the
historical evolution of computers, the basic components of computers, and some of its
applications in the society.
3
THE COURSE
This course Guide tells you what to expect from reading this material. The study of
computers is not only of academic importance but that of a universal tool of the twenty-
first century. This course, therefore, presents a systematic approach to the understanding
of computers and its applications.
COURSE AIMS
The aim of this course is to provide students with the basic understanding of the
computer and its applications in everyday life.
COURSE OBJECTIVES
The specific objectives of this course are to:
• Provide basic understanding of the historical evolution of the computer, types of
computers and the classification of computers.
• Enable the students understand the components of the computer – the hardware
and software.
• Help students to identify the different categories of computer software and their
uses.
• Introduce students to computer programming with emphasis on the building
blocks and stages of programming and writing of computer programs using visual
basic.
• Enable students to identify and appreciate the areas of application of computers
in the society, thereby stimulating their thought to regard computer as a tool for
human use rather than a master.
• Create awareness at the early stage of the study of computers about the potential
threats that computer viruses poses to the smooth operations of computers.
4
dedication to study on the part of the students. You are therefore, advised to avail
yourself the opportunity of attending the tutorial sessions where you would have the
opportunity of comparing knowledge with your peers.
THE COURSE MATERIAL
You will be provided with the following materials:
Course guide
Modules
Study units
List of recommended textbooks which will serve as compliments to the course material
COURSE OUTLINE
The course is made up of seven modules organized into 19 study units as follows:
5
Unit 12: Programming in Visual Basic (1)
Unit 13: Visual Basic project window
Unit 14: Creating Menu Applications
Unit 15: Analyzing Visual Basic Data
6
Unit 8: This unit builds on the knowledge acquired in the previous unit by this
discussing various types of language translators, utility programs and application
programs in greater detail.
Unit 9: In this unit you will learn about computer programming languages such as low
level language (machine language and assemblers) and the high level languages.
Unit 10: You will be introduced to computer programming in this unit. Topics covered
include the concept of problem solving with computers, principles of programming and
stages of programming.
Unit 11: This unit advances further on unit 10 by discussing the use of flowchart and
algorithms in computer programming. These two concepts are essential ingredients to the
writing of well structured computer programs.
Unit 12: This unit begins our discussions on programming the computer in Visual Basic.
Units 12 through 15 are dedicated to this subject. The discussions are practical in nature.
The materials presented in these four units are in the form of hands-on-practice. You will
benefit more and in fact, enjoy it better if you can try them using a personal computer.
The steps involved are simple and explicit. By the time you run through the four units
you should be able to write simple visual basic application programs. Specifically, unit
12 introduces the concept of working with graphical objects, general visual basic
programming concepts, how to design a project from application wizard; and how to use
toolbox.
Unit 13: In this unit you will learn about the visual basic project window. This will
enable you gain more mastery of the visual basic programming environment.
Unit 14: In this unit you will learn how to create menu applications. The menu system is
one of the high points of object oriented programming languages. It makes the
application user-friendly and interactive. This unit therefore, equip you with the
principles and steps involved in creating visual basic applications with menu.
Unit 15: This unit concludes the discussions on programming computers in visual basic.
Specifically, this unit takes you through the analysis of visual basic data. If you have
truly followed all the principles and steps discussed in the three previous units you
should at this stage be able to plan, design, code and implement a simple but complete
visual basic application.
Unit 16: This unit begins the series of presentations on the areas of application of
computers in the society. The main aim is to identify some areas of application to the
7
society at large. It is also meant to enlighten you on the various job opportunities for
computer literate persons in the society. Specifically, in this unit, you are presented with
detailed discussion on the areas of application of computers in education.
Unit 17: This unit furthers the discussion on the areas of application of computers by
presenting in greater details its application in business and industry. It discusses
application of computer in the development and operations of payroll, inventory control,
auditing operations, personnel record keeping, preparation of customer utility bills and
payment orders, management information system, high quality production control, point
of sale service, financial market and publishing industry.
Unit 18: This unit concludes the discussions on the areas of application of computers
with particular reference to its application in science and engineering, health care,
transport and communications, recreation, government and the military.
Unit 19: This is the concluding unit of this course. It presents discussion on computer
virus as one of the major threats to the smooth operations of the computers. Detailed
discussions on computer virus, its mode of transmission, detection, prevention and cure,
are presented.
TEXT BOOKS
More recent editions of these books are recommended for further reading.
Akinyokun, O.C, (1999). Principles and Practice of Computing Technology.
International Publishers Limited, Ibadan.
Balogun, V.F., Daramola, O.A., Obe, O.O., Ojokoh, B.A., and Oluwadare S.A., (2006).
Introduction to Computing: A Practical Approach. Tom-Ray Publications,
Akure.
Chuley, J.C. (1987). Introduction to Low Level Programming for Microprocessors.
Macmillan Education Ltd.
Francis Scheid (1983). Schaum’s Outline Series: Computers and Programming.
Mcgraw-Hill Book Company, Singapore.
Gray S. Popkin and Arthur H. Pike (1981). Introduction to Data Processing with
BASIC, 2nd edition, Houghton Mifflin Company, Boston.
Oliver E.C. and Chapman R.J. (1986). Data Processing, Seventh Edition. ELBS/DP
Publications.
Richard H. Austing and Lillian Cassel (1986). Computers in Focus. Books/Cole
8
Publication Company. Monterey, California
Tunji and Dokun (1993). Data Processing, Principles and Concepts. Informatics Books,
Lagos.
In addition, to these books, you can browse on the internet to get additional materials on
the topics covered in this course.
ASSESSMENT
There are two components of assessment for this course. The Tutor Marked Assignment
(TMA), and the end of course examination.
SUMMARY
This course intends to introduce you to the basic understanding of computers and its
application in various areas of human endeavour. By the time you complete studying this
course, you should be able to answer basic questions such as:
• What is computer?
• What are the evolutionary trends in the development of the computer?
• What are the different components of computer?
• What are the different categories of computer software?
9
• What are the areas of application of computers in the society?
• How could you use computer to create a user-friendly, menu-driven and
interactive applications?
• What are the threats to the smooth operations of the computer?
• How can you detect, prevent and cure computer viruses?
We wish you success in this course. We do hope that this course will give you a good
head start in the understanding and use of computers.
Best wishes as you enjoy the course.
10
AGE 202: INTRODUCTION TO COMPUTERS (2 UNITS)
COURSE MANUAL
• Basic concepts
• Generations of computers
• Classification of computers
11
Table of Contents
Characteristics of a computer
1.0 Introduction
Computer is fast becoming the universal machine of the 21st century. Early computers
were large in size and too expensive to be owned by individuals. Thus they were
confined to the laboratories and few research institutes. They could only be programmed
laboratory. Computers and indeed, computing have become embedded in almost every
item we use. Computing is fast becoming ubiquitous. Its application transcends science,
mention but a few. This unit presents the background information about computers.
2.0 Objectives
The objective of this unit is to enable students understand the following basic concepts:
12
3.0 Definitions
d. giving out the result (output) on the screen or the Visual Display Unit (VDU).
(DATA) (INFORMATION)
Data: The term data is referred to facts about a person, object or place e.g. name, age,
or interview etc.
The following are the three major methods that have been widely used for data
a. Manual method
c. Computer method.
13
Manual Method
The manual method of data processing involves the use of chalk, wall, pen pencil and the
like. These devices, machine or tools facilitate human efforts in recording, classifying,
manipulating, sorting and presenting data or information. The manual data processing
tiresome, boring, frustrating and time consuming. Furthermore, the processing of data
by the manual method is likely to be affected by human errors. When there are errors,
then the reliability, accuracy, neatness, tidiness, and validity of the data would be in
doubt. The manual method does not allow for the processing of large volume of data on
Mechanical Method
The mechanical method of data processing involves the use of machines such as
typewriter, roneo machines, adding machines and the like. These machines facilitate
virtually no creative thinking. The mechanical operations are noisy, hazardous, error
prone and untidy. The mechanical method does not allow for the processing of large
Computer Method
The computer method of carrying out data processing has the following major
features:
14
e. Output reports are usually very neat, decent and can be produced in various forms
such as adding graphs, diagrams, pictures etc.
f. Accuracy and reliability are highly enhanced.
Below are further attributes of a computer which makes it to be an indispensable
tool for human being:
3.2
Charac
teristics of a Computer
Characteristics of Computer
1. Speed: The computer can manipulate large data at incredible speed and
response time can be very fast.
2. Accuracy: Its accuracy is very high and its consistency can be relied upon.
Errors committed in computing are mostly due to human rather than
technological weakness. There are in-built error detecting schemes in the
computer.
3. Storage: It has both internal and external storage facilities for holding data
and instructions. This capacity varies from one machine to the other.
Memories are built up in K(Kilo) modules where K = 1024 memory
locations.
4. Automatic: Once a program is in the computer’s memory, it can run
automatically each time it is opened. The individual has little or no
instruction to give again.
5. Reliability: Being a machine, a computer does not suffer human traits of
tiredness and lack of concentration. It will perform the last job with the same
speed and accuracy as the first job every time even if ten million jobs are
involved.
6. Flexibility: It can perform any type of task once it can be reduced to logical
steps. Modern computers can be used to perform a variety of functions like
on-line processing, multi-programming, real time processing etc.
15
3.3 The Computing System
The computing system is made up of the computer system, the user and the environment
The Hardware
The computer hardware comprises the input unit, the processing unit and the output unit.
The input unit comprises those media through which data is fed into the computer.
The processing unit is made up of the Arithmetic and Logic Unit (ALU), the control unit
and the main memory. The main memory also known as the primary memory is made up
of the Read Only Memory (ROM) and the Random Access Memory (RAM).
The output unit is made up of those media through which data, instructions for
processing the data (program), and the result of the processing operation are displayed
for the user to see. Examples of output unit are the monitor (Visual Display Unit) and
the printer.
Software
Computer software are the series of instructions that enable the computer to perform a
Computer Users
16
Computer users are the different categories of personnel that operates the computer. We
have expert users and casual users. The expert users could be further categorized into
The computing environment ranges from the building housing the other elements of the
computing system namely the computer and the users, the furniture, auxiliary devices
such as the voltage stabilizer, the Uninterruptible Power Supply System (UPS), the fans,
the air conditioners etc. The schematic diagram of the computing system is presented in
The Computing
System
17
Hardware
Input unit
Processing unit
Output unit
Software
18
Computer users
Computing environment
The computer is a machine used for a variety of purposes. Its use transcends all areas of
human endeavour owing to the advantages of computer method of data processing over
5.0 Summary
i. Computer is any electronic device that can accept data, process it and produce
an output.
ii. The computer method of data processing is superior to the manual and
iii. The computing system is made up of the computer system, the users and the
computing environment.
1b. What are the advantages of computer method of data processing over manual and
2. Draw the schematic diagram of a computing system and describe each of the
components.
Balogun, V.F., Daramola, O.A., Obe, O.O., Ojokoh, B.A., and Oluwadare S.A., (2006).
20
STUDY UNIT 2: HISTORICAL OVERVIEW OF THE COMPUTER
Table of content
Generations of computer.
1.0 Introduction
The computer as we know it today has evolved over the ages. An attempt is made in this
unit to present in chronological order the various landmarks and milestones in the
development of the computer. Based on the milestone achievement of each era the
however, is not rigid as we may find one generation eating into the next.
2.0 Objectives
The objective of this unit is to enable the student to know the processes leading to the
emergence of the modern computer. There can be no present without the past just as the
future depends on the present. By the end of this unit, students should be able to
appreciate and visualize the direction of research in computer technology in the nearby
future.
the ancient Chinese abacus, the Jacquard loom (1805) and Charles Babbage’s “analytical
engine” (1834). It would also include discussion of mechanical, analog and digital
computing architectures. As late as the 1960s, mechanical devices, such as the Marchant
calculator, still found widespread application in science and engineering. During the
early days of electronic computing devices, there was much discussion about the relative
merits of analog vs. digital computers. In fact, as late as the 1960s, analog computers
were routinely used to solve systems of finite difference equations arising in oil reservoir
modeling. In the end, digital computing devices proved to have the power, economics
and scalability necessary to deal with large scale computations. Digital computers now
dominate the computing world in all areas ranging from the hand calculator to the
supercomputer and are pervasive throughout society. Therefore, this brief sketch of the
computers.
The evolution of digital computing is often divided into generations. Each generation is
computational science. The following history has been organized using these widely
Three machines have been promoted at various times as the first electronic computers.
electromechanical relays. In principle the electronic switches were more reliable, since
they would have no moving parts that would wear out, but technology was still new at
22
that time and the tubes were comparable to relays in reliability. Electronic components
had one major benefit, however: they could “open” and “close” about 1,000 times faster
of physics and mathematics at Iowa State, in 1937. Atanasoff set out to build a machine
that would help his graduate students solve systems of partial differential equations. By
1941, he and graduate student Clifford Berry had succeeded in building a machine that
could solve 29 simultaneous equations with 29 unknowns. However, the machine was
A second early electronic machine was Colossus, designed by Alan Turning for the
British military in 1943. This machine played an important role in breaking codes used
by the German army in World War II. Turning’s main contribution to the field of
computer science was the idea of the Turing Machine, a mathematical formalism widely
used in the study of computable functions. The existence of Colossus was kept secret
until long after the war ended, and the credit due to Turning and his colleagues for
designing one of the first working electronic computers was slow in coming.
The first general purpose programmable electronic computer was the Electronic
Numerical Integrator and Computer (ENIAC), built by J. Presper Eckert and John V.
Mauchly at the University of Pennysylvania. Work began in 1943, funded by the Army
Ordinance Department, which needed a way to compute ballistics during World War II.
23
The machine wasn’t completed until 1945, but then it was used extensively for
calculations during the design of the hydrogen bomb. By the time it was
decommissioned in 1955 it had been used for research on the design of wind tunnels,
random number generators, and weather prediction. Eckert, Mauchly, and John Von
Neumann, a consultant to the ENIAC project, began work on a new machine before
ENIAC was finished. The main contribution of EDVAC, their new project, was the
notion of a stored program. There is some controversy over who deserves the credit for
this idea, but no one knows how important the idea was to the future of general purpose
computers. ENIAC was controlled by a set of external switches and dials; to change the
program required physically altering the settings on these controls. These controls also
limited the speed of the internal electronic operations. Through the use of a memory that
was large enough to hold both instructions and data, and using the program stored in
memory to control the order of arithmetic operations, EDVAC was able to run orders of
magnitude faster than ENIAC. By storing instructions in the same medium as data,
designers could concentrate on improving the internal structure of the machine without
Regardless of who deserves the credit for the stored program idea, the EDVAC project is
of instructions for a computer, can be encoded as numbers, the EDVAC group knew the
instructions could be stored in the computer’s memory a long with numerical data. The
notion of using numbers to represent functions was a key step used by Goedel in his
24
incompleteness theorem in 1937, work which Von Neumann, as a logician, was quite
familiar with. Von Neumann’s background in logic, combined with Eckert and
Software technology during this period was very primitive. The first programs were
written out in machine code, i.e. programmers directly wrote down the numbers that
programmers were using a symbolic notation, known as assembly language, then hand-
translating the symbolic notation into machine code. Later programs known as
As primitive as they were, these first electronic machines were quite useful in applied
science and engineering. Atanasoff estimated that it would take eight hours to solve a set
of equations with eight unknowns using a Marchant calculator, and 381 hours to solve 29
equations for 29 unknowns. The Atanasoff-Berry computer was able to complete the task
in under an hour. The first problem run on the ENIAC, a numerical simulation used in
the design of the hydrogen bomb, required 20 seconds, as opposed to forty hours using
mechanical calculators. Eckert and Mauchly later developed what was arguably the first
commercially successful computer, the UNIVAC; in 1952, 45 minutes after the polls
closed and with 7% of the vote counted, UNIVAC predicted Eisenhower would defeat
25
The second generation saw several important developments at all levels of computer
system design, from the technology used to build the basic circuits to the programming
Electronic switches in this era were based on discrete diode and transistor technology
with a switching time of approximately 0.3 microseconds. The first machines to be built
with this technology include TRADIC at Bell Laboratories in 1954 and TX-0 at MIT’s
Lincoln Laboratory. Memory technology was based on magnetic cores which could be
accessed in random order, as opposed to mercury delay lines, in which data was stored as
an acoustic wave that passed sequentially through the medium and could be accessed
loops and floating point units for calculations based on real numbers. Prior to this
accessing successive elements in an array was quite tedious and often involved writing
self-modifying code (programs which modified themselves as they ran; at the time
viewed as a powerful application of the principle that programs and data were
fundamentally the same, this practice is now frowned upon as extremely hard to debug
and is impossible in most high level languages). Floating point operations were
26
During this second generation many high level programming languages were introduced,
commercial machines of this era include the IBM 704 and 7094. The latter introduced
I/O processors for better throughput between I/O devices and main memory.
The second generation also saw the first two supercomputers designed specifically for
reserved for a machine that is an order of magnitude more powerful than other machines
of its era. Two machines of the 1950s deserve this title. The Livermore Atomic
Research Computer (LARC) and the IBM 7030 (aka Stretch) were early examples of
machines that overlapped memory operations with processor operations and had
The third generation brought huge gains in computational power. Innovations in this era
include the use of integrated circuits, or ICs (semiconductor devices with several
designing complex processors, the coming of age of pipelining and other forms of
The first ICs were based on small-scale integration (SSI) circuits, which had around 10
devices per circuit (or “chip”), and evolved to the use of medium-scale integrated (MSI)
circuits, which had up to 100 devices per chip. Multilayered printed circuits were
27
developed and core memory was replaced by faster, solid state memories. Computer
overlapping CPU and I/O operations, and pipelining (internal parallelism) in both the
instruction stream and the data stream. In 1964, Seymour Cray developed the CDC 6600,
which was the first architecture to use functional parallelism. By using 10 separate
functional units that could operate simultaneously and 32 independent memory banks, the
CDC 6600 was able to attain a computation rate of 1 million floating point operations per
second (1 Mflops). Five years later CDC released the 7600, also developed by Seymour
Cray. The CDC 7600, with its pipelined functional units, is considered to be the first
vector processor and was capable of executing at 10 Mflops. The IBM 360/91, released
during the same period, was roughly twice as fast as the CDC 660. It employed
instruction look ahead, separate floating point and integer functional units and pipelined
instruction stream. The IBM 360-195 was comparable to the CDC 7600, deriving much
of its performance from a very fast cache memory. The SOLOMON computer,
Burroughs, the Department of Defense and the University of Illinois, was representative
of the first parallel computers. The Texas Instrument Advanced Scientific Computer (T
I-ASC) and the STAR-100 of CDC were pipelined vector processors that demonstrated
the viability of that design and set the standards for subsequent vector processors.
Early in this, third generation Cambridge and the University of London cooperated in the
its authors, an attempt to capture only the important features of the complicated and
28
sophisticated ALGOL. However, the ALGOL, CPL was large with many features that
1967).
The next generation of computer systems saw the use of large scale integration (LSI –
1000 devices per chip) and very large scale integration (VLSI – 100,000 devices per
chip) in the construction of computing elements. At this scale entire processors will fit
onto a single chip, and for simple systems the entire computer (processor, main memory,
and I/O controllers) can fit on one chip. Gate delays dropped to about Ins per gate.
Semiconductor memories replaced core memories as the main memory in most systems;
until this time the use of semiconductor memory in most systems was limited to registers
and cache. During this period, high speed vector processors, such as the CRAY 1,
CRAY X-MP and CYBER 205 dominated the high performance computing scene.
Computers with large main memory, such as the CRAY 2, began to emerge. A variety of
parallel architectures began to appear; however, during this period the parallel computing
efforts were of a mostly experimental nature and most computational science was carried
out on vector processors. Microcomputers and workstations were introduced and saw
29
Developments in software include very high level languages such as FP (functional
computed to the compiler and/or runtime system. These languages are not yet in wide
use, but are very promising as notations for programs that will run on massively parallel
computers (systems with over 1,000 processors). Compilers for established languages
started to use sophisticated optimization techniques to improve code, and compilers for
vector processors were able to vectorize simple loops (turn loops into single instructions
Two important events marked the early part of the third generation: the development of
the C programming language and the UNIX operating system, both at Bell Labs. In
1972, Dennis Ritchie, seeking to meet the design goals of CPL and generalize
Thompson’s B, developed the C language. Thompson and Ritchie then used C to write a
version of UNIX for the DEC PDP-11. This C-based UNIX was soon ported to many
different computers, relieving users from having to learn a new operating system each
time they change computer hardware. UNIX or a derivative of UNIX is now a de facto
the Lax report. In 1982, the US Department of Defense (DOD) and National Science
30
Foundation (NSF) sponsored a panel on Large Scale Computing in Science and
Engineering, chaired by Peter D. Lax. The Lax Report stated that aggressive and focused
contrast to the absence of coordinated national attention in the United States. The report
noted that university researchers had inadequate access to high performance computers.
One of the first and most visible of the responses to the Lax report was the establishment
of the NSF supercomputing centers. Phase I on this NSF program was designed to
cycles and training on three (and later six) existing supercomputers immediately
available. Following this Phase I stage, in 1984 – 1985 NSF provided funding for the
The Phase II centers, located in San Diego (San Diego supercomputing Centre); Illinois
Supercomputing Center); Cornell (Cornell Theory Center); and Princeton (John Von
valuable training programs and have developed several software packages that are
available free of charge. These Phase II centers continue to augment the substantial high
31
The development of the next generation of computer systems is characterized mainly by
the acceptance of parallel processing. Until this time, parallelism was limited to
pipelining and vector processing, or at most to a few processors sharing jobs. The fifth
generation saw the introduction of machines with hundreds of processors that could all be
computers.
Other new developments were the widespread use of computer networks and the
increasing use of single-user workstations. Prior to 1985, large scale parallel processing
was viewed as a research goal, but two systems introduced around this time are typical of
the first commercial products to be based on parallel processing. The Sequent Balance
processor had its own local cache). The machine was designed to compete with the DEC
VAX-780 as a general purpose Unix system, with each processor working on a different
user’s job. However, Sequent provided a library of subroutines that would allow
programmers to write programs that would use more than one processor, and the machine
The Intel iPSC -1, nicknamed “the hypercube”, took a different approach. Instead of
using one memory module, Intel connected each processor to its own memory and used a
32
memory was no longer a bottleneck and large systems (using more processors) could be
built. The largest iPSC-1 had 128 processors. Toward the end of this period, a third type
of parallel processor was introduced to the market. In this style of machine, known as a
data-parallel or SIMD, there are several thousand very simple processors. All processors
work under the direction of a single control unit; i.e. if the control unit says “add a to b”
then all processors find their local copy of a and add it to their local copy of b. Machines
in this class include the Connection Machine from Thinking Machines, Inc., and the MP-
Scientific computing in this period was still dominated by vector processing. Most
manufacturers of vector processors introduced parallel models, but there were very few
(two to eight) processors in these parallel machines. In the area of computer networking,
both wide area network (WAN) and local area network (LAN) technology developed at a
environment towards a distributed computing environment in which each user has their
own workstation for relatively simple tasks (editing and compiling programs, reading
mail) but sharing large, expensive resources such as file servers and supercomputers.
RISC technology (a style of internal organization of the CPU) and plummeting costs for
workstations and servers. This period also saw a marked increase in both the quality and
33
Transitions between generations in computer technology are hard to define, especially as
they are taking place. Some changes, such as the switch from vacuum tubes to
transistors, are immediately apparent as fundamental changes, but others are clear only in
retrospect. Many of the developments in computer systems since 1990 reflect gradual
improvements over established systems, and thus it is hard to claim they represent a
changes.
In this section, we offer some assessments about recent developments and current trends
This generation is beginning with many gains in parallel computing, both in the hardware
massively parallel architectures. Parallel systems now compete with vector processors in
terms of total computing power and most especially parallel systems to dominate the
future.
(Fujitsu) has announced plans to build a system with over 200 of its high and vector
processors. Manufacturers have set themselves the goal of achieving teraflops (1012
arithmetic operations per second) performance by the middle of the decade, and it is clear
this will be obtained only by a system with a thousand processors or more. Workstation
technology has continued to improve, with processor designs now using a combination of
34
RISC, pipelining, and parallel processing. As a result it is now possible to procure a
desktop workstation that has the same overall computing power (100 megaflops) as
One of the most dramatic changes in the sixth generation is the explosive growth of wide
area networking. Network bandwidth has expanded tremendously in the last few years
and will continue to improve for the next several years. T1 transmission rates are now
standard for regional networks, and the national “backbone” that interconnects regional
networks uses T3. networking technology is becoming more widespread than its original
in K-12 education, community networks and private industry. A little over a decade after
the warning voiced in the Lax report, the future of a strong computational science
infrastructure is bright.
4.0 Conclusion
The development of computer span through many generations with each generations
5.0 Summary
In this unit we have learnt that the development of computer spanned through six
generations.
35
a. Outline the major landmarks of the fourth and the fifth generations of computers.
Balogun, V.F., Daramola, O.A., Obe, O.O., Ojokoh, B.A., and Oluwadare S.A., (2006).
Tunji and Dokun (1993). Data Processing, Principles and Concepts. Informatics Books,
Lagos.
36
STUDY UNIT 3: CLASSIFICATION OF COMPUTERS
Table of contents
Categories of computers
- Digital computer
- Analog computer
- Hybrid computer
Classification by purpose
- Special purpose
- General purpose
Classification by capacity
- Main frame
- Mini computers
- Micro computers
1.0 Introduction
The computer has passed through many stages of evolution from the days of the
37
based on different criteria. In this unit, we shall classify computers based on three popular
methods.
2.0 Objectives
ii. Study the features that differentiate one class of the computer from the others.
Although there are no industry standards, computers are generally classified in the
following ways:
There are basically three types of electronic computers. These are the Digital, Analog and
Hybrid computers.
Digital Computer
Represent its variable in the form of digits. It counts the data it deals with, whether
representing numbers, letters or other symbols, are converted into binary form on input to
the computer. The data undergoes a processing after which the binary digits are
converted back to alpha numeric form for output for human use. Because of the fact that
business applications like inventory control, invoicing and payroll deal with discrete
values (separate, disunited, discontinuous); they are beset processed with digital
38
computers. As a result of this, digital computers are mostly used in commercial and
Analog Computer
It measures rather than counts. This type of computer sets up a model of a system.
Common type represents it variables in terms of electrical voltage and sets up circuit
analog to the equation connecting the variables. The answer can be either by using a
voltmeter to read the value of the variable required, or by feeding the voltage into a
plotting device. They hold data in the form of physical variables rather than numerical
quantities. In theory, analog computers give an exact answer because the answer has not
been approximated to the nearest digit. Whereas, when we try to obtain the answers
using a digital voltmeter, we often find that the accuracy is less than that which could
It is almost never used in business systems. It is used by the scientist and engineer to
Hybrid Computer
39
In some cases, the user may wish to obtain the output from an analog computer as
machine where the two are connected and the analog computer may be regarded as a
peripheral of the digital computer. In such a situation, a hybrid system attempts to gain
the advantage of both the digital and the analog elements in the same machine. This kind
of machine is usually a special-purpose device which is built for a specific task. It needs
a conversion element which accepts analog inputs, and output digital value. Such
converters are called digitizers. There is need for a converter from analog to digital also.
calculations can be dealt with by the digital elements, thereby requiring a large memory,
and giving accurate results after programming. They are mainly used in aerospace and
A special purpose computer is one that is designed to solve a restricted class of problems.
Such computers may even be designed and built to handle only one job. In such
machines, the steps or operations that the computer follows may be built into the
hardware. Most of the computers used for military purposes fall into this class. Other
40
Computers designed for tracking airplane or missiles.
Computers used for process control applications in industries such as oil refinery,
Computers used as robots in factories like vehicles assembly plants and glass
industries.
Special purpose computer are usually very efficient for the tasks for which they are
specially designed.
They are very much less complex than the General-Purpose Computers. The simplicity
of the circuiting stems from the fact that provision is made only for limited facilities.
They are very much cheaper than the General-Purpose type since they involve less
General-Purpose Computers
practice however, there are limitations imposed by memory size, speed and the type of
input/output devices. Examples of areas where the general purpose are employed include
the following:
• Payroll
• Banking
• Billing
• Sales analysis
41
• Cost accounting
• Manufacturing scheduling
• Inventory control
They are less efficient than the special-purpose computers due to such problems as;
Inadequate storage;
General Purpose Computers are more complex than the special purpose ones.
In the past, the capacity of computers was measured in terms of physical size. Today,
however, the physical size is not a good measure of capacity because the modern
A better measure of capacity today is the volume of work that computer can handle. The
volume of work that a given computer handles is closely tied to the cost and to the
memory size of computer. Therefore, most authorities today accept the price of rental
42
Here, both memory size and cost shall be used to rank (classify) computer into three main
categories as follows:
(a)Microcomputers
(b)Medium/Mini/Small Computers
Micro Computers
Microcomputers, also known as single board computers, are the cheapest class of
we have in the larger computers rather we have a microprocessor chip as the main data
processing unit. They are the cheapest smallest and can operate under normal office
condition. Examples are IBM, APPLE, COMPAQ, Hewlett Packard (HP), Dell Toshiba,
e.t.c.
Normally, personal computers are placed on table desk hence they are referred to as
desktop personal computers. Still other types are available under the categories of
Laptop Computers are small size types that are battery-operated. The screen is used to
cover the system while the keyboard is installed flatly on the system unit. They could be
carried about like a box when closed after operation and can be operated in vehicles
while on a journey.
43
Notebook Computer
This is like laptop computers but smaller in size. Though small, it comprises all the
Palmtop Computer
Palmtop computer is far smaller in size. All the components are complete as any of the
Can be used to produce documents like memos, reports, letters and briefs.
It can assist in searching for specific information from lists or from reports.
Can attend to several users at the same time, thereby able to process several jobs
at a time.
44
Operating of Computer is less fatigue
With the invention and innovation everyday, computer suffers from being
obsolete.
Some computers can not function properly without the aid of cooling system e.g.
Mini Computers
The Mini Computers have memory capacity in the range 128K bytes to 256 Kbytes and
are also not expensive but reliable and smaller in size compare to mainframe. It was first
introduced in 1965; when DEC (Digital Equipment Corporation) built the PDP – 8.
Mainframe
The Main Frame Computers often called number crunches have memory capacity of the
order of 4 Kbytes and they are very expensive. They can execute up to 100MIPS
(Meanwhile Instructions Per Second). They have large systems and are used by many
45
4.0 Conclusion
Computers are classified based on three major criteria namely size, type of signal being
processed and purpose. The classification adopted at any point in time depends on the
issues involved. For instance, if our goal is to process different kinds of signals or to
accept one type of signal and convert to another form of signal, we should look in the
realm of analog or digital or even the hybrid computers. This of course, calls for a
converter such as Analog to Digital Converter or Digital to Analog Converter as the case
may be.
5.0 Summary
ii. Based on size computers are classified as mainframe, mini computer and
microcomputer.
iii. Based on the type of signal being processed, computers are classified as
purpose computers.
v. Micro computers now come in different forms due to the continued reduction
46
6.0 Tutor Marked Assignment
Balogun, V.F., Daramola, O.A., Obe, O.O., Ojokoh, B.A., and Oluwadare S.A., (2006).
Gray S. Popkin and Arthur H. Pike (1981). (1981). Introduction to Data Processing with
BASIC, 2nd edition, Houghton Mifflin Company, Boston.
47
MODULE 2: COMPUTER HARDWARE
• Hardware components – (the front, back and inside of the system unit)
Table of content
- Mother board
- Memory chips
- Types of memory
48
Primary memory
Read only memory (ROM)
Random access memory (RAM)
Secondary memory
Hard Disk
Tertiary memory
Floppy disk (diskette)
CDROM
1.0 Introduction
Your Personal Computer (PC) is really a collection of separate items working together as
a team-with you as the captain. Some of these components are essential; others simply
make working more pleasant or efficient. Adding extra items expands the variety of
ii. Enable the student to appreciate the importance of each of the components to
The system unit is the main unit of a PC. It is the Computer itself while other units
Motherboard, Processor, Buses, memory, power supply unit, etc. This unit (system unit)
has been confused over the years by novices as the CPU. This is not true. The CPU
49
(Central Processing Unit) or simply processor is a component within the system unit and
it is not the only thing that makes up the system unit. Hence, it will be wrong to equate
Lights
Your unit may display a variety of colored light on the front panel, including power and
turbo signals, and light to indicate if the Hard or Floppy disk are being read or written to.
Key Lock
You can stop intruders tampering with your PC by using the Lock on the front panel.
Turbo Button
Some PCs offer a choice of speeds at which they can run. A turbo switch is usually left
Reset Button
If your PC “freezes” and won’t respond to any command, try starting it up again using
the reset button. Pressing the reset button loses all the work you have not saved in that
Power On/Off
All PCs have main power switch on the system unit. Sometimes this control is placed
50
Either, or both, of two standard types of floppy disk drive may be found at the front of
the system unit. Some systems also have internal CD-ROM or tape drives.
Fan Housing
fan at the back of the unit removes hot air from the system.
Cables plugged into these sockets carry power from the electrical outlet to the system
Joystick Port
Using a joystick is often much better than pressing keys to control movements when
Serial Ports
51
Serial Ports often connect the PC to modem or mouse. Most PCs are fitted with two
serial ports that may be labeled “S101” and “S102”, “Serial 1” and “Serial 2”, or “COM
Sound Jacks
If you have a sound fitted inside your system unit, you will see a jack or jacks at the back.
source.
Keyboard Port
The cable from your keyboards ends with a round connector, which plugs into the
keyboard port.
Network Adapter
If an expansion card is fitted to link your PC with other PCs in your office you will see a
Monitor Port
A cable from your monitor plugs into this port and carries display information to the
monitor.
PCs are easily expanded-perhaps to provide a modem, sound or faster graphics. You can
plug cards into expansion slots inside the PC. The end of an expansion card shows at the
52
The brain behind everything that happens in your PC is contained within the system
unit. Inside the unit are the impressive electronics that run programs, handle
instructions, and determine the results. Most of the more important items are
described below:
Battery
A small battery powers a clock to keep track of the time when the PC is turned off. It
also maintains low electricity to certain RAM chips that record which components are
installed.
This card controls the PC’s disk drive motors and transfers data. The serial and
parallel ports at the back of the card link internal PC components with external
All the information your computer will display is stored in its memory. To be useful,
you need to see the information. The display adapter card is the link between the
53
Expansion Slots
These long narrow connectors allow you to plug in expansion cards (also known as
adapter cards), which offer extra options not available on a basic PC.
ROM Chips
Read-only memory (ROM) chips have data written on them during manufacturing
that tells the CPU what to do when the PC is switched on. The data is always there,
RAM Chips
Memory) is used for purposes such as holding the program and its data. But when the
These slots let you expand your computer’s memory by adding extra RAM chips or
modules. Some PC’s work even faster because they come equipped with Cache
Memory. Cache Memory consists of expensive and very fast memory chips that store
the data or instructions that the CPU will look at next. Cache memory can speed up
54
RAM chip
Intel Processor
important single item. It does all the PC’s thinking and runs the programs (series of
These chips help the CPU manage all the other parts of the computer.
A math coprocessor, present in some PCs, assists the CPU in its number-crunching
55
CPU fan
Speaker
All the components in a PC need electrical supply. Most need a 5-volt supply although
the floppy disk drive motors required 12 volts. If the components were connected to
normal household current, they would blow up, so the power supply unit converts high
The hard disk is your computer’s main permanent storage unit, holding large amount of
data and programs. Unlike data held in RAM, the information on the hard disk is not
affected when the PC is turned off – it remains there unless you instruct the PC to
56
Hard drive (Hard disk)
Motherboard
All the electronic components in a PC are mounted on a piece of fiberglass called the
all the others. Thin lines of metal on the surface of the fiberglass connect pins from one
57
Components of a motherboard
Intel CPUs
The earliest PCs were equipped with a CPU from Intel Corporation called the 8088. the
next generation of PCs used CPU known by the number “80286 and were called
“PC/AT” computers. Subsequently, PCs have been supplied with more and more
powerful CPUs – the 80386, the 80486, and the more recent and impressive of all, the
All these PC processors belong to a family called 80 x 86. In general, you can run the
same software on PCs containing different CPUs within this family. From the outside,
the chips look different only in sizes and number of pin-put inside, an 80486 has over one
million components to the 3,500 that were in the first 8088. Because of these differences,
58
What is CPU
The CPU is certainly the most important PC component. CPU stands for
CPU Speed
The speed of a CPU is measured in megahertz (MHz). A computer has central clock that
keeps all the components in time with each other; one hertz is similar to a clock tick and
megahertz is equal to one million ticks per second. If your PC runs at 333 or 400MHz,
the central clock ticks 333 or 400 million times every second. As you might imagine, the
Without the CPU, there would be no PC. Like all other hardware components,
the CPUs are continually undergoing further development. You can see the
development of newer and faster CPUs. The CPUs have for years doubled their
performance about every 18 months and there are no indications that this trend
will stop.
59
When we now look at all the CPUs from a broader perspective, we can see
that:
The CPU history is closely tied to the companies IBM and especially
Intel.
The CPUs have their roots back to Intel's chip 4004 from 1971.
development.
Generations of CPUs
There are CPUs of many brand names (IBM, Texas, Cyrix, AMD), and often
they make models which overlap two generations. This can make it difficult to
keep track of CPUs. Here is an attempt to identify the various CPUs according
to generation:
History of CPU
60
AMD K5 1996 --
IDT WinChip C6 1997 3,500,000
Intel Processor
DISKS
Floppy Disks
61
Computers use disk to store information. Although there is a permanent hard disk that
lives inside the system unit, you can use floppy disks to store and move data easily from
one PC to another. Floppy disks come in two sizes, either 5¼ or 3½ inches in diameter.
The smaller disks are able to store more data and are also less easily damaged, because of
their thicker plastic cases. As both sizes can be either “high” or “low” capacity (or
density), there are four main varieties of disks available. High-capacity disks are more
expensive, but they can store much more information. Low-capacity disks are generally
labeled DS/DD, which stands for “double sided/double density”, while the high-capacity
Treat floppy disks carefully, and you can take them almost anywhere safely. Don’t leave
the disks in your PC when you finish a session. Also avoid putting anything heavy on top
of your disks or leaving them in extremes of hot or cold temperature. Try not to carry
disks loose in pockets or handbags where dust and dirt may get inside the containers.
Take care to store them vertically, preferably in a special storage box. Remember too
that you should keep floppy disks away from magnetic fields, including hidden magnets
such as those in telephone, radio and television speakers, amplifiers, desk fans, and
photocopiers. If you do leave floppy disks near magnetic field, your data may become
62
Write – protecting a disk means that you prevent the computer from erasing or writing
over important data or programs that are already there. However, the PC can still read a
write-protected disk.
4.0 Conclusion
The system unit is a box housing many components. It is in fact, the most important part
of the computer because it houses the processor (CPU) and other essential components
5.0 Summary
In unit we studied the components of the system unit which include the components in
the front, the back and those that are inside the.
a. Make a list of 5 components that could be found inside the computer systems unit.
Balogun, V.F., Daramola, O.A., Obe, O.O., Ojokoh, B.A., and Oluwadare S.A., (2006).
63
STUDY UNIT 5
Table of contents
Input devices
Computer keyboard
64
1.0 Introduction
The computer peripheral devices are those devices which are attached to the system unit.
The devices are necessary to ensure that the computer is able to accept input and display
the result for the user. This section therefore discusses the input unit and the output unit.
2.0 Objectives
i. Expose the students to those components that make up the input unit and the
output unit.
ii. Enable students get deeper understanding of the functions of the input and the
output unit.
iii. Guide the students on the type of input unit and output unit suitable to a
The intelligent computer keyboard has four major divisions, namely: Function keys,
Alphanumeric keys, Numeric keys and Control keys.
65
In addition to the four types of keys, there are some special or important keys such as the
following:
(a) Return or Enter key
(b) Escape key denoted by ESC
(c) Control key denoted by CTRL
(d) Alternate key denoted by ALT
(e) Delete key denoted by DEL
(f) Insert key denoted by INS
(g) Backspace key
(h) Shift key.
Function Keys
The effects of the functions keys are software package dependent. That is, they mean
different translations depending on which software package one is running on the
computer. The function keys are traditionally labeled F1, F2, F3, F4, F5, F6, F7, F8, F9,
F10, F11 and F12. The function keys are often arranged to the left of the main keyboard
in two columns or they are arranged in a row above the main keyboard. In most software
packages, the function key F1 is used to run the HELP program. Word perfect, for
example, uses F3 for HELP program and F1 to cancel the last command issued on the
computer. The function keys F7 and F12 are used to save a text and block a section of a
text respectively in word perfect. Function keys can be programmed to carry out the
functions desired by a programmer. For example the function keys F10 may be
programmed to display menus. Thus, the operations of the function keys can be
determined by the user or programmed by the software package being used at any point
in time.
Alphanumeric Keys
The Alphanumeric keys can be likened with the conventional typewriter keys. They
contain alphabetic characters, numeric characters and special characters such as comma,
full stop, open bracket, close bracket, asterisk, semicolon, colon, question mark, and so
on. Usually, each key carries a character at the lower part and another character at the
upper part. The SHIFT key is used to switch on or off the lower and upper characters by
the programmer.
66
Cursor Control Keys
The cursor marks the active or current spot on the screen. It is an indicator that tells the
user where in the midst of a document the system is pointing to. It may be a rectangular
bar of light or a blinking underscore. When a text is being typed, the cursor moves as the
carriage on a keyboard moves and character are typed in. The cursor control keys include
four directional arrow keys.
CONTROL KEY FUNCTIONS
Other cursor control keys are HOME, PAGE UP, PAGE DOWN, and END. These keys
may be part of the numeric keypad or separated from the numeric keypad. Moving the
cursor around on the screen is one of the most common tasks in an application program.
In fact, cursor movement is so important in an application such as word processing that it
can usually be accomplished by additional key-driven commands. The control keys and
their functions are documented in Table the above table.
67
Numeric Keypad
The numeric keypad contains a set of keys required for typing or entering number digits
0, 1, 2, 3, 4, 5, 6, 7, 8, and 9 into the computer store. A numeric key is often activated by
pressing the Numlock Key. The numeric keypad is also used in combination with
Alternate (Alt) key to produced extended characters. Extended characters are characters
not normally found on most keyboard. For example, to produced the character alpha data
denoted ‘α’, one holds down the Alt key and press 224; to produce character beta
denoted by ‘β’, one holds down the Alt key and press 255 and to produce pound sterling
denoted by ‘₤’, one holds down the Alt key and press 156.
Shift Key
When the Shift key is pressed, the capital letters on the alphanumeric keys are activated.
It also serves as the activator of characters that are at the upper part of each alphanumeric
key. The Shift key has no effects on itself; its effect are realized when some other keys
are pressed. Thus, if one presses the shift key and then ‘equal’ sign key, the ‘plus’ sign
which is at the upper part of the ‘equal’ sign is activated and then it appears on the
screen.
CapLock Key
The CapLock Shifts all alphabetic characters into upper case (capital letters). Thus all
characters typed are in lower case (small letters) when not pressed.
The Alternate key can be used in combination with numeric keys to generate characters
not shown on the keyboard, that is, extended characters. For example, holding the Alt key
down and pressing 228 produces the summation (Σ) sign; holding the Alt key down and
pressing 235 produce δ sign. To restart or reboot your computer, press Alt, Ctrl and Del
keys simultaneously.
NumLock Key
68
The Numlock key activates the numeric keypad. Neither NumLock nor CapLock affects
the function keys.
The Control key is often used in most text mode to perform block operations like mass
deletion, insertion and so on. For example, CTRL + Y deletes a line in most text
documents. It can also be used in combination with other keys to move the cursor to
different locations in a text or document. In some application packages, the Alt, Ctrl and
Shift key are used in combination with the function keys to perform several operations.
For example, in Word Perfect word processing package, to centre a text; press Shift and
F6; to print a text, press Shift and F7.
The Escape key cancels an operation in progress. For example, when one is editing a file
or issuing a command, ESC cancels any changes one might have made or terminates the
command.
The Return key serves as one of the most important keys on most keyboards. It is actually
used to inform the computer the end of an input or command. It performs two functions
depending on the program with which it is used. For example, suppose you are asked to
respond to an operating system command at the prompt or other entries, the operating
system will wait until the return key is pressed before continuing. Pressing the return key
also positions the cursor at the beginning of the next line ( in text mode), which is the
equivalent of pressing the carriage return on a typewriter.
Pressing the Insert key puts ones keyboard in insert mode, pressing it again returns to
overstrike (typeover) mode. In insert mode, the characters one types are inserted at the
cursor position, the character at the cursor position and all characters to the right, shift to
make room for them. In overstrike or typeover mode, newly typed characters overwrite
the characters at the current cursor position. In most application software insert mode is
indicated by a symbol in the status line.
69
Delete Key (Del)
The delete key deletes the character at the cursor position when pressed and the
remaining text moves to the left while the cursor remains at the same position.
The Back Space Key deletes the characters to the left of the cursor when pressed and all
other characters to the right of the cursor are shifted one space to the left.
Spacebar
The Spacebar is the longest key found on most keyboards. It erases characters at the
cursor position or gives blank space when pressed.
Tab Key
The Tab Key moves the cursor by five spaces to the right when pressed. The number of
positions moved depend on the software or the Tab Set by the operator. The Tab is
normally pressed to insert paragraphs during typing. In some programs, when this key is
pressed in combination with shift key, the same number of positions is moved backwards.
When the Print Screen key is pressed in combination with the Shift Key, whatever in is
the screen will be printed on a printer. The same effect can be achieved by pressing the
key alone on some keyboards.
Never spill liquids on your keyboard. Coffee, soda, and other beverage spills can ruin
your keyboard. Liquid spills on the keyboard have even been known to cause electrical
damage to the PC itself. With that in mind, though you may not stop drinking coffee
70
around your computer, you should at least get a spill-proof mug or keep the coffee on the
Another enemy of keyboards is static electricity. Static electricity can have the same
damaging effect on your keyboard as does liquid. If your keyboard doesn't respond
properly after a strong static charge, you may just need to turn off the PC and turn it back
on to reset the keyboard. In some cases, however, the static discharge can zap the
keyboard and even parts of the PC. If you shuffle your feet across carpet or your PC is in
a room with dry air, avoid touching the PC or the keyboard until you have touched
something metal to discharge any static. If you don't have a metal desk or bookcase in
your work area, consider buying an anti-static mat and keeping it where you can touch it
Dust, dirt, food crumbs, and hair are other enemies of keyboards. Try to avoid eating over
the keyboard and if your computer is in a dirty, dusty area, keep the keyboard covered
Some dirt and dust is unavoidable. To keep the keyboard working well, you should
A mouse looks like the electrical clipper in a barbing saloon. It consists of a pointing
device very sensitive to movements. It has a roller ball and two or more buttons which
can be pressed to make selection. By moving the mouse on a flat smooth surface and
clicking one or combination of two buttons on its upper surface, a computer to which it is
connected can be sensitized and commanded to carry out some specific tasks.
71
A mouse can be used to draw diagrams on computer screen more effectively and
efficiently than the computer keyboard. Generally, the keyboard and the mouse do
complement each other. For example, the mouse can be used to highlight an item in a
menu list while the keyboard Enter Key can be pressed to activate or evoke the command
associated with the highlighted item.
A mouse is the primary input device for modern computers that feature operating
systems with a graphical user interface, such as Windows 98 or Windows XP. While
keyboards obviously excel at entering text, numbers, and symbols, your mouse is the tool
you'll use to tell your computer what to do with all the data you've entered.
Joysticks are almost exclusively used with game software and help the user more
All modern PC operating systems (Windows 98, Windows XP, and the Macintosh) rely
device built to help the user control this on-screen pointer in as natural and efficient a
manner as possible.
The pointer on the screen mimics the movements of your mouse. As you move your
mouse, a ball encased in the bottom of your mouse rolls on the desk and in turn sends
signals to the computer as to which direction to move the pointer on the screen. Move the
mouse side to side, or up and down, and the on-screen pointer moves in a similar manner.
Once you have the mouse positioned to select the command or data you want to act on,
you use the mouse buttons to execute the command. The mouse controls the on-screen
pointer and lets you select program icons, manipulate property sheets, and access data.
72
3.3 Output Device
3.3.1 Printers
A printer is the computer component that lets you create copies of the information stored
in your computer on paper. The printed material is often called hard copy, to differentiate
There are three basic types of printers available for use with personal computers:
Laser printers. These combine a magnetic roller with powdered ink called toner to
Inkjet printers. These have small nozzles that actually spray fast-drying ink onto the
page to form characters or images. Inkjet printers spray a fine, quick-drying ink through
small nozzles to produce characters and images on paper. Although the results are not
quite as sharp as those of laser printers, inkjet printers provide very good quality output at
These use a print head to strike an inked ribbon against paper, like a typewriter, creating
characters out of a series of dots. Dot-matrix printers are the cheapest printers available.
They create text and images on the page by hammering several small pins against an
73
inked ribbon. The more pins used, the better the image--9-pin and 24-pin are common
options. The 24-pin printers produce a better quality output, but are somewhat slower
Print quality for dot-matrix printers is often described in terms of mode: draft mode (low
resolution). The speed depends on the mode, with draft mode being the fastest.
The type of printer you choose depends on your budget and the type of output you need.
For example, if all you need to print are grocery lists, you may be happy with a dot-
matrix printer. In general, dot-matrix printers are noisier, slower, and produce a poorer-
quality image than do laser or inkjet printers, but they are also less expensive. If you need
to print newsletters, brochures, or illustrated reports, you will probably want a high-
quality laser printer. Laser printers cost more than other printers, but they may be worth
the price because they are fast, quiet, and produce high-quality text and graphics.
3.3.2 Monitors
. The monitor does not do any processing itself. The monitor only displays the
Monitor Sizes
The two most common monitor sizes are 15-inch and 17-inch. If you have an older, hand-
me-down PC or a very inexpensive starter PC, you may have a smaller 14-inch monitor.
21-inch monitors are also available but mostly used by graphics professionals.
74
VGA and SVGA Monitors
The two most common acronyms you will see on current monitors are VGA or SVGA.
Both of these terms generally refer to how many dots (or pixels) in each direction the
monitor can display. VGA is 640x480 (width by height) and SVGA is 800x600. This
measurement is called the monitor's resolution, and more is better! Most new monitors
Almost any VGA or SGVA monitor made in the last few years is capable of displaying
any of these resolutions. However, it's actually the video card that determines what
resolution your monitor displays at any time. The monitor is capable of switching from
3.3.3 Scanners
Scanners are peripheral devices used to digitize (convert to electronic format) artwork,
photographs, text, or other items from hard copy. In a sense, a scanner works as a pair of
eyes for your PC. Your eyes see an image and translate the image into electrical impulses
that travel to and are interpreted by your brain. Similarly, a scanner captures images and
converts them to digital data that travel to and are interpreted by the computer.
A scanner works by dividing an image into microscopic rows and columns and
measuring, like the film in a camera, how much light (or lack thereof) reflects from each
individual intersection of the rows and columns. Each reflection is recorded as a dot, or
75
picture element (pixel). After the scanner collects information from each dot, it compiles
There are a wide variety of scanners that work in a number of different ways, but the
technology behind them is essentially the same. The following sections discuss the more
Types of scanners
Flatbed Scanners
Flatbed scanners look and behave a lot like a photocopier. You lay the item to be scanned
on a glass plate and the scanning head passes below the glass.
Flatbed scanners are very versatile: you can scan objects in a variety of sizes and shapes,
including pages from a book, without damaging the original. While flatbed scanners are
the best choice for a wide variety of uses, if you plan to do a lot of text scanning (called
OCR for Optical Character Recognition) work, keep in mind that flatbeds only
accommodate one page at a time. Scanning multi-page documents can be a slow, tedious
process, because you have to manually remove one page and insert the next.
Sheetfed Scanners
Sheetfed scanners look and act more like fax machines. The page or item is fed into the
machine, scanned, then spit out on the other end . A sheetfed scanner is a good choice for
large volumes of text, but not for handling delicate original photographs. Scanning
76
Hand Scanners
Hand scanners are a low-cost alternative to their larger, more sophisticated counterparts.
As their name implies, hand scanners are manual devices you move over a flat surface,
The hand scanner's advantages are many, but so are its disadvantages. Generally, hand
scanners work best for small, uncomplicated images such as company logos or small
black-and-white photographs. You might want a hand scanner if you do not plan to use it
on a regular basis, because it usually does not require adding internal cards to your CPU,
and it's easily disconnected and stored away. Most hand scanners can only scan a four-
inch wide image at one time and require a steady hand. You're usually provided with
software that helps you "sew up" a series of these 4-inch, side-by-side scans into one
image, but this is obviously not as convenient as getting the full image at once.
The built-in speakers in most PC cases are used just for making system sounds, such as
warning beeps and action indicators. To play more sophisticated sounds on your PC, you
need a set of external speakers. Usually speakers come in pairs, and there is a plug that
connects them to your sound card. Arrange the speakers with one on the left and one on
Optionally, some speakers come with a subwoofer. This improves the bass (low notes)
sound. If you have a subwoofer with your speakers, it should go on the floor under your
desk.
77
Sound is one of the favorite options on today's PCs. In fact, sound is a standard feature of
Everyone has their own uses for sound. You may just want to play a few music CDs with
your CD-ROM drive while you are working, or you may use multimedia applications for
presentations or educational programs. You may just like the sound of your jet engines
To produce sound on your PC, you need a sound card and speakers. The sound card is an
expansion card that plugs into one of the slots on your motherboard. This card processes
all of the instructions that have to do with sound, and then sends the sounds to the
speakers to be played. The speakers plug into the sound card and
Sound Cards
Sound cards plug into an expansion slot in your PC. The card has a set of connectors that
are exposed on the back of the PC; you can plug a microphone and speakers into the
connectors. Some cards include an optional connector for a line input, which is used to
connect another input source such as the output from a tape player or portable CD player.
Other optional connectors can include a joystick connector and a MIDI connector (for
connecting a MIDI keyboard). The card may include a volume control, which controls
4.0 Conclusion
78
The system unit cannot function without the peripheral devices. The input and the output
units are very important peripheral devices that must be taken care of in setting up a
computer system.
5.0 Summary
(a) the keyboard – ( the different categories of keys on the keyboard and their
functions).
(a) monitor,
a. Justify the need for the input and the output units in a computer system.
b. Describe the functions of the following keys: the numeric keys, control keys, shift
c. In what situation will you recommend the laserjet printer and the dot matrix
printer.
79
Balogun, V.F., Daramola, O.A., Obe, O.O., Ojokoh, B.A., and Oluwadare S.A., (2006).
Gray S. Popkin and Arthur H. Pike (1981). (1981). Introduction to Data Processing with
BASIC, 2nd edition, Houghton Mifflin Company, Boston.
Table of content
Air conditioner
80
Voltage stabilizer
1.0 Introduction
The auxiliary equipment as their name suggests are not computers but are necessary in a
computing activities. In this module, we shall address in some details the importance of
equipment such as air conditioner, voltage stabilizer, uninterruptible power system and
2.0 Objectives.
ii. Discuss the importance of the auxiliary equipment to the smooth running of a
computing centre.
range. When the temperature of the environment in which a computer is kept falls
outside the specific range, the computer may function badly and consequently get
damaged.
81
The free air is basically, dust laden. Dust is metallic in nature and, as such, capable of
electronic circuits, the dust can bridge two circuits. The bridging of two electronic
circuits may cause a serous damage to the computer. Thus, air conditioners are needed in
b. Prevent dust.
A computer when switched on, takes off at a cold state, warms up and gradually gets to a
hot state. At a hot state, a computer is always roaming in an attempt to find something to
do. In a situation where the public electricity such as that of PHCN in Nigeria is cut
suddenly, the computer would suddenly be brought to a halt. The sudden power cut may
cause the computer to loose the memory of some basic house keeping operations when
power eventually returns and the computer is switched on. The sudden power cut may
also cause irreparable damages to the file the computer was processing at the time the
We note that computers are built to operate within a specific range of voltages. In the
United State of America, computers are built to operate on 110V. A voltage transformer
is a device meant to step up or step down a voltage as the case may be. In Nigeria, for
example, a 110V computer requires a voltage transformer to step down the 240V to
82
110V. Similarly, in USA, a 2409V current is connected directly to a 110V computer, the
Today, the technology has improved tremendously such that if a 240V current is
connected directly to a 110V computer, only a fuse, rather than the power unit will blow
up. It is worth mentioning, too, that there is an advanced technology today which permits
a computer to operate effectively and efficiently with the power line voltage ranging
between 110V and 240V. The technology supports an inbuilt switch which can be
operated at two terminals namely: the 110V terminus and 240V terminus. In recent
times, the technology has been improved upon such that computers are manufactured in
such a way that they can sense the voltage that is adequate. Thus, if one connects a 110V
computer to a 240V current, the 110V computer has an in-built line transformer which
(a) Converting the public electricity raw line into fine line, that is, conditioning
(b) Storing electrical energy when the public electricity line is life
(c) Releasing the stored electrical energy to the computer when the public
4.0 Conclusion
The computer is an expensive resource and as such requires adequate protection from
electrical damage. Similarly, the UPS is an expensive resource; hence there is the need
83
for it to be protected from electrical damage, too. Therefore, in practice, it is desirable
that the UPS be protected by a voltage stabilizer which is rugged and less expensive. The
5.0 Summary
ii. Voltage stabilizers help to protect computing equipment from damage due to
power surge.
iii. UPS protects the computing equipment and the software from power outage
during computing session. The UPS with the help of its internal battery stores
electrical energy while power is on and releases power stored to the computer
whenever power is off. This enables the user to end the working session and
With the aid of annotated diagram, describe the arrangement of the following auxiliary
equipment: UPS, line voltage transformer and voltage stabilizer in relation to PHCN
84
7.0 References
Balogun, V.F., Daramola, O.A., Obe, O.O., Ojokoh, B.A., and Oluwadare S.A., (2006).
Akure.
• System software
• Language translators
• Utility software
• Application software
Table of content
System software
-Operating System
Language translators
Assemblers
Interpreters
Compilers
85
Utility software
1.0 Introduction
The computer hardware are driven by the software. The usefulness of the computer
depends on the programs that are written to manipulate it. Computer software come in
different forms: the operating system, utility software, language translators and
application software. This unit therefore presents detailed discussions of each category of
computer software.
2.0 Objectives
The physical components of the computer are called the hardware while all the other
resources or parts of the computer that are not hardware, are referred to as the Software.
Software are the set of programs that makes the computer system active. In essence, the
Then, what is a program? A Program is a series of coded instructions showing the logical
86
The computer software could be divided into two major groups namely System Software
This is refers to the suits of programs that facilitates the optimal use of the hardware
systems and/or provide a suitable environment for the writing, editing, debugging, testing
and running of User Programs. Usually, every computer system comes with collection of
The operating system is the first component of the systems programs that interests us
here. Systems programs are programs written for direct execution on computer hardware
in order to make the power of the computer fully and efficiently accessible to applications
hardware as well as the end users’ needs. Moreover, systems programs are often large
and more complex than application programs, although that is not always the case. Since
87
systems programs provide the foundation upon which application programs are built, it is
most important that systems programs are reliable, efficient and correct.
In a computer system the hardware provides the basic computing resources. The
applications programs define the way in which these resources are used to solve the
computing problems of the users. The operating system controls and coordinates the use
of the hardware among the various systems programs and application programs for the
various users.
The basic resources of a computer system are provided by its hardware, software and
data. The operating system provides the means for the proper use of these resources in the
operation of the computer system. It simply provides an environment within which other
We can view an operating system as a resource allocator. A computer system has many
resources ( hardware and software) that may be required to solve a problem: CPU time,
The operating system acts as the manager of these resources and allocates them to
specific programs and users as necessary for their tasks. Since there may be many,
possibly conflicting, requests for resources, the operating system must decide which
requests are allocated resources to operate the computer system fairly and efficiently. An
operating system is a control program. This program controls the execution of user
88
Operating systems exist because they are a reasonable way to solve the problem of
The primary goal of an operating system is a convenience for the user. Operating systems
exit because they are supposed to make it easier to compute with an operating system
than without an operating system. This is particularly clear when you look at operating
particularly important for large, shared multi-user systems. Operating systems can solve
this goal. It is known that sometimes these two goals, convenience and efficiency, are
contradictory.
purposes:
89
Specifically, we can imagine that an effective operating system should accomplish all of
the following:
editor program,
o Assure that when there are several active processes in the computer, each
will get fair and noninterfering access to the central processing unit for
execution,
o Provide for long term storage of user information in the form of files, and
Though systems programs such as editor and translators and the various utility programs
(such as sort and file transfer program) are not usually considered part of the operating
system, the operating system is responsible for providing access to these system
resources.
90
Modern computer operating systems may be classified into three groups, which are
distinguished by the nature of interaction that takes place between the computer user and
his or her program during its processing. The three groups are called batch, time-shared
In a batch processing operating system environment users submit jobs to a central place
where these jobs are collected into a batch, and subsequently placed on an input queue at
the computer where they will be run. In this case, the user has no interaction with the job
during its processing, and the computer’s response time is the turnaround time-the time
from submission of the job until execution is complete, and the results are ready for
Another mode for delivering computing services is provided by time sharing operating
users concurrently on-line. Here, the various users are sharing the central processor, the
memory, and other resources of the computer system in a manner facilitated, controlled,
and monitored by the operating system. The user, in this environment, has nearly full
interaction with the program during its execution, and the computer’s response time may
91
The third class of operating systems, real time operating systems, are designed to service
those applications where response time is of the essence in order to prevent error,
misrepresentation or even disaster. Examples of real time operating systems are those
which handle airlines reservations, machine tool control, and monitoring of a nuclear
power station. The systems, in this case, are designed to be interrupted by external signal
In fact, many computer operating systems are hybrids, providing for more than one of
background batch system running in conjunction with one of the other two on the same
computer.
systems:
A multiprogramming operating system is a system that allows more than one active user
Thus, it is evident that a time-sharing system is a multiprogramming system, but note that
operating system could, and indeed usually does, have more than one active user program
simultaneously in main storage. Another important, and all too similar, term is
‘multiprocessing’.
92
A multiprocessing system is a computer hardware configuration that includes more than
one independent processing unit. The term multiprocessing is generally used to refer to
applications.
operating system of each of the interconnected computers must contain, in addition to its
program and data among the other computers with which it is connected.
and managed so that they automatically share the job processing load among the
processors. Such a system requires an operating system which, in addition to the typical
The networked and distributed computing environments and their respective operating
systems are designed with more complex functional capabilities. In a network operating
system the users are aware of the existence of multiple computers, and can log in to
remote machines and copy files from one machine to another. Each machine runs its own
local operating system and has its own user (or users).
93
A distributed operating system, in contrast, is one that appears to its users as a traditional
distributed system, users should not be aware of where their programs are being run or
where their files are located; that should all be handled automatically and efficiently by
Network operating systems are not fundamentally different from single processor
operating systems. They obviously need a network interface controller and some low-
level software to drive it, as well as programs to achieve remote login and remote files
access, but these additions do not change the essential structure of the operating systems.
True distributed operating systems require more than just adding a little code to a
critical ways. Distributed systems, for example, often allow program to run on several
processors at the same time, thus requiring more complex processor scheduling
An operating system provides the environment within which programs are executed. To
construct such an environment, the system is partitioned into small modules with a well-
defined interface. The design of a new operating system is a major task. It is very
important that the goals of the system be will defined before the design begins. The type
of system desired is the foundation for choices between various algorithms and strategies
94
A system as large and complex as an operating system can only be created by partitioning
it into smaller pieces. Each of these pieces should be a well defined portion of the system
with carefully defined inputs, outputs, and function. Obviously, not all systems have the
same structure. However, many modern operating systems share the system components
outlined below.
Process Management
processes, some of which are operating system processes, those that execute system code,
and the rest being user processes, those that execute user code. All of those processes can
The operating system is responsible for the following activities in connection with
processes managed.
Memory Management
array of words or bytes, each with its own address. Interaction is achieved through a
sequence of reads or writes of specific memory address. The CPU fetches from and stores
in memory.
95
In order for a program to be executed it must be mapped to absolute addresses and loaded
in to memory. As the program executes, it accesses program instructions and data from
memory by generating these absolute is declared available, and the next program may be
The operating system is responsible for the following activities in connection with
memory management.
o Keep track of which parts of memory are currently being used and by
whom.
together with the data they access, must be in main memory during execution. Since the
main memory is too small to permanently accommodate all data and program, the
computer system must provide secondary storage to backup main memory. Most modem
computer systems use disks as the primary on-line storage of information, of both
programs and data. Most programs, like compilers, assemblers, sort routines, editors,
formatters, and so on, are stored on the disk until loaded into memory, and then use the
disk as both the source and destination of their processing. Hence the proper management
96
The operating system is responsible for the following activities in connection with disk
management
o Storage allocation
o Disk scheduling.
I/O System
hardware devices from the user. For example, in Unix, the peculiarities of I/O devices are
hidden from the bulk of the operating system itself by the I/O system. The I/O system
consists of:
File Management
File management is one of the most visible services of an operating system. Computers
can store information in several different physical forms; magnetic tape, disk, and drum
are the most common forms. Each of these devices has it own characteristics and physical
organization.
97
For convenient use of the computer system, the operating system provides a uniform
logical view of information storage. The operating system abstracts from the physical
properties of its storage devices to define a logical storage unit, the file. Files are mapped,
represent programs (both source and object forms) and data. Data files may be numeric,
alphabetic or alphanumeric. Files may be free-form, such as text files, or may be rigidly
formatted. In general a files is a sequence of bits, bytes, lines or records whose meaning
The operating system is responsible for the following activities in connection with file
management:
Protection System
The various processes in an operating system must be protected from each other’s
activities. For that purpose, various mechanisms which can be used to ensure that the
files, memory segment, cpu and other resources can be operated on only by those
processes that have gained proper authorization from the operating system.
98
For example, memory addressing hardware ensure that a process can only execute within
its own address space. The timer ensure that no process can gain control of the CPU
without relinquishing it. Finally, no process is allowed to do it’s own I/O, to protect the
users to the resources defined by a computer controls to be imposed, together with some
means of enforcement.
Protection can improve reliability by detecting latent errors at the interfaces between
incompetent user.
Networking
Instead, each processor has its own local memory, and the processors communicate with
each other through various communication lines, such as high speed buses or telephone
lines. Distributed systems vary in size and function. They may involve microprocessors,
The processors in the system are connected through a communication network, which can
be configured in the number of different ways. The network may be fully or partially
99
connected. The communication network design must consider routing and connection
A distributed system provides the user with access to the various resources the system
and reliability.
One of the most important component of an operating system is its command interpreter.
The command interpreter is the primary interface between the user and the rest of the
system.
Many commands are given to the operating system by control statements. When a new
job is started in a batch system or when a user logs-in to a time-shared system, a program
which reads and interprets control statements is automatically executed. This program is
variously called (1) the control card interpreter, (2) the command line interpreter, (3) the
shell (in Unix), and so on. Its function is quite simple: get the next command statement,
The command statement themselves deal with process management, I/O handling,
100
Fig. 1: Relationship between operating system and other components of the computer
system.
4.0 Conclusion
hardware, other software, the computer peripherals and the user. Operating systems have
also evolved in line with the evolutionary trends in computer. This led to a variety of
types of operating systems. This and other issues relating to operating system are
5.0 Summary
101
b) Differentiate between multi-user operating system and network operating
system.
Balogun, V.F., Daramola, O.A., Obe, O.O., Ojokoh, B.A., and Oluwadare S.A., (2006).
Silberschatz, A., Galvin, P., and Gagyne, G. (2000). Applied Operating System Concepts,
First Edition. John Wiley and Sons Inc., New York, USA.
Harvey Katzan, Jr. (1986). Operating System: A Pragmatic Approach, 2nd Edition. CBS
Publishers and Distributors, New Delhi, India.
1.0 Introduction
In unit 7, we discussed in full details, the operating system as the executive manager of
the computer, its peripheral devices and the users. In this unit, we shall look at other
types of software such as the utility programs and the application programs.
102
2.0 Objectives
The objectives of this unit are to:
i. Conclude our discussion of system software with language translators.
ii. Discuss different categories of utility programs and application programs in
greater detail.
103
an equivalent program in machine language, called the object program or
object code.
The stages in compilation include:
• Lexical analysis
• Syntax analysis
• Semantic analysis
• Code generation
For each high-level language, there are different compilers. We can therefore talk of
COBOL Compilers, FORTRAN Compilers, BASIC Compilers, etc. A Compiler also
detects syntax errors, errors that arise from the use of the language. Compilers are
portable i.e. a COBOL Compiler on one machine can run on a different machine with
minimum changes.
(i) File Conversion: This covers data transfer from any medium to another,
making an exact copy or simultaneously editing and validating. For example,
copying from a hard disk to a diskette.
(ii) File Copy: It makes an exact copy of a file from one medium to another or
from an area of a medium to another area of the same medium.
They are not involved in solving the problem at hand. They are operations that must
be performed before and after actual processing.
104
Application software is a set of programs designed to solve problems of a specific nature.
It could either be supplied by the computer manufacturer or in some cases, the users
produce their own application program called USER PROGRAMS. Hence, an
application software could be subdivided into two classes, namely; Generalized and User-
defined Software.
Under the Generalized software, we have as examples: Word Processing Programs e.g.
Word Perfect, Word Star, Microsoft word. Also, Desktop Publishing e.g. Ventura,
PageMaker, CorelDraw likewise the Spreadsheet program e.g. LOTUS 1,2,3, Excel,
Super-Q while under the User-defined, we could have some User-defined packages for a
particular company or organization, for accounting, payroll or some other specialized
purposes.
(i) Word Processor: A Word Processor is used to create, edit, save and
print reports. It affords the opportunity to make amendments before
printing is done. During editing character, word sentence or a number
of lines can be removed or inserted as the case may be. Another
facility possible is spell checking. A document can be printed as many
times as possible. Word processors are mainly used to produce:
Letters, Mailing lists, Label, Greeting Cards, Business Cards, Reports,
Manual, Newsletter. Examples are: WordPerfect, WordStar, Display
Writer, Professional Writer, LOTUS Manuscript, Ms-Word, LOCO
Script, MM Advantage II etc.
105
analysis, Financial reports. Tax and Statistical analysis. Examples are:
LOTUS 123, Supercalc, MS Multiplan, MS-excel, VP Planner etc.
(iv) Graphic Packages: These are packages that enable you to bring out
images, diagrams and pictures. Examples are PM, PM Plus, Graphic
Writer, Photoshop.
(vi) Statistical Packages: These are packages that can be used to solve
statistical problems, e.g. Stat graphical, SPSS (Statistical Packages for
Social Scientists).
(vii) Desktop Publishing: These are packages that can be used to produce
books and documents in standard form. Examples are PageMaker,
Ventura, Publishers, Paints Brush, Xerox Form Base, News Master II,
Dbase Publisher.
(viii) Game Packages: These are packages that contain a lot of games for
children and adults. Examples are Chess, Scrabble, Monopoly, Tune
Trivia, Star Trek 2, California Game, Soccer Game, War Game, Spy
Catcher Dracula in London.
106
(ix) Communication Packages: Examples are Carbon Plus, Data talk
V3.3, Cross talk, SAGE Chit Chat, Data Soft.
There are so many packages around, virtually for every field of study but these are just to
mention a few of them. Advantages of these packages include quick and cheaper
implementation, time saving, minimum time for its design, they have been tested and
proven to be correct, they are usually accompanied by full documentation and are also
very portable.
User Programs
This is a suit of programs written by programmers for computer users. They are required
for the operation of their individual business or tasks. Example is a payroll package
developed for salary operation of a particular company.
4.0 Conclusion
Apart from the operating systems, we need program translators for us to be able to
program and use the computer effectively. Since computers do not understand natural
languages, there is the need to have language translators such as assemblers, interpreters
and compilers. Utility programs such file conversion and scandisk on the other hand,
enable us to maintain and enhance the operations of the computer. Application and user
programs such as the word processors, spreadsheet and the like help us to perform
specific tasks on the computer. These are discussed in full details in this unit.
5.0 Summary
107
ii. Utility programs such as file conversion, file copy programs and house
packages.
You have just been appointed as a consultant to a firm that is about to procure computing
would be necessary for the smooth operations of the firm. Justify the need for each item
recommended.
Balogun, V.F., Daramola, O.A., Obe, O.O., Ojokoh, B.A., and Oluwadare S.A., (2006).
Tunji and Dokun (1993). Data Processing, Principles and Concepts. Informatics Books,
Lagos.
108
MODULE 4: PROGRAMMING THE COMPUTER
• Flowcharts
• Algorithms
Table of content
Machine language
Assemblers
1.0 Introduction
In this unit, we shall take a look at computer programming with emphasis on:
(a) The overview of computer programming languages.
(b) Evolutionary trends of computer programming languages.
(c) Programming computers in a Beginner All-Purpose Symbolic Instruction
Code (BASIC) language environment with emphasis on:
Objective
The objective of this unit is to introduce the student to the background information about
programming the Computer.
109
Basically, human beings cannot speak or write in computer language, and since
computers cannot speak or write in human language, an intermediate language had to be
devised to allow people to communicate with the computers. These intermediate
languages, known as programming languages, allow a computer programmer to direct the
activities of the computer. These languages are structured around unique set of rules that
dictate exactly how a programmer should direct the computer to perform a specific task.
With the powers of reasoning and logic of human beings, there is the capability to accept
an instruction and understand it in many different forms. Since a computer must be
programmed to respond to specific instructions, instructions cannot be given in just any
form. Programming languages standardize the instruction process. The rules of a
particular language tell the programmer how the individual instructions must be
structured and what sequence of worlds and symbols must be used to form an instruction.
(a) An operation code.
(b) Some operands.
The operation code tells the computer what to do such as add, subtract, multiply and
divide. The operands tell the computer the data items involved in the operations. The
operands in an instruction may consist of the actual data that the computer may use to
perform an operation, or the storage address of data. Consider for example the
instruction: a = b + 5. The ‘=’ and ‘+’ are operation codes while ‘a’, ‘b’ and ‘5’ are
operands. The ‘a’ and ‘b’ are storage addresses of actual data while ‘5’ is an actual data.
Some computers use many types of operation codes in their instruction format and may
provide several methods for doing the same thing. Other computers use fewer operation
codes, but have the capacity to perform more than one operation with a single instruction.
There are four basic types of instructions namely:
(a) input-output instructions;
(b) arithmetic instructions;
(c) branching instructions;
(d) logic instructions.
110
An input instruction directs the computer to accept data from a specific input device and
store it in a specific location in the store. An output instruction tells the computer to
move a piece of data from a computer storage location and record it on the output
medium.
All of the basic arithmetic operations can be performed by the computer. Since
arithmetic operations involve at least two numbers, an arithmetic operation must include
at least two operands.
Branch instructions cause the computer to alter the sequence of execution of instruction
within the program. There are two basic types of branch instructions; namely
unconditional branch instruction and conditional branch instruction. An unconditional
branch instruction or statement will cause the computer to branch to a statement
regardless of the existing conditions. A conditional branch statement will cause the
computer to branch to a statement only when certain conditions exist.
Logic instructions allow the computer to change the sequence of execution of instruction,
depending on conditions built into the program by the programmer. Typical logic
operations include: shift, compare and test.
111
Programming languages, the primary means of human-computer communication, have
evolved from early stages where programmers entered instructions into the computer in a
language similar to that used in the application. Computer programming languages can
be classified into the following categories:
(a) Machine language
(b) Assembly language
(c) High level symbolic language
(d) Very high level symbolic language.
A machine language program allows the programmer to take advantage of all the features
and capabilities of the computer system for which it was designed. It is also capable of
producing the most efficient program as far as storage requirements and operating speeds
are concerned. Few programmers today write applications programs in machine
112
language. A machine language is computer dependent. Thus, an IBM machine language
will not run on NCR machine, DEC machine or ICL machine. A machine language is the
First Generation (computer) Language (IGL).
Because the computer understands and executes only machine language programs, the
assembly language program must be translated into a machine language. This is
accomplished by using a system software program called an assembler. The assembler
accepts an assembly language program and produces a machine language program that
the computer can actually execute. The schematic diagram of the translation process of
the assembly language into the machine language is shown in the below diagram.
Although, assembly language programming offers an improvement over machine
language programming, it is still an arduous task, requiring the programmer to write
programs based on particular computer operation codes. An assembly language program
developed and run on IBM computer would fail to run on ICL computers. Consequently,
the portability of computer programs in a computer installation to another computer
installation which houses different makes or types of computers were not possible. The
low level languages are, generally, described as Second Generation (computer) Language
(2GL).
Low Level
Language
Program
113
Assembler Machine Language Operating System
Program
Store
Fig. 1: Assembly Language Program Translation Process
While the flexibility of high level languages is grater than that of the machine and
assembly languages, there are close restrictions in exactly how instructions are to be
formulated and written. Only a specific set of numbers, letters, and special characters
may be used to write a high level program and special rules must be observed for
punctuation. High level language instructions do resemble English language statements
and the mathematical symbols used in ordinary mathematics. Among the existing and
popular high level programming languages are Fortran, Basic, Cobol, Pascal, Algol, Ada
and P1/1. The schematic diagram of the translation process of a high level language into
the machine language is shown in the diagram below. The high level languages are,
generally, described as Third Generation (computer) Language (3GL).
High Level
Language Compiler Machine Language Operating System
Program Program
Store
114
The general procedure for the compilation of a computer program coded in any high level
language is conceptualized in the above diagram.
Machine
Code
Link
Loader
Library Subroutines
Subroutines
115
The very high level language generally described as the Fourth Generation (computer)
Language (4GL), is an ill-defined term that refers to software intended to help computer
users or computer programmers to develop their own application programs more quickly
and cheaply. A 4GL, by using a menu system for example, allows users to specify what
they require, rather than describe the procedures by which these requirements are met.
The detail procedure by which the requirements are met is done by the 4GL software
which is transparent to the users.
A 4GL offers the user an English-like set of commands and simple control structures in
which to specify general data processing or numerical operations. A program is
translated into a conventional high-level language such as Cobol, which is passed to a
compiler. A 4GL is, therefore, a non-procedural language. The program flows are not
designed by the programmer but by the fourth generation software itself. Each user
request is for a result rather than a procedure to obtain the result. The conceptual
diagram of the translation process of very high level language to machine language is
given in the diagram below.
4GL
Program 4GL Translator High Level Compiler
Language Program
The 4GL arose partly in response to the applications backlog. A great deal of
programming time is spent maintaining and improving old programs rather than building
new ones. Many organizations, therefore, have a backlog of applications waiting to be
116
developed. 4GL, by stepping up the process of application design and by making it
easier for end-users to build their own programs, helps to reduce the backlog.
4.0 Conclusion
Computer programming languages are means by which programmers manipulate the
computer. The programming languages emanates from the need to program the computer
in languages that would be easy for non-experts to understand and to reduce the enormity
of task involved in writing programs in machine code. Programming languages have
evolved from the machine language to assembly language, high level language and very
high level programming language.
5.0 Summary
We summarize the study of computer programming language as follows:
(a) Machine language is the binary language and its made up of only 0s and 1s
which represent the ‘off’ and ‘on’ stages of a computer’s electrical circuits.
(b) Assembly language has a one-to-one relationship with machine language, but
uses symbols and mnemonics for particular items. Assembly language, like
machine language, is hardware specific, and is translated into machine
language by an assembler.
(c) High level languages are usable on different machines and are designed for
similar applications rather than similar hardware. They are procedural in that
they describe the logical procedures needed to achieve a particular result.
High level languages are translated into machine language by a compiler or an
interpreter.
(d) In a high level language one specifies the logical procedures that have to be
performed to achieve a result. In a fourth generation language, one needs to
simply define the result one wants, and the requisite program instructions will
be generated by the fourth generation software. Fourth generation languages
are used in fourth generation systems in which a number of development tools
are integrated in one environment.
Tutor Marked Assignment
117
a) What are computer programming languages?
and compiler.
Balogun, V.F., Daramola, O.A., Obe, O.O., Ojokoh, B.A., and Oluwadare S.A., (2006).
Table of Content
Problem solving with Computer.
Principles of programming.
Stages of programming.
1.0 Introduction
118
Computer programming is both an art and a science. In this unit, we students shall be
exposed to some arts and science of computer programming including principles of
programming and stages of programming.
2.0 Objectives
The objective of this unit is to expose students to the principles of programming and the
stages involved in writing computer programs.
3.0 Problem Solving With The Computer
The computer is a general-purpose machine with a remarkable ability to process
information. It has many capabilities, and its specific function at any particular time is
determined by the user. This depends on the program loaded into the computer memory
being utilized by the user.
There are many types of computer programs. However, the programs designed to
convert the general-purposes computer into a tool for a specific task or applications are
called ‘Application programs’. These are developed by users to solve their peculiar data
processing problems.
Computer programming is the act of writing a program which a computer can execute to
produce the desired result. A program is a series of instructions assembled to enable the
computer to carry out a specified procedure. A computer program is the sequence of
simple instructions into which a given problem is reduced and which is in a form the
computer can understand, either directly or after interpretation.
119
Efficiency: Optimal utilization of resources is essential. The program must use the
available storage space and other resources in such as way that the system speed is not
wasted.
Robustness: The Program should cope with invalid data and not stop without an
indication of the cause of the source of error.
Usability: The Program must be easy enough to use and be well documented.
Maintainability: The Program must be easy to amend having good structuring and
documentation.
Readability: The Code of a program must be well laid out and explained with
comments.
120
The second stage involved is spelling out the detailed algorithm. The use of a
computer to solve problems (be it scientific or business data processing problems)
requires that a procedure or an algorithm be developed for the computer to follow in
solving the problem.
(iii) Developing the method of solution
There are several methods for representing or developing methods used in solving a
problem. Examples of such methods are: algorithms, flowcharts, pseudo code, and
decision tables.
(iv) Writing the instructions in a programming language
After outlining the method of solving the problem, a proper understanding of the
syntax of the programming language to be used is necessary in order to write the
series of instructions required to get the problem solved.
(v) Transcribing the instructions into machine sensible form
After the program is coded, it is converted into machine sensible form or machine
language. There are some manufacturers written programs that translate users
program (source program) into machine language (object code). These are called
translators and instructions that machines can execute at a go, while interpreters
accept a program and executes it line-by-line.
During translation, the translator carries out syntax check on the source program to
detect errors that may arise from wrong use of the programming language.
(vi) Program debugging
A program seldomly executes successfully the first time. It normally contains a few
errors (bugs). Debugging is the process of locating and correcting errors. There are
three classes of errors.
(i) Syntax errors: Caused by mistake coding (illegal use of a feature of the
programming language).
(ii) Logic errors: Caused by faulty logic in the design of the program. The
program will work but not as intended.
(iii) Execution errors: The program works as intended but illegal input or other
circumstances at run-time makes the program stop. There are two basic levels
of debugging. The first level called desk checking or dry running is
121
performed after the program has been coded and entered or key punched. Its
purpose is to locate and remove as many logical and clerical errors as
possible.
The program is then read (or loaded) into the computer and processed by a language
translator. The function of the translator is to convert the program statements into the
binary code of the computer called the object code. As part of the translation process, the
program statements are examined to verify that they have been coded correctly, if errors
are detected, a series of diagnostics referred to as an error message list is generated by the
language translator. With this list in the hand of programmer, enters the second level of
debugging is reached.
The error message list helps the programmer to find the cause of errors and make the
necessary corrections. At this point, the program may contain entering errors, as well as
clerical errors or logic errors. The programming language manual will be very useful at
this stage of program development.
After corrections have been made, the program is again read into the computer and again
processed by the language translator. This is repeated over and over again until the
program is error-free.
122
(c) Invalid data is inserted to test the program’s error-handling routines. If
the result of the testing is not adequate, then minor logic errors still
abound in the program. The programmer can use any of these three
alternatives to locate the bugs.
Other methods of testing a program for correctness include:
Manual walk-through: The programmer traces the processing
steps manually to find the errors, pretending to be the computer,
following the execution of each statement in the program, noting
whether or not the expected results are produced.
Use of tracing routines: If this is available for the language,
this is similar to (1) above but it is carried out by the computer
hence it takes less time and it is not susceptible to human error.
Storage dump: This is the printout of the contents of the
computers storage locations. By examining the contents of the
various locations, the instruction at which the program is halted
can be determined. This is an important clue to finding the error
that caused the halt, when a program is halted.
Program documentation: Documentation of the program
should be developed at every stage of the programming cycle.
The following are documentations that should be done for each
program.
(a) Problem Definition Step
• Aclear statement of the problem
• The objectives of the program (what the program is to accomplish)
• Source of request for the program.
• Person/official authorizing the request.
(b) Planning the Solution Step
• Flowchart, pseudocode or decision tables
• Program narrative
• Descriptive of input, and file formats
(c) Program source coding sheet
123
(d) User’s manual to aid persons who are not familiar with the program to apply it
correctly.
It contains a description of the program and what it is designed to achieve.
(e) Operator’s manual to assist the computer operator to successfully run the
program. This manual contains:
(i) Instructions about starting, running and terminating the program.
(ii) Message that may be printed on the console or VDU (terminal) and their
meanings.
(iii) Setup and take down instruction for files.
Advantages of Program documentation
(i) It provides all necessary information for anyone who comes in contact with
the program.
(ii) It helps the supervisor in determining the program’s purpose, how long the
program will be useful and future revision that may be necessary.
(iii) It simplifies program maintenance (revision or updating)
(iv) It provides information as to the use of the program to those unfamiliar with
it.
(v) It provides operating instructions to the computer operator.
4.0 Conclusion
The intelligence of a computer derives to a large extent from the quality of the programs.
In this unit, we have attempted to present in some details, the principles and the stages
involved in writing a good computer program.
5.0 Summary
In this unit we have discussed the following:
i. Principles of computer programming.
ii. Stages of computer programming.
iii. The interrelationship between different stages of programming.
124
i. Differentiate between program debugging and program testing.
ii. What are the differences between syntax errors and logic errors. Give
examples of each.
iii. Is it possible to detect logic error during program compilation? Explain the
reason for your answer.
7.0 References and Further Reading
Akinyokun, O.C, (1999). Principles and Practice of Computing Technology.
Balogun, V.F., Daramola, O.A., Obe, O.O., Ojokoh, B.A., and Oluwadare S.A., (2006).
125
STUDY UNIT 11: FLOWCHART AND ALGORITHMS
Table of Content
Flowchart
Algorithms
1.0 Introduction
In this unit you are introduced to the principles of flowcharts and algorithms. The
importance of these concepts are presented and the detailed steps and activities involved
are also presented.
2.0 Objectives
The objective of this unit is to enable the student grasp the principles of good
programming ethics through flowcharting and algorithms.
3.0 Flowchart
A Flowchart is a graphical representation of the major steps of work in process. It
displays in separate boxes the essential steps of the program and shows by means of
arrows the directions of information flow. The boxes most often referred to as illustrative
symbols may represent documents, machines or actions taken during the process. The
area of concentration is on where or who does what, rather than on how it is done. A
flowchart can also be said to be a graphical representation of an algorithm, that is, it is
visual picture which gives the steps of an algorithm and also the flow of control between
the various steps.
3.1 Flowchart Symbols
126
Flowcharts are drawn with the help of symbols. The following are the most commonly
used flowchart symbols and their functions:
Symbols Function
Used to show the START or STOP point.
May show exit to a closed subroutine.
Terminator
Used for arithmetic calculations of process.
E.g. Sum = X + Y + Z
127
Used to show the direction of travel. They are used
in linking symbols. These show operations sequence
and data flow directions.
128
Definition: An algorithm, named after the ninth century scholar Abu Jafar Muhammad
Ibn Musu Al-Khowarizmi , is defined as follows: Roughly speaking:
• An algorithm is a set of rules for carrying out calculation either by hand or a
machine.
• An algorithm is a finite step-by-step procedure to achieve a required result.
• An algorithm is a sequence of computational steps that transform the input into
the output.
• An algorithm is a sequence of operations performed on data that have to be
organized in data structures.
• An algorithm is an abstraction of a program to be executed on a physical machine
(model of computation)
The most famous algorithm in history dates well before the time of the ancient Greeks:
this is Euclids algorithm for calculating the greatest common divisor of two integers.
Before we go into some otherwise complex algorithms, let us consider one of the
simplest but common algorithms that we encounter everyday.
The classic multiplication algorithm
For example to multiply 981 by 1234, this can be done using two methods (algorithms)
viz:
a. Multiplication the American way:
Multiply the multiplicand one after another by each digit of the multiplier
taken from right to left.
981
1234
3924
2943
1962
981
1210554
129
b. Multiplication , the British way:
Multiply the multiplicand one after another by each digit of the multiplier taken from
left to right.
981
1234
981
1962
2943
3924
1210554
130
INPUT U, V, W
RESULT U+ (V^2)/V
PRINT RESULT
STOP
2. Suppose you are given 20 numbers. Prepare the algorithm that adds up
these numbers and find the average. Draw the flowchart.
Solution:
Algorithm
(i) Set up a Counter (1) which counts the number of times the loop is executed.
Initialize Counter (1) to 1.
(ii) Initialize sum to Zero
(iii) Input value and add to sum
(iv) Increment the Counter (1) by 1
(v) Check how many times you have added up the number (if it is not up to the
required number of times, to step (iii).
(vi) Computer the average of the numbers
(vii) Print the average
(viii) Stop. Flowchart
START
1 1, SUM 0
INPUT 1
131
SUM SUM + 1
1 1 + 1
IS
1 < = 20
NO
AVE SUM/
PRINT AVE
STOP
3. Prepare an algorithm that indicates the logic for printing the name and telephone
number for each female in a file (Code field is 2 for female). Draw the flowchart.
Solution:
Algorithm
(i) Read a record
(ii) Determine if the record pertains to a female (that is, determine if the code
field is equal to 2).
(iii) If the code field is not equal to 2, then do not process this record any further,
since it contains data for a male. Instead, read the next record; that is, go
back to step (i).
132
(iv) If the record contains data for a female (that is, code is equal to 2), then print
out the following fields: first name, last name, telephone number
(v) Go back to step (i) to read the next record.
Flowchart
START
NO IS
CODE = 2
YES
4. Prepare an algorithm that prints name and weekly wages for each employee out of
10 where name, hours worked, and hourly rate are read in. Draw the flowchart.
Solution:
Algorithm
(i) Initialize Counter (A) to 1
(ii) Read name, hours and rate and number of workers
(iii) Let the wage be assigned the product of hours and rate
(iv) Print name and wages
133
(v) Increment the counter (A) by 1
(vi) Make a decision (Check how many times you have calculated the wages)
(vii) Stop processing, if you have done it the required number of times.
Flowchart
START
A 1,
PRINT NAME
WAGES
A A + 1
YES IS
A < = 10
NO
STOP
3.5 Pseudocode
Pseudocode is a program design aid that serves the function of a flowchart in expressing
the detailed logic of a program. Sometimes a program flowchart might be inadequate for
expressing the control flow and logic of a program. By using Pseudocode, program
algorithm can be expressed as English-language statements. These statements can be
used both as a guide when coding the program in specific language and as documentation
134
for review by others. Because there is no rigid rule for constructing pseudocodes, the
logic of the program can be expressed in a manner without confronting to any particular
programming language. A series of structured words is used to express the major
program functions. These structured words are the basis for writing programs using a
technical ter called “structure programming”.
Example:
Construct Pseudocode for the problem in the example above.
BEGIN
STORE 0 TO SUM
STORE 1 TO COUNT
DO WHILE COUNT not greater than 10
ADD COUNT to SUM
INCREMENT COUNT by 1
ENDWILE
END
3.6 Decision Tables
Decision tables are used to analyze a problem. The conditions applying in the problem
are set out and the actions to be taken, as a result of any combination of the conditions
arising are shown. They are prepared in conjunction with or in place of flowcharts.
Decision tables are a simple yet powerful and unambiguous way of showing the actions
to be taken when a given set of conditions occur. Moreover, they can be used to verify
that all conditions have been properly catered for. In this way they can reduce the
possibility that rare or unforeseen combinations of conditions will result in confusion
about the actions to be taken.
Decision tables have standardized format and comprise of four sections.
(a) Conditions Stub: This section contains a list of all possible conditions which
could apply in a particular problem.
(b) Condition Entry: This section contains the different combination of the
conditions each combination being given a number termed a ‘Rule’:
135
(c) Action Stub: This section contains a list of the possible actions which could
apply for ay given combinations of conditions.
Action Entry: This section shows the actions to be taken for each combination of
conditions. Writing the instructions in a programming language (Program coding)
The instructions contained in the algorithm must be communicated to the computer in a
language it will understand before it can execute them. The first step is writing these
instructions in a programming language (Program coding). Program coding is the
process of translating the planned solution to the problems, depicted in a flowchart,
pseudocode or decision table, into statements of the program. The program flowchart,
pseudocode decision table as the case may be is as a guide by the programmer as he
describes the logic in the medium of a programming language. The coding is usually
done on coding sheets or coding forms.
4.0 Conclusion
Flowcharts, decision tables, pseudocodes and algorithms are essential ingredients to the
writing of good programs. If they are done properly they lead to reduction in errors in
programs. They help minimize the time spent in debugging. In addition, they make logic
errors easier to trace and discovered.
5.0 Summary
In this unit we have learnt that:
i. A Flowchart is a graphical representation of the major steps of work in
process. It displays in separate boxes the essential steps of the program and
shows by means of arrows the directions of information flow.
ii. Decision tables are used to analyze a problem. The conditions applying in the
problem are set out and the actions to be taken, as a result of any combination
of the conditions arising are shown.
iii. Pseudocode is a program design aid that serves the function of a flowchart in
expressing the detailed logic of a program.
iv. An algorithm is a set of rules for carrying out calculation either by hand or a
machine.
136
6.0 Tutor Marked Assignment
1. Draw the flowchart of the program which prints each two-digit odd number N, its
square, and its cube.
2. Draw a flowchart to input the scores of a student in 8 courses and find the
average of the scores.
7.0 References and Further Reading
Balogun, V.F., Daramola, O.A., Obe, O.O., Ojokoh, B.A., and Oluwadare S.A., (2006).
Gray S. Popkin and Arthur H. Pike (1981). (1981). Introduction to Data Processing with
BASIC, 2nd edition, Houghton Mifflin Company, Boston.
137
MODULE 5: COMPUTER APPLICATION PROGRAMMING USING VISUAL
BASIC
Table of content
1.0 Introduction
Visual is an event driven language which has some features of Object Oriented
Programming (OOP). Actions are tied to the occurrence of events e.g. an action may be
triggered by clicking the mouse. This approach make application programs more friendly
and natural to the end user. In this unit students are introduced to the concept of working
with graphical objects and the general Visual Basic Programming concepts.
2.0 Objectives
138
i. The concept of working with graphical objects and the general Visual Basic
Programming concepts.
These sessions will include learning how to work with graphical objects in the
Visual Basic Environment and using general Visual Basic Programming concepts.
application might consist of several files, and the project is the collection of those files.
The application wizard can be selected from the New Project dialog box. If you
cancel the New Project dialog box, and then later want to start the Application wizard,
select File, New Project to display the New Project dialog box once again. The screen
139
Figure 1
When you select the icon labeled VB Application Wizard on the New tab, the wizard
begins its work. The interface type you select will determine how your application will
140
Figure 2
Figure 3
141
You can select the options you want your application’s menu to contain as shown in
Figure 3 above. The options are common Windows options found on most Windows
programs. The ampersand (&) next to a letter in a menu name indicates the underscored
accelerator key letter; in other words, &New indicates that New appears on the menu and
The next wizard screen, shown in Figure 4, lets you select the toolbar buttons that your
application will have. Click next to accept all the default toolbar settings.
Figure 4
The next wizard screen to appear is the Resource screen from which you can select to use
resources in your program. The next one is the Internet Connectivity screen from which
you can add an Internet interface to your program if you want one. The next screen gives
142
• Splash screen is an opening title screen that appears when your application first
begins.
• Login dialog is a dialog box that asks for the user’s ID and password as a part of
• Options dialog is tabbed blank dialog box from which your users can specify
• About box is a dialog box that appears when your users select Help, About from
You can also select a form template from here. A form template is model of a form that
Click Next to get to the last screen and click the Button labeled Finish to instruct Visual
The New Project window appears, when you first start Visual Basic or when you
select File, New Project. You will always need toolbars in your project. Visual Basic
• Debug. This toolbar appears when you use the interactive debugging tools to
• Standard. This toolbar is the default toolbar that appears beneath the menu bar.
You can display and hide these toolbars from the View, Toolbars menu.
143
Using the Toolbox
The Toolbox window differs from the toolbar. The toolbox is a collection of tools that
act as a repository of controls you can place on a form. Figure 5 shows the most
Shape Line
Image Data
OLE
Figure 5
Most of your work goes on inside the Form window. You’ll design all your application’s
forms, which are the background windows that your users see, in the central editing area
where the Form window appears. You can resize the Form window to make the windows
144
An application may contain multiple forms: you can display one or more of those
forms in their own Form window editing areas. Activate a form by clicking a form by
The Form Layout window is an interesting little window connected closely to the Form
window, because the Form Layout window shows you a preview of the Form window’s
location.
4.0 Conclusion
Visual Basic programming language is one of the most popular application programming
languages which is easy to learn. It is event driven and have some attributes of Object
Oriented Programming. These attributes has made it one of the most preferred languages
in Windows environment.
5.0 Summary
(a) The concept of working with graphical objects and the general Visual Basic
Programming concepts.
b. List and discuss the functions of ten items in Visual Basic toolbox
145
7.0 References and Further Reading
Balogun, V.F., Daramola, O.A., Obe, O.O., Ojokoh, B.A., and Oluwadare S.A., (2006).
Table of Content
1.0 Introduction
The project window enables the user or programmer to navigate the items created in a
project such as the forms and modules. The property window on the other hand helps the
programmer to choose the appropriate properties for and object. When you display the
Properties window for a control, you can modify its values. You can do that by selecting
2.0 Objectives
146
The objective is to enable user gain more mastery of the Visual Basic programming
environment.
The Project Window helps you to manage your application’s components. It lists its
components in a tree-structured listing. Related objects appear together. You can expand
or shrink the details by clicking the plus sign next to the object labeled Forms, a list of
• Projects
• Forms
• Modules
• Class modules
• User controls
• User documents
• Property pages
A form can hold many controls. As you add controls to a form, you can select a control
by clicking the control. When you select a control, the Properties window changes to list
every property related to that control. When you add a control to a Visual Basic
application, Visual Basic sets the control’s initial property values. When you display the
Properties window for a control, you can modify its values. You can do that by selecting
147
Figure 6 shows a Properties window listing some of the properties for a Label control.
Figure 6
Example 1
Create an application with three controls, a label, a command button and an image control
148
Figure 7
To place a control on a form, click on the control’s icon on the toolbox and move the
crosshair mouse cursor to the form. As you drag the mouse, Visual Basic draws the
control’s outline on your form. When you have drawn the control at its proper location
and size, release the mouse button to place the control at its proper location.
Assign the following property values to the application’s forms and controls:
149
Label Font Courier New
Label Size 36
While writing your application, you can run the application to see what you have done by
pressing F5.
You need to add some codes to finalize the application. Double click the form
somewhere on the grid inside the Form window to display the code window. Add the
To return to the Form window, click the Project window’s View Object button.
150
Figure 8
Run your program and click the command button. An image like that shown in Figure 7
appears. Save your project and click the Close window to terminate the program. To
save, Select File, Save Project. The Save Project option saves every file inside your
project as well as a project description file with the filename extension. VBP. Visual
Basic asks first for the filename you want to assign to your form. Visual Basic then asks
first for a project for the project description file. Answer No if Visual Basic asks to add
Example 2
Create an application to look like what is shown in Figure 9, to include a label, a textbox
(where the secret characters will be entered), an image, and two command buttons.
151
Figure 9
152
Label Height 855
Label Left 2520
Label Top 600
Label Width 3375
Text box Name txtPassword
Text box Height 375
Text box Left 3360
Text box PasswordChar *
Text box Text (Leave blank by clearing the default
value)
Text box Top 1600
Text box Width 1695
Command button Name cmdTest
Command button Caption &Test Password
Command button Left 6360
Command button Top 3000
Command button #2Name cmdExit
Command button #2Caption E&xit
Command button #2Left 6360
Command button #2Top 3720
Add the following code seen on the screen in Figure 10 to activate the password-
based form:
Figure 10
153
After running the application, you have what is shown in figure 11 below:
Figure 11
4.0 Conclusion
The project window and the property window are very important to features of the Visual
5.0 Summary
In this unit we have studied the importance of the project window and the property
window.
Create an application with three multiline text boxes. Make the text boxes tall enough to
display three or four lines of text. Give the first one a vertical scrollbar, the second a
horizontal scrollbar, and the third one both kinds of scrollbars. In all the three text boxes,
154
supply the default text “Type here”. In addition to the text boxes, include an Exit
Balogun, V.F., Daramola, O.A., Obe, O.O., Ojokoh, B.A., and Oluwadare S.A., (2006).
155
STUDY UNIT 14: CREATING MENU APPLICATIONS
Table of Contents
1.0 Introduction
One of the basic features of the Graphical User Interface (GUI) is that enables user to
select the operations to be performed through menus with the aid of the mouse. In this
2.0 Objectives
The objective of this unit is to enable students learn the steps involved in creating visual
You can generate menus for your applications using the application wizard. After you
click the menu options and submenus you want in your applications, the Application
wizard generates the appropriate menu controls and places them in the generated
application.
The Toolbox window does not contain any menu-creation tools. Instead, Microsoft
offers a special menu tool called the Menu Editor, shown in Figure 13 that you use to
create menus. From the Form window, you can press Ctrl+E to display the Menu Editor.
156
The Menu Editor helps you design menus for your applications. In a way, the Menu
Editor acts like a Properties window for the menu bar because you will designate the
names of the menu controls as well as the captions that the users see on the menus and
Menu properties
Figure 1
A menu bar offers a special kind of control that lets your select options and issue
Menu bar
commands.
Disabled options
Enabled options
Shortcut
Separator
Selected option 157
Checked Submenu
option
Figure 2
Example 1
Create an application with three menu options and a label. Your screen should look like
158
Figure 3
Guide to solution
To create the menu bar, click the form and press Ctrl+E to display the Menu Editor.
Type &File for the Caption field. As with all other Visual Basic values, the
ampersand indicates that the F will be the accelerator key for the menu selection.
As you type the caption, Visual Basic displays the caption in the Menu control list
Press Tab to move to the Name field. Tab and Shift+Tab shift the focus between
Leave all other fields alone and click the Next button to prepare for the remaining
menu bar options. The Next button lets the Menu Editor know that you are
159
Type &Color for the next menu bar caption and type mnuColor for the name.
Type &Message for the third and final menu bar caption and type mnuMessage
for the caption. Your Menu Editor should look like the one in Figure 2.
Figure 2.
You can either create pull-down menus as build the menu bar or add the menus later. If
you create the complete menu bar first, however as you’ve done in this exercise, you’ll
have to insert the menu options in their respective locations when you are ready to add
them. The Menu Editor’s Insert button lets you do just that.
Example 2
160
Add three checked options : Blue, Green, and Red, to the second menu, Color. These
colors will be mutually exclusive; the label will not be able to be all three colors at once,
but only one color at a time. Such colors make perfect candidates for checked menu
options. Your application should like Figure 17 after running. Also, include a submenu to
the Message menu. Let it contain the checked messages displayed in Figure 18, and
Figure 17
161
Figure 3
Click the &Message option in the Menu control list box to highlight that option.
Click the Insert button and right arrow button three times to add three empty rows
Highlight the first blank row where you’ll add the Blue option.
Type &Blue for the caption and mnuColorBlue in the Name field. When the user
first runs the program, the Blue option will be unchecked to indicate that Blue is
162
Click Next to enter the next option.
Type &Green for the caption and mnuColorGreen in the Name field of the next
option.
Type &Red for the caption and mnuColorRed for the name of the next option.
The Red option is to be checked when the user first starts the program. Therefore,
click the Checked field to place the check mark next to Red.
To add the Message menu, display the Menu Editor and click the row beneath
&Message in the lower half of the Menu Editor to prepare the Menu editor to
To create the separator bar, after entering the first item, click next and type a
single hyphen(-) for the caption (all separators bars have this caption). Type
Open the code window and type the code shown in Figures 19 and 20. The code controls
163
Figure 4
164
Figure 5
When the application is run, the screens look that those in Figures 4 and 5. For
Figure 4, colour blue was selected with the second message “VB is Simple”.
165
Figure 4
Figure 5
166
4.0 Conclusion
5.0 Summary
Balogun, V.F., Daramola, O.A., Obe, O.O., Ojokoh, B.A., and Oluwadare S.A., (2006).
167
STUDY UNIT 15: ANALYSING VISUAL BASIC DATA
Table of Content
1.0 Introduction
Here, Students will learn more about the Code window, and practice their programming
skills on declaration of data, use of variables of different data types and use of operators.
2.0 Objectives
The objective of this unit is to enable students learn more about the code window and
• General-purpose procedures
• Event procedures
Figure 1 shows the declarations sections in the first set of codes. After the first wrapper
can be meant to perform any kind of function like computing some data, while event
procedures will be executed after the clicking of a mouse once or twice, the loading of a
168
Figure 1
169
Figure 2
More of use of variables together with the control of programs with conditional operators,
logical operators and FOR DO loops are described in the Exercises below:
Example 1
Write and Run a Visual Basic Program to solve the Quadratic Equation Problem,
ax2+bx+c.
Solution
The code that provides the solution to the problem using the IF- THEN statement are
shown in Figures 3 and 4. This contains statements explaining most of the basic concepts
Figure 5. As it can be seen, key words are in blue, comments are in green while the other
170
Figure 3
Figure 4
171
Figure 5
Solving the same problem using SELECT CASE statement, we have the codes displayed
in Figure 6.
172
Figure 6
Example 2
Write and Run a Visual Basic Payroll Program for 10 employees of a company. The
Gross pay sums the Basic pay, Housing allowance and Professional allowance (where
applicable). Workers’ Grade levels range from 1 to 16. Housing allowance of workers is
30% of Basic pay for workers on levels 8-16 and 40% for levels 1-7 workers. Transport
allowance is 20% of Basic pay for all workers. Hazard allowance is 15% of Basic pay
for only levels 8-16 workers. The Net pay, which is the take home pay, is the Gross pay
– Tax (10% of Gross pay). Design a form through which each worker’s data can be
173
Figure 7
174
Figure 8
175
Figure 31
4.0 Conclusion
The code window is very important to visual basic programming. Ability to write good
5.0 Summary
Using the code window, write a program to display the current time.
176
Francis Scheid (1983). Schaum’s Outline Series: Computers and Programming.
Mcgraw-Hill Book Company, Singapore.
In this module we shall discuss the application of computers in the following areas:
• Education
• Health Care
• Recreation
• Government
Table of Contents
1.0 Introduction
Computer has become a universal tool of any modern man (or woman). Literacy, today is
not defined only in terms of the ability to read and/or write but in addition, it includes the
ability to use and communicate with the aid of computer. In the education sector,
177
2.0 Objective
The main objective of this unit is to identify some areas of application of computer in the
The field of education provides the most fascinating application of computing system.
This has consequently attracted considerable attention from educationist and policy
makers since the late 1960s, when computers were introduced into the classroom. The
entry of the computer into the classroom has now offered opportunities and possibilities
packages are now available in almost every subject. These self-tutor instruction packages
are well designed to enable the user to learn on his or her own time, speed and
convenience. The role of the teacher here is that of a guide so that the student can think
more logically and can gain meaningful experience in such structured situations, role
playing and other well programmed exercise so that the student can have a better
Apart from the use of computer as an instructional aid, it is also used in the execution of
routine and administrative tasks such as the keeping of academic and administrative
178
The computer has also revolutionized the services rendered by libraries to readers. A
computer based on-line public access catalogue system manages a search for materials
using indices such as author’s name, book title, subject and classmark. Readers using
periodicals, recall books on loans and also make requisition for short loan items.
Furthermore, optical character reading devices are used to scan the bar codes on readers
library cards to offer a computer based issuing of books to readers. A computer based
colleges of education and universities, computer can be used for the following:
mentally/physically disable (the blinds, deaf etc), adults, KGs, teenagers etc.
Library Technology.
• Teleconferencing technology.
179
• Placing and sourcing of educational materials/resources e.g. papers, journals,
• Estimating the ratio of students to teachers and teachers to teaching facilities with
• Aiding students to learn basic theoretical concepts. There are currently, some
computer aided learning software packages and hardware devices that are readily
4.0 Conclusion
Computers have been applied in virtually all fields of human endeavour. This unit
presents an overview of some of the key areas of its application. The application of
5.0 Summary
In this unit we have learnt that computer could, among others, be applied in the following
• Education
180
• Science and Engineering
• Health Care
• Recreation
• Government
• The Military
You have just been appointed as the principal of a model secondary school. Write a
proposal to the school governing council on the areas of application of computers to the
Balogun, V.F., Daramola, O.A., Obe, O.O., Ojokoh, B.A., and Oluwadare S.A., (2006).
Oliver E.C. and Chapman R.J. (1986). Data Processing, Seventh Edition. ELBS/DP
Publications.
181
STUDY UNIT 17: COMPUTER APPLICATIONS IN THE BUNESSS AND
INDUSTRY
Table of Content
1.0 Introduction
In the early days of computing, computers were originally meant to assist in scientific
and engineering applications. Today, computers are widely used to perform wide ranging
operations are becoming more complex and competitive thus increasing the need to
produce and process more accurate and timely data both in quantity and quality. More
182
accurate, reliable and timely data are needed for corporate planning, policy formulation
2.0 Objectives
The objective of this unit is to highlight the areas of application of computer in business
and industry.
in details:
(i) Payroll.
(i) Payroll
Payroll preparation is essentially a repetitive and a routine task which has to be done
183
demands speed, accuracy, carefulness and honesty. It involves making references to a
number of source documents which by their nature also require constant and periodic
updating.
These attributes obviously lend themselves to the use of computers which have
the capabilities to meet the challenging demands in payroll preparation. These include the
(b) Store information and make the information available as at when it is needed.
(c) Handled repetitive recurring tasks and check on its own work as a way of
(d) Provide a much better and reliable procedure for the necessary security checks to
resignations, terminations, dismissals and other changes are made within a period
of time.
(b) Computing wages and salaries for each individual workers based on regular and
(c) Making deductions for income tax and for other payments such as union dues and
repayment of loans.
(d) Preparation of pay advice slips and cheques to employees and banks.
184
(e) Updating the master payroll file based on the records received from the personnel
department.
In addition to payroll preparation, the computer is also used for other routine and
repetitive book keeping and accounting operations involving recording, classifying and
summarizing accounting data. This may involve preparing and updating ledger and
journal accounts, invoicing, accounts receivable and payable. Other operations may also
include updating and preparing accounts on sales, purchases and inventory. The computer
is also used for the preparation and evaluation of the balance sheet and statements of
management.
An equally important business application of the computer is seen in the execution of the
business organisation. This is to ensure that working capital is not unduly tied in stocks
while at the same time available stocks can meet the demands of continued production
process. In this direction, the computer is used as a tool in updating records of inventory
and also in the preparation of forecasts and demand predictions based on economic order
The computer is used as a tool by auditors to report accurately on the transaction register
which constitutes the most crucial aspect in the audit trail. With the aid of the computer,
185
it is easier for auditors, in their examination of the accounting records of a business, to
trace routine business operations so that variances can be detected and verified accurately
management decision making. The computer is used as a tool for the online storage,
retrieval, processing and maintenance of corporate data meant to be shared by all the
users’ departments.
concise, timely and effective data which management can use at various level of decision
Included in Management Information System to be used for the various decision making
(a) Controlling and operational planning support systems to deal with day-to-day
(b) Tactical support systems to deal with short-run and middle level management
decisions.
(c) Strategic support systems to deal with corporate strategic and top level
management decisions.
186
With the aid of these support systems, data can be retrieved and analyzed on a continuous
and timely basis to aid management decision making and other management functions
about sales, finances, purchases, acquisition of plant and equipment, research, market
One of the important functions of the personnel department is to maintain and continually
update a master file and other records in the personnel department in an organisation. The
prepared at the appropriate time to provide the necessary data to aid management
credits, leave periods, staff training, staff development and so on. Furthermore,
management can provide the necessary accurate and up-to-date reports on a timely and
continual basis to facilitate payroll preparation and also to satisfy other mandatory data
requirements from data users such as governments, trade unions, banks, credit unions and
tax collectors.
The routine and periodic preparation of customers utility bills particularly those based on
meter readings for such utility services as water, electricity, telephone, gas, demands
187
accuracy and speed in which the computer has proved very effective and efficient. With
the aid of the computer, accurate and up-to-date customer’s bills can be sent to them
periodically and in good time to enable settlement to be made. Computers can be used to
generate notices of defaulters. Equally important is the use of the computer to calculate
dividend, pension and other periodic payments as and when they become due.
Another important application of the computer which has proved very beneficial in the
world of business is the monitoring of production processes so that high quality products
and services are provided to customers. Computer Aided Designs (CAD) devices are
used in the design of products while computer monitored quality control procedures are
used in production process to detect items that fail to meet the approved quality standards
and specifications. Such automated devices are used in car assembly plants, oil refineries,
manufacturing of drugs and so on. Computer aided quality control devices are also used
to monitor weight, size, quantity, contents and other standard specifications in the course
of a manufacturing process.
Check-out points in supermarkets and departmental stores are now highly computerized
to detect the prices of items. Magnetic Character Readers are used to scan Universal
Product Codes on items to provide fast, efficient and satisfactory services to customers in
commercial transaction in retail outlets, departmental stores, libraries and other point of
sale service.
188
Computer application in the financial market is manifested in its use to monitor financial
market operations and to disseminate timely and up-to-date information which are
announced daily on the radio, television or consumers magazines. Stock exchange centres
are highly computerized to provide accurate and up-to-date prices of stock and shares and
also to execute the buying and selling transactions that take place in the markets. The
computer has long been used to assess, evaluate and monitor stock market prices. With
the aid of the computer, market trends are predicted with accuracy and inventors are
provided with the appropriate and up-to-date data to enable them make intelligent
major currencies as well as the prices of major commodities such as gold, crude oil,
cocoa, coffee, and other commodities that enter into international trade. Computer is also
used to provide accurate and up-to-date information on interest rates, gilts and bonds to
reflect market trends. The computer application in business is further seen in its use in
discounting bills and bonds and other financial market instruments to their present values.
Closely related to this is the use of the computer to carefully monitor the movement of a
basket of goods and services which measures the rate of inflation in an economy and
Most banking operations are now highly computerized as a move to provide fast,
effective and efficient services to customers. These include the use of Magnetic Ink
Character Readers to process cheques and the provision of Magnetic Credit Cards to
teller machines. Customers also use their credit cards to open doors to some banking
189
houses to transact business. There are other Electronic Funds Transfer terminals to
perform automatic financial transactions at check out counters in hotels, stores, airlines,
(b) Monitor, control and evaluate the transactions of the customers and clients on
their accounts.
(d) Monitor, control and evaluate the bank or insurance company’s revenue and
expenditure.
(e) Automate the production of statement of accounts and assist in generating the
accurate the correct addresses to which the statement of account should be sent.
(d) Generating the table of contents and the index of a book automatically.
(e) Generating the page size of a book and cut and paste illustrations automatically.
(f) Processing images such as the scanning of pictures and recording them
(h) Assisting the writer of an article to identify the words that have similar meaning.
190
4.0 Conclusion
Computer technology has changed the face of business and industry through its various
applications. Information and knowledge replace capital and energy as the primary
conducted, and the way the commodities of trade are transformed. Discussions presented
in this unit has brought to the fore some of the areas of application of computer in
5.0 Summary
In this unit, the following areas of application of computer technology in business will be
(a) Payroll.
191
6.0 Tutor Marked Assignment
The banking industry in Nigeria has benefited immensely from computer and Information
banking industry.
Balogun, V.F., Daramola, O.A., Obe, O.O., Ojokoh, B.A., and Oluwadare S.A., (2006).
Oliver E.C. and Chapman R.J. (1986). Data Processing, Seventh Edition. ELBS/DP
Publications.
Tunji and Dokun (1993). Data Processing, Principles and Concepts. Informatics Books,
Lagos.
192
STUDY UNIT 18: COMPUTER APPLICATIONS IN GOVERNMENT, SCIENCE,
Table of contents
Application of computers in :
(d) Recreation
(e) Government
1.0 Introduction
This unit discusses in greater details the application of computers in the following fields:
2.0 Objectives
193
The objective of this unit is to further introduce students to the application of computers
Computer is commonly used to find the accurate solutions to both scientific and
engineering problems. Weather forecasting has now become a daily activity to which the
computer has proved very useful in providing information on the kind of weather we are
likely to expect over a period of time. Such accurate predictions help the farmers, airline
operators, navigators and other activities which depend on the weather for their
operations. Computer aided critical path study is used to monitor the optimum and
efficient use to time, money, material and human resource in the execution and
projects, for example, the construction of roads, bridges, buildings, manufacturing, the
techniques to provide indicators as to how systems such as the human body, economy,
case such repercussions happen when the desired changes are introduced in practical
situations. Computers are also to design buildings, roads, bridges, vehicles, aero planes,
ships and complex architectural, ships and complex works and so on. Prototyping is
increasingly being used to minimize the financial commitment to the real life
194
The computer is used to find solution to very complex mathematical and
packages are now increasingly being developed to analyse surveyed data, construct life
tables, perform mortality demographic and other multivariate data analysis designed to
and everyday life situations. We now outline the use of computer in the following
(d) Tabulating or plotting the graph of the results obtained from laboratory
experiments.
(a) Designing and drawing with very high precision, accuracy and at minimum cost.
195
(c) Developing the prototype of say, an aircraft, a motor car, assembly plant and so
on. It is possible to test and monitor the performance of these systems without
(d) Fabricating, constructing and assembling the component parts of machines such
(b) Market survey, statistical analysis of proportional market gains and prediction of
3.2 Agriculture
(a) Keep records of soil, rainfall, weather conditions, land size, crops, chemicals and
ultimately process the records to estimate the soil fertility and yield per hectare
(b) Keep records, of poultry and animal husbandry farm with a view to estimating the
(c) Assess the behaviour patterns of farmers in a cooperative venture and assist in
matching the farmers that have identical behaviour with a view to optimizing their
productivity.
196
(b) Indexing, storage and retrieval of law reports.
(e) Statistical analysis of criminal and civil cases in the law court and estimating the
rate of growth.
(h) Identifying the causes of crime and assisting with the provision of preventive and
curative measures.
The delivery of health care facilities has been one of the notable areas in which computer
applications have proved most beneficial to mankind. The computer is used to conduct
fast and accurate laboratory tests for blood, urine, stool and so on. The computer is used
in the diagnosis and physiological monitoring of patients life during surgical operation
and intensive care programme. There is also a wide range of application packages for the
management and so on. An equally important application of the computer is the computer
simulation provided in the training of medical and paramedical staff and students.
Computers are being used to perform routine clerical functions in hospitals such as
197
used to provide a data bank of medical history to meet the data needs of health insurance
The summary that can be drawn about the use of computers in the hospitals are as
follows:
(a) Keeping and reviewing in a timely, effective and efficient manner the records of
(b) Monitoring the temperature, blood pressure, heart beat and a host of other
occur.
(d) Assisting the medical practitioners in the prescription of drugs to patients and
(e) Assisting the medical practioners in the monitoring, controlling and reviewing
basic health services, birth rate, death rate, outbreak of disease and a host of
others.
communications sectors with increased sophistication but geared towards making life
easier and safer for mankind. Today, mankind world-wide is linked by computer
198
around the globe on the radio, television, telex, facsimile and so on through microwave
communication satellites
popular computer controlled electronic mail service which provides a more effective and
environment. The electronic mail service now provides faster, more convenient and
cheaper electronic flow of information than the telephone, fax and telex transmission.
around the globe in the field of politics, business, transport, sports, airline, hotel
reservations and many others. the Cabled Network News (CNN) is a practical example.
Traffic congestion is cities are monitored by computer controlled traffic switching system
which controls traffic flows. Computer aided input devices in a form of railcards or
tickets are used to operate automatic gates in underground railway lines. When a ticket
coated with magnetic stripes is slotted down wards into a device, the gate automatically
opens for you to enter while you take your ticket. The device will return your ticket if it is
valid for another journey; if not, it will keep the ticket and allow you to go. A passenger
with an invalid ticket is given a red message and there is no way he or she can enter
In the delivery of postal services, the computer is used to sort letters according to
post codes. In the field of aeronautics, computer simulations are used to train pilots while
199
air traffic movements are monitored by computer controlled radars. The scheduling of
on aircrafts and vehicles and also to detect engine faults and help in the maintenance of
3.6 Government
ethnic, setting such as Nigeria, a lot of complex and often conflicting variable interplay or
are taken into consideration before a broad-based decision can be taken. Computers can
(a) Planning
The availability of data, timely access to the data and timely reporting on the data are
very crucial to the above listed business of government. Computers can be used to:
(a) Keep accurate records of government assets and periodically estimates the market
(b) Keep accurate records of the population, behaviour patterns, consumption patterns
of utilities and estimates the distribution of basic needs such as electricity, water,
200
(c) Keep records of government revenue and expenditure and assist government in
(e) Computers can be used in the issuance of identity cards to the citizens.
(f) Compilation of a broad-based and accurate voters register. This will check the
incidence of ghost voting, multiple voting and other electoral malpractices which
has bedeviled the electoral processes and stable polity in the third world countries.
(g) Computers are used to keep track of crime in the society thereby helping the
(h) Computers can be used to build and to main the database of the mineral resources
One of the areas in which computer has been applied intensively and extensively is the
military. The first generation of the modern computers were designed and used during the
first and the second world wars. The use of computer for processing data became more
popular during these periods due to the need to procure, store and process large volume
of data. Over the years, the use of computer have transcend the traditional role of
201
“crunching numbers” to sophisticated applications. Specifically, computers are being
(a) Training the personnel through the use of simulated war situations.
(d) Monitoring and tracking of planes with a view to crash landing any un-authorised
(f) Launching of missiles from distant military base to the enemy territory. Such
missiles are programmed to ensure that only the desired targets are hit.
information.
(m) Monitoring the environmental and storage conditions of lether weapons in order
(n) Generation and maintenance of necessary data that would enhance planning,
202
3.8 Recreation, Amusement and Gaming
One of the major areas in which computer has affected the society positively is in the area
of recreation, amusement and gaming. “Work and no play make Jack a dull boy”. With
increasing civilization and urbanization, there is the need for people to relax and keep
their mind off the tension that is associated with daily activities, some of which are
tension soaked.
Computer games helps one to learn in the private (even in the comfort of your own room
or office), keeps you off the streets and arcades, reduces tension and boredom, engages
There are different kinds of games such as adventure games, business games, war games,
4.0 Conclusion
Computer as a universal machine is being applied to almost every area of human society.
5.0 Summary
In this unit, we have discussed in details the application of computers in the following
fields:
(a) Science and Engineering
(e) Recreation
203
(f) Government
Balogun, V.F., Daramola, O.A., Obe, O.O., Ojokoh, B.A., and Oluwadare S.A., (2006).
Tunji and Dokun (1993). Data Processing, Principles and Concepts. Informatics Books,
Lagos.
.
204
This module focuses on computer virus as a major threat to the smooth operations of the
computer.
Table of Contents
Computer virus
1.0 Introduction
One of the biggest fears of having computers are viruses, viruses are malicious programs
designed entirely for destruction and havoc. Viruses are created by people who either
2.0 Objectives
The objective of this unit is to introduce students to the concept of computer virus, its
Computer virus is one of the greatest threats to computers and computer applications.
Once the virus is made it will generally be distributed through shareware, pirated
software, e-mail or other various ways of transporting data, once the virus infects
someone's computer it will either start infecting other data, destroying data, overwriting
data, or corrupting software. The reason that these programs are called viruses is because
it is spreads like a human virus, once you have become infected either by downloading
205
something off of the Internet or sharing software any disks or write able media that you
placed into the computer will then be infected. When that disk is put into another
computer their computer is then infected, and then if that person puts files on the Internet
and hundreds of people download that file they are all infected and then the process
The majority of viruses are contract by floppy's by bringing information from one source
and then put onto your computer. VIRUSES can infect disks and when that disk is put
into your computer your computer will then become infected with that virus, a recent
survey done in 1997 by NCSA given to 80 percent of PC users showed that 90% of PC
In the survey done above it showed that the other 20% of viruses were contracted by
email attachments and over the Internet. This means that you received an email with an
attached file and opened the file. Or downloaded a file over the Internet.
VIRUS PROPERTIES
Your computer can be infected even if files are just copied. Because some viruses are
memory resident as soon as a diskette or program is loaded into memory the virus then
Can be Polymorphic. Some viruses have the capability of modifying their code which
206
Can be memory / Non memory resident. Depending on the virus can be memory
resident virus which first attaches itself into memory and then infects the computer. The
virus can also be Non memory resident which means a program must be ran in order to
Can be a stealth virus. Stealth viruses will first attach itself to files on the computer and
then attack the computer this causes the virus to spread more rapidly.
Viruses can carry other viruses and infect that system and also infect with the other
virus as well. Because viruses are generally written by different individuals and do not
infect the same locations of memory and or files this could mean multiple viruses can be
Can make the system never show outward signs. Some viruses will hide changes made
such as when infecting a file the file will stay the same size.
Can stay on the computer even if the computer is formatted. Viruses have the
capability of infecting different portions of the computer such as the CMOS battery or
master
Viruses can effect any files however usually attack .com, .exe, .sys, .bin, .pif or any data
files. Viruses have the capability of infecting any file however will generally infect
executable files or data files such as word or excel documents which are open frequently.
207
It can increase the files size, however this can be hidden. When infecting files virtues
will generally increase the size of the file however with more sophisticated viruses these
It can delete files as the file is ran. Because most files are loaded into memory and then
ran once the program is in memory the Virus can delete the file.
It can corrupt files randomly. Some destructive viruses are not designed to destroy
It can cause write protect errors when executing .exe files from a write protected
disk. Viruses may need to write themselves to files which are executed because of this if
It can convert .exe files to .com files. Viruses may use a separate file to run the program
and rename the original file to another extension so the exe is ran before the com.
It can reboot the computer when a files is ran. Various computers may be designed to
The following are possibilities you may experience when you are infected with a virus.
Remember that you also may be experiencing any of the following issues and not have a
virus.
Once the hard drive is infected any disk that is non-write protected disk that is accessed
can be infected.
208
Deleted files
Attempts to access the hard disk drive can result in error messages such as invalid drive
specification.
Directory order may be modified so files such as COM files will start at the beginning of
the directory.
Cause Hardware problems such as keyboard keys not working, printer issues, modem
issues etc.
209
Increase file size.
Cause computer to make strange noises, make music, clicking noises or beeps.
Display pictures
DETECTING VIRUSES
The most commonly used method of protecting against and detecting viruses is to
purchase a third party application designed to scan for all types of viruses. A list of these
Alternatively a user can look at various aspects of the computer and detect possible signs
indicating a virus is on the computer. While this method can be used to determine some
viruses it cannot clean or determine the exact virus you may or may not have.
4.0 Conclusion
210
Computer viruses are perhaps the greatest threats to the computer. If not detected and
promptly cured, computer virus attack could lead to the total breakdown of computer a
installation. With the aid of our discussion in this unit, students should be able to prevent,
5.0 Summary
(a) That computer viruses are programs written by programmers with the aim of
(b) Computer viruses could lead to malfunctioning and total breakdown of the
computer.
(c) Computer viruses are transferred from one computer to another through the
use of infested storage media such as diskette, flash drive, CDROM, or across
a computer network.
(d) There are antivirus packages specially written to prevent, detect and clean
viruses.
(b) What are the differences and similarities between biological viruses and
computer viruses?
(c) How would you prevent virus attack in the student’s computer laboratory.
211
Akinyokun, O.C, (1999). Principles and Practice of Computing Technology.
Balogun, V.F., Daramola, O.A., Obe, O.O., Ojokoh, B.A., and Oluwadare S.A., (2006).
Akure.
212
SOLUTIONS TO TUTOR MARKED ASSIGNMENTS
1. Outline the major landmarks of the fourth and the fifth generations of computers.
SOLUTION
b. Based on signal being processed, what category does each of these computing
equipment belong: petrol pump, thermometer, cell phone, anti-aircraft radar control in a
SOLUTION
a. Computers can be classified as analog or digital computers based on the type of
signal processed.
b. Based on the type of signal being processed the following equipment are
classified as follows:
213
Equipment Classification
Thermometer Analog
d. Justify the need for the input and the output units in a computer system.
e. Describe the functions of the following keys: the numeric keys, control keys, shift
SOLUTION
a. The computer is equipment that is used for data processing. In a process there has
to be an input and an output of the process. Hence, the need for input and output
214
denoted by ‘β’, one holds down the Alt key and press 255 and to produce pound sterling
denoted by ‘₤’, one holds down the Alt key and press 156.
The Control key is often used in most text mode to perform block operations like mass
deletion, insertion and so on. For example, CTRL + Y deletes a line in most text
documents. It can also be used in combination with other keys to move the cursor to
different locations in a text or document. In some application packages, the Alt, Ctrl and
Shift key are used in combination with the function keys to perform several operations.
For example, in Word Perfect word processing package, to centre a text; press Shift and
F6; to print a text, press Shift and F7.
When the Shift key is pressed, the capital letters on the alphanumeric keys are activated.
It also serves as the activator of characters that are at the upper part of each alphanumeric
key. The Shift key has no effects on itself; its effect are realized when some other keys
are pressed. Thus, if one presses the shift key and then ‘equal’ sign key, the ‘plus’ sign
which is at the upper part of the ‘equal’ sign is activated and then it appears on the
screen.
215
programmed to display menus. Thus, the operations of the function keys can be
determined by the user or programmed by the software package being used at any point
in time.
You have just been appointed as a consultant to a firm that is about to procure computing
would be necessary for the smooth operations of the firm. Justify the need for each item
recommended.
SOLUTION
(x) Word Processor: A Word Processor is used to create, edit, save and
print reports. Word processing package is necessary for the typing and
editing of the memos, letters and correspondence of the company as
well as other documents.
(xii) Graphic Packages: These are packages that enable you to bring out
images, diagrams and pictures. Examples are Corel Draw, Graphic
Writer, Photoshop.
216
collection of data that allows for modification taking care of different
users view). Examples are Dbase II, III, IV, FoxBASE, Rbase Data
Perfect, Paradox III, Revelation Advanced and MS-Access.
(xiv) Statistical Packages: These are packages that can be used to solve
statistical problems, e.g. Stat graphical, SPSS (Statistical Packages for
Social Scientists). Statistical packages will help to generate statistics
for decision making, planning and forecasting.
(xv) Desktop Publishing: These are packages that can be used to produce
books and documents in standard form. Examples are PageMaker,
Ventura, Publishers, Paints Brush, Xerox Form Base, News Master II,
Dbase Publisher.
SOLUTION
(i) (a) Program debugging
A program seldomly executes successfully the first time. It normally contains a few
errors (bugs). Debugging is the process of locating and correcting errors.
(b) Program testing
The purpose of testing is to determine whether a program consistently produces correct or
expected results. A program is normally tested by executing it with a given set of input
data (called test data), for which correct results are known.
For effective testing of a program, the testing procedure is broken into three segments.
• The program is tested with inputs that one would normally expect for an
execution of the program.
217
• Valid but slightly abnormal data is injected (used) to determine the capabilities of
the program to cope with exceptions. For example, minimum and maximum
values allowable for a sales-amount field may be provided as input to verify that
the program processed them correctly.
• Invalid data is inserted to test the program’s error-handling routines. If the result
of the testing is not adequate, then minor logic errors still abound in the program.
The programmer can use any of these three alternatives to locate the bugs.
b. List and discuss the functions of ten items in Visual Basic toolbox
SOLUTION
The toolbox is a collection of tools that act as a repository of controls you can place on a
form. The most common collection of toolbox tools that you can use in designing your
218
Selection pointer Picture box
Label Text box
Frame Button
Check box Command button
Option button
Combo box List box
Horizontal scrollbar Vertical scrollbar
Timer Drive list box
Directory list box File list box
Shape Line
Image Data
OLE
a. You have just been appointed as the principal of a model secondary school. Write
SOLUTION
219
e. Computer-aided laboratory experiments and investigations.
mentally/physically disable (the blinds, deaf etc), adults, KGs, teenagers etc.
Library Technology.
h. Teleconferencing technology.
m. Estimating the ratio of students to teachers and teachers to teaching facilities with
p. Aiding students to learn basic theoretical concepts. There are currently, some
computer aided learning software packages and hardware devices that are readily
220