Cit104-Introduction To Computers PDF
Cit104-Introduction To Computers PDF
Cit104-Introduction To Computers PDF
CIT104:
CIT104: INTRODUCTION TO COMPUTERS
COURSE GUIDE
Contents
Introduction
The Course
Course Aims
Course Objectives
Assessment
Tutor Marked Assignment
End of Semester Examination
Summary
INTRODUCTION
3
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.
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 twentyfirst century. This course, therefore, presents a systematic approach to the understanding
of computers and its applications.
COURSE AIMS
4
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:
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.
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.
COURSE OUTLINE
The course is made up of seven modules organized into 19 study units as follows:
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
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). Schaums 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
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?
10
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.
11
COURSE MANUAL
12
Basic concepts
Generations of computers
Classification of computers
3.0 Definitions
Computer: A computer is basically defined as a tool or machine used for processing
data to give required information. It is capable of:
a. taking input data through the keyboard (input unit)
b. storing the input data in a diskette, hard disk or other medium
c. processing it at the central processing unit (CPU) and
d. giving out the result (output) on the screen or the Visual Display Unit (VDU).
INPUT
PROCESSING
(DATA)
OUTPUT
(INFORMATION)
14
There is
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
volume of data continuously and timely.
Computer Method
The computer method of carrying out data processing has the following major
features:
a. Data can be steadily and continuously processed
b. The operations are practically not noisy
c. There is a store where data and instructions can be stored temporarily and
permanently.
d. Errors can be easily and neatly corrected.
e.
Output reports are usually very neat, decent and can be produced in various forms
such as adding graphs, diagrams, pictures etc.
f.
3.2
Characteristics 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.
= 1024 memory
4.
Automatic:
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.
3.3
The computing system is made up of the computer system, the user and the environment
in which the computer is operated.
The Computer System
The computer system is made up of the hardware and the software.
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.
Examples include the keyboard, mouse, joystick, trackball, scanner etc.
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
17
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
task or group of tasks. A program is made up of group of instructions to perform a task.
Series of programs linked together make up software. Computer programs could be
categorized into system software, utility software, and application programs.
Computer Users
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
computer engineers, computer programmers and computer operators.
The Computing Environment
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
Fig. 1.2a. to Fig. 1.2e
The Computing
System
Hardware
Software
Users
18
Computing
environment
Hardware
Input unit
Keyboard
Mouse
Processing unit
Scanner
Control
unit
ALU
Output unit
Main
memory
VDU
Printer
Software
System software
Operating
system
Utility software
Anti virus
Scandisk
Word
processor
19
Application software
Spread
sheet
Statistical
packages
Computer users
Expert users
System
engineers
End users
Programmers
Computer
operator
Casual users
Data entry
clerk
Computing environment
Building
Furniture
and fittings
Auxiliary devices
Air
conditioner
Voltage
stabilizer
UPS
4.0 Conclusion
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
the manual and mechanical methods of data processing.
5.0 Summary
In this unit we have learnt the following:
i.
Computer is any electronic device that can accept data, process it and produce
an output.
ii.
iii.
The computing system is made up of the computer system, the users and the
computing environment.
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
development of scientific computing is limited to the area of digital, electronic
computers.
The evolution of digital computing is often divided into generations. Each generation is
characterized by dramatic improvements over the previous generation in the technology
used to build computers, the internal organization of computer systems, and
programming languages. Although not usually associated with computer generations,
there has been a steady improvement in algorithms, including algorithms used in
computational science. The following history has been organized using these widely
recognized generations as mileposts.
3.1
Three machines have been promoted at various times as the first electronic computers.
These machines used electronic switches, in form of vacuum tubes, instead of
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
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
than mechanical switches.
23
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. Turnings 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.
The machine wasnt completed until 1945, but then it was used extensively for
calculations during the design of the hydrogen bomb.
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
24
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
worrying about matching it to the speed of an external control.
Regardless of who deserves the credit for the stored program idea, the EDVAC project is
significant as an example of the power of interdisciplinary projects that characterize
modern computational science. By recognizing that functions, in the form of a sequence
of instructions for a computer, can be encoded as numbers, the EDVAC group knew the
instructions could be stored in the computers memory a long with numerical data. The
notion of using numbers to represent functions was a key step used by Goedel in his
incompleteness theorem in 1937, work which Von Neumann, as a logician, was quite
familiar with.
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
corresponded to the instructions they wanted to store in memory.
By the 1950s
programmers were using a symbolic notation, known as assembly language, then hand25
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
Stevenson with 438 electoral votes (he ended up with 442).
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 MITs
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
26
an acoustic wave that passed sequentially through the medium and could be accessed
only when the data moved by the I/O interface.
During this second generation many high level programming languages were introduced,
including FORTRAN (1956), ALGOL (1958), and COBOL (1959).
Important
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
numeric processing in scientific applications. The term supercomputer is generally
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
primitive forms of parallel processing.
27
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
developed and core memory was replaced by faster, solid state memories. Computer
designers began to take advantage of parallelism by using multiple functional units,
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.
28
Early in this, third generation Cambridge and the University of London cooperated in the
development of CPL (Combined Programming Language, 1963). CPL was, according to
its authors, an attempt to capture only the important features of the complicated and
sophisticated ALGOL. However, the ALGOL, CPL was large with many features that
were hard to learn.
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.
29
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 wide use as alternatives to time-shared mainframe computers.
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
Thompsons 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
30
time they change computer hardware. UNIX or a derivative of UNIX is now a de facto
standard on virtually every computer system.
The Phase II centers, located in San Diego (San Diego supercomputing Centre); Illinois
(National
Center
for
Supercomputing
Applications);
Pittsburgh
(Pittsburgh
Supercomputing Center); Cornell (Cornell Theory Center); and Princeton (John Von
Neumann Center), have been extremely successful at providing computing time on
supercomputers to the academic community. In addition they have provided many
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
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 working on different parts of a single program.
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
8000 connected up to 20 processors to a single shared memory module (but each
processor had its own local cache).
DEC VAX-780 as a general purpose Unix system, with each processor working on a
different users 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 was widely used to explore parallel algorithms and programming techniques.
32
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
network interface to connect processors. This distributed memory architecture meant
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-1 from MasPar, Inc.
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
rapid pace, stimulating a transition from the traditional mainframe computing
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
RAM brought tremendous gains in computational power of relatively low cost
workstations and servers. This period also saw a marked increase in both the quality and
quantity of scientific visualization.
33
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
transition to a new generation, but other developments will prove to be significant
changes.
In this section, we offer some assessments about recent developments and current trends
that we think will have a significant impact on computational science.
This generation is beginning with many gains in parallel computing, both in the
hardware area and in improved understanding of how to develop algorithms to exploit
diverse, 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.
to procure a desktop workstation that has the same overall computing power (100
megaflops) as fourth generation supercomputers. This development has sparked an
interest in heterogeneous computing: a program started on one workstation can find idle
workstations elsewhere in the local network to run parallel subtasks.
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
strong base in universities and government laboratories as it is rapidly finding
application 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
chronicling the landmark achievements of the period.
5.0 Summary
In this unit we have learnt that the development of computer spanned through six
generations.
6.0 Tutor Marked Assignment
a. Outline the major landmarks of the fourth and the fifth generations of computers.
b. Explain what is meant by stored program computer architecture.
35
36
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
mainframe computers to the era of microcomputers. Computers have been classified
based on different criteria. In this unit, we shall classify computers based on three
popular methods.
2.0 Objectives
The objectives of this unit are to:
i. Classify computers based on size, type of signal and purpose.
ii. Study the features that differentiate one class of the computer from the others.
37
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
computers. As a result of this, digital computers are mostly used in commercial and
business places today.
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
38
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
have been obtained from an analog computer.
It is almost never used in business systems. It is used by the scientist and engineer to
solve systems of partial differential equations.
2.
Hybrid Computer
In some cases, the user may wish to obtain the output from an analog computer as
processed by a digital computer or vice versa. To achieve this, he set up a hybrid
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.
It has the advantage of giving real-time response on a continuous basis. Complex
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
process control applications.
39
Payroll
Banking
Billing
Sales analysis
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.
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
price as the standard for ranking computers.
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
(c)Large Computer/Main Frames.
Micro Computers
Microcomputers, also known as single board computers, are the cheapest class of
computers. In the microcomputer, we do not have a Central Processing Unit (CPU) as
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.
42
be carried about like a box when closed after operation and can be operated in vehicles
while on a journey.
Notebook Computer
This is like laptop computers but smaller in size. Though small, it comprises all the
components of a full system.
Palmtop Computer
Palmtop computer is far smaller in size. All the components are complete as any of the
above but made smaller so that it can be held on the palm.
Uses of Personal Computers
Personal computers can perform the following functions:
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.
43
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.
air-condition or fan in some locations.
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.
Other Mini Computer includes WANG VS.
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
people for a variety of purpose.
44
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
In this unit we have been able to understand the following:
i.
ii.
iii.
iv.
v.
Micro computers now come in different forms due to the continued reduction
in size due to advances in electronic technology. Microcomputers could be
desktop, laptop or palmtop.
45
Akure.
Larry Long (1984). Introduction to Computers and Information Processing. PrenticeHall Inc., New Jersey.
Gray S. Popkin and Arthur H. Pike (1981). (1981). Introduction to Data Processing with
BASIC, 2nd edition, Houghton Mifflin Company, Boston.
46
Hardware components (the front, back and inside of the system unit)
Mother board
Memory chips
Types of memory
Primary memory
Read only memory (ROM)
Random access memory (RAM)
Secondary memory
Hard Disk
Tertiary memory
Floppy disk (diskette)
CDROM
47
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
tasks you can accomplish with your machine.
1.0 The Objectives
The objectives of this unit are to:
i.
ii.
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
(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
the system unit with the CPU.
48
Key Lock
You can stop intruders tampering with your PC by using the Lock on the front panel.
Turning the key prevents the key board from working.
Turbo Button
Some PCs offer a choice of speeds at which they can run. A turbo switch is usually left
so the computer runs at its fastest speed.
Reset Button
If your PC freezes and wont 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
session, so use it only as a last resort.
Power On/Off
All PCs have main power switch on the system unit. Sometimes this control is placed
on the outside back panel.
Floppy Disk Drives
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.
49
50
Sound Jacks
If you have a sound fitted inside your system unit, you will see a jack or jacks at the
back. These can be used to connect your PC to speakers, a microphone, or an eternal
sound 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
network connector at the back of the system unit.
Monitor Port
A cable from your monitor plugs into this port and carries display information to the
monitor.
Bays for Expansion Cards
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
back of your machine, allowing you to connect items.
3.3 Inside the system unit
51
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
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.
Disk Drive Controller Card
This card controls the PCs disk drive motors and transfers data. The serial and
parallel ports at the back of the card link internal PC components with external
devices such as mouse and printer.
Display Adapter Card (Video Card)
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
PCs memory and the monitor.
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,
even when you switch the PC off.
52
RAM Chips
When a computer is switched on and running a program, RAM (Random Access
Memory) is used for purposes such as holding the program and its data. But when
the PC is switched off, anything held in RAM is lost.
Empty RAM Chip Slots
These slots let you expand your computers memory by adding extra RAM chips or
modules. Some PCs 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 work on your computer enormously.
RAM chip
Central Processing Unit (CPU)
Intel Processor
53
CPU fan
Speaker
The speaker emits the computers sound output.
Power Supply Unit
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
54
normal household current, they would blow up, so the power supply unit converts high
voltage electrical current to a low voltage.
Hard Disk Drive
The hard disk is your computers 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
overwrite it or the hard disk is damaged.
55
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.
powerful CPUs the 80386, the 80486, and the more recent and impressive of all, the
Intel Pentium (I, II, III, IV& M).
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, the latest Pentiums runs over ten times faster.
56
What is CPU
The CPU is certainly the most important PC component. CPU stands for
Central Processing Unit. Let us briefly study that name:
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
faster the clock ticks, the faster the computer runs.
Without the CPU, there would be no PC. Like all other hardware components,
the CPUs are continually undergoing further development. You can see the
explosive technological development in data processing most clearly in 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.
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.
57
The CPUs have their roots back to Intel's chip 4004 from 1971.
The compatibility concept has been important throughout the
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
PC
CPUs
Year
1st. Generation
1978-81 29,000
2nd. Generation
80286
1984
3rd. Generation
1987-88 275,000
4th. Generation
80486SX, 80486DX,
80486DX2 and 80486DX4
1990-92 1,200,000
5th. Generation
Pentium
Cyrix 6X86
AMD K5
IDT WinChip C6
1993-95
1996
1996
1997
3,100,000
--3,500,000
Improved
5th. Generation
Pentium MMX
IBM/Cyrix 6x86MX
IDT WinChip2 3D
1997
1997
1998
4,500,000
6,000,000
6,000,000
6th. Generation
Pentium Pro
AMD K6
Pentium II
AMD K6-2
1995
1997
1997
1998
5,500,000
8,800,000
7,500,000
9,300,000
Improved 6th.
Mobile Pentium II
1999
27,400,000
58
Number
of transistors
134,000
Generation
Mobile Celeron
Pentium III
AMD K6-3
Pentium III CuMine
7th. Generation
18,900,000
9,300,000
?
28,000,000
1999
2000
2001
22,000,000
37,000,000
42,000,000
Intel Processor
DISKS
Floppy Disks
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
59
labeled DS/DD, which stands for double sided/double density, while the high-capacity
floppy disks are labeled DS/HD (double sided/high-density).
60
61
STUDY UNIT 5
HARDWARE COMPONENT (2) PERIPHERAL DEVICES
Table of contents
Input devices
Computer keyboard
Mouse and joystick
Digital or graphic tablet
Optical character reader (OCR)
Magnetic Ink Character Reader (MICR)
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
The objectives of this unit are to:
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
particular computing environment.
3.0
Input Devices
The intelligent computer keyboard has four major divisions, namely: Function keys,
Alphanumeric keys, Numeric keys and Control keys.
In addition to the four types of keys, there are some special or important keys such as the
following:
(a)
(b)
(c)
(d)
(e)
(f)
(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.
programmed to display menus.
63
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.
FUNCTIONS
Moves the cursor one line up.
Moves the cursor one line down
Moves the cursor one character to the right
HOME
END
PGDN
PGUP
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
64
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.
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.
Alternate Key (Alt)
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.
65
NumLock Key
The Numlock key activates the numeric keypad. Neither NumLock nor CapLock affects
the function keys.
Control Key (Ctrl)
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.
Escape Key (Esc)
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.
Return or Enter Key
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.
Insert Key (Ins)
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.
66
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.
Print Screen Key (Prtsc)
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.
Keeping Your Keyboard Clean and Working
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
around your computer, you should at least get a spill-proof mug or keep the coffee on the
other side of the desk.
67
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
before touching the PC.
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 when not in use.
Some dirt and dust is unavoidable. To keep the keyboard working well, you should
occasionally clean it.
3.2
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.
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.
68
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
effectively control the actions of computer-simulated airplanes or arcade-style games.
All modern PC operating systems (Windows 98, Windows XP, and the Macintosh) rely
on an on-screen pointer to select and execute commands. A mouse is simply an input
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.
69
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
transfer high-quality characters or images onto a page.
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 a lower cost.Dot-matrix printers.
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
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
than the 9-pin printers.
Print quality for dot-matrix printers is often described in terms of mode: draft mode (low
resolution), near-letter-quality mode (medium resolution), or letter-quality mode (high
resolution). The speed depends on the mode, with draft mode being the fastest.
70
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 dotmatrix printer. In general, dot-matrix printers are noisier, slower, and produce a poorerquality 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 highquality 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
information that the video card tells it to.
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.
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
are capable of displaying at least SVGA quality. In fact, 1,024x768 is somewhat of a
minimum to look for.
71
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
one resolution to another on command from the video card.
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
picture element (pixel). After the scanner collects information from each dot, it compiles
the result into a digital file on the computer.
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
popular types of scanners available today.
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.
72
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
directly from a book or other three-dimensional object is impossible.
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,
just as you do your PC's mouse
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 fourinch 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.
73
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.
Sound is one of the favorite options on today's PCs. In fact, sound is a standard feature of
most new PCs.
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
roaring as you punch the throttle in a flight simulator.
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
74
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
the volume of the speakers and/or headphones.
4.0 Conclusion
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
In this unit we have learnt the following:
i.
ii.
75
c. In what situation will you recommend the laserjet printer and the dot matrix
printer.
7.0 References and 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.
Larry Long (1984). Introduction to Computers and Information Processing. PrenticeHall Inc., New Jersey.
Gray S. Popkin and Arthur H. Pike (1981). (1981). Introduction to Data Processing with
BASIC, 2nd edition, Houghton Mifflin Company, Boston.
76
1.0 Introduction
The auxiliary equipment as their name suggests are not computers but are necessary in a
computing environment in order to ensure proper functioning and smooth running of
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
line transformer in a data processing environment.
2.0 Objectives.
The objectives of this unit are to:
i.
ii.
77
The free air is basically, dust laden. Dust is metallic in nature and, as such, capable of
conducting electricity.
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 a computer environment to:
a.
b.
Prevent dust.
78
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 automatically steps down the 240V current to 110V.
3.4 Uninterruptible Power Supply System (UPS)
An Un-interruptible Power System (UPS) is an auxiliary hardware that is capable of:
(a)
Converting the public electricity raw line into fine line, that is, conditioning
the voltage that is fed into the computer.
(b)
(c)
Releasing the stored electrical energy to the computer when the public
electricity line is dead.
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
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 configuration presented in Figure
This
5.0 Summary
In this unit we have learn the following:
i.
ii.
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
shut down normally.
iv.
80
System software
Language translators
Utility software
Application 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.
81
2.0 Objectives
The objective of this unit are to:
i.
ii.
82
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 programmers and other computer users. Systems programming is different
from application programming because the requires an intimate knowledge of the
computer 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 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 programs can do useful work.
83
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,
memory space, file storage space, input/output devices etc.
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
programs to prevent errors and improper use of the computer.
Operating systems exist because they are a reasonable way to solve the problem of
creating a usable computing system. The fundamental goal of a computer system is to
execute user programs and solve user problems.
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 system for small personal computers.
84
Specifically, we can imagine that an effective operating system should accomplish all of
the following:
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,
Provide for long term storage of user information in the form of files, and
85
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.
86
interaction with the program during its execution, and the computers response time may
be expected to be no more than a few second.
In fact, many computer operating systems are hybrids, providing for more than one of
these types of computing service simultaneously. It is especially common to have a
background batch system running in conjunction with one of the other two on the same
computer.
A multiprogramming operating system is a system that allows more than one active user
program (or part of user program) to be stored in main memory simultaneously.
87
program simultaneously in main storage. Another important, and all too similar, term is
multiprocessing.
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).
88
True distributed operating systems require more than just adding a little code to a
uniprocessor operating system, because distributed and centralized systems differ in
critical ways. Distributed systems, for example, often allow program to run on several
processors at the same time, thus requiring more complex processor scheduling
algorithms in order to optimize the amount of parallelism achieved.
89
Process Management
A process is the unit of work in a system. Such a system consists of a collection of
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 potentially execute concurrently.
The operating system is responsible for the following activities in connection with
processes managed.
Memory Management
Memory is central to the operation of a modern computer system. Memory is a large
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.
from memory by generating these absolute is declared available, and the next program
may be loaded and executed.
The operating system is responsible for the following activities in connection with
memory management.
Keep track of which parts of memory are currently being used and by
whom.
The operating system is responsible for the following activities in connection with disk
management
Storage allocation
91
Disk scheduling.
I/O System
One of the purposes of an operating system is to hide the peculiarities of specific
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.
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, by the operating system, onto physical devices.
formatted. In general a files is a sequence of bits, bytes, lines or records whose meaning
is defined by its creator and user. It is a very general concept.
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 others
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.
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 its own I/O, to protect the
integrity of the various peripheral devices.
93
Protection can improve reliability by detecting latent errors at the interfaces between
component subsystems. Early detection of interface errors can often prevent
contamination of a healthy subsystem by a subsystem that is malfunctioning. An
unprotected resource cannot defend against use (or misuse) by an unauthorized or
incompetent user.
Networking
A distributed system is a collection of processors that do not share memory or a clock.
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,
workstations, minicomputers, and large general purpose computer systems.
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
connected. The communication network design must consider routing and connection
strategies, and the problems of connection and security.
A distributed system provides the user with access to the various resources the system
maintains. Access to a shared resource allows computation speed-up, data availability,
and reliability.
94
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,
and execute it.
The command statement themselves deal with process management, I/O handling,
secondary storage management, main memory management, file system access,
protection, and networking.
Fig. 1: Relationship between operating system and other components of the computer
system.
4.0 Conclusion
Operating system occupies a central place in computer operations. It manages the
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
95
types of operating systems. This and other issues relating to operating system are
discussed in this unit.
5.0 Summary
In this unit we have learnt the following:
i.
ii.
iii.
96
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.
2.0 Objectives
The objectives of this unit are to:
i.
ii.
machine language. There is therefore the need to translate programs written in these
other languages to machine language.
languages to machine language are called Language Translator. The initial program
written in a language different from machine language is called the source program and
its equivalent in machine language is called object program.
Three examples of classes of language translators are Assemblers, Interpreters and
Compilers.
1.
program or object code. Each machine has its own assembly language,
meaning that the assembly language of one machine cannot run on another
machine.
2.
3.
Compilers:
program in one high-level language, reads and translates the entire users
program into 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.
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.
98
(iii)
They are not involved in solving the problem at hand. They are operations that must
be performed before and after actual processing.
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)
(ii)
(iv)
Graphic Packages: These are packages that enable you to bring out
images, diagrams and pictures. Examples are PM, PM Plus, Graphic
Writer, Photoshop.
(v)
(A database is an organized
(vii)
(viii) Game Packages: These are packages that contain a lot of games for
children and adults. Examples are Chess, Scrabble, Monopoly, Tune
100
Trivia, Star Trek 2, California Game, Soccer Game, War Game, Spy
Catcher Dracula in London.
(ix)
There are so many packages around, virtually for every field of study but these are just to
mention a few of them.
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
In unit, we have discussed the following:
i.
101
ii.
Utility programs such as file conversion, file copy programs and house
keeping programs such as scandisk
iii.
102
Flowcharts
Algorithms
(b)
(c)
2.0 Objective
The objective of this unit is to introduce the student to the background information about
programming the Computer.
These intermediate
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.
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.
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.
Since
arithmetic operations involve at least two numbers, an arithmetic operation must include
at least two operands.
104
Branch instructions cause the computer to alter the sequence of execution of instruction
within the program.
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
3.1
The effective utilization and control of a computer system is primarily through the
software of the system. We note that there are different types of software that can be
used to direct the computer system. System software directs the internal operations of
the computer and applications software allows the programmer to use the computer to
solve user made problems. The development of programming techniques has become as
important to the advancement of computer science as the developments in hardware
technology.
Machine language
(b)
Assembly language
(c)
(d)
105
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 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).
106
to establish the actual locations for each piece of data used by the program. The most
popular assembly language is the IBM Assembly Language.
Because the computer understands and executes only machine language programs, the
assembly language program must be translated into a machine language.
This is
Low Level
Language
Program
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
Program
Compiler
Machine Language
Operating System
Program
Store
The general procedure for the compilation of a computer program coded in any high
level language is conceptualized in the above diagram.
Main Memory
Source code in
High Level Language
Specific
Compiler
Object
Code
Machine
Code
Link
Loader
Library Subroutines
Subroutines
(b)
(c)
(d)
Debuggers that are programs that help computer user to locate errors (bugs)
in the application programs they write.
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.
109
4GL
Program
4GL Translator
Machine Language
Program
``
High Level
Language Program
Compiler
Operating
System
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 computers electrical circuits.
(b)
(c)
High level languages are usable on different machines and are designed for
similar applications rather than similar hardware. They are procedural in that
110
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.
111
1.0
Introduction
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.
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.
Accuracy: The Program must do what it is supposed to do correctly and must meet the
criteria laid down in its specification.
Reliability: The Program must always do what it is supposed to do, and never crash.
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
The Code of a program must be well laid out and explained with
comments.
Problem Definition
(ii)
(iii)
Developing the method using suitable aids, e.g. pseudo code or flowchart.
(iv)
(v)
(vi)
(vii)
(viii)
(i)
Problem definition
The first stage requires a good understand of the problem. The programmer (i.e. the
person writing the program) needs to thoroughly understand what is required of a
problem. A complete and precise unambiguous statement of the problem to be
solved must be stated. This will entail the detailed specification which lays down the
input, processes and output-required.
113
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)
(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
performed after the program has been coded and entered or key punched. Its
114
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.
The program is tested with inputs that one would normally expect for
an execution of the program.
(b)
(c)
115
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:
(b)
Program narrative
(c)
(d)
Users 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.
116
(e)
(ii)
Message that may be printed on the console or VDU (terminal) and their
meanings.
(iii)
It provides all necessary information for anyone who comes in contact with
the program.
(ii)
It helps the supervisor in determining the programs purpose, how long the
program will be useful and future revision that may be necessary.
(iii)
(iv)
(v)
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.
ii.
iii.
ii.
What are the differences between syntax errors and logic errors. Give
examples of each.
iii.
118
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
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
Flowcharts are drawn with the help of symbols. The following are the most commonly
used flowchart symbols and their functions:
119
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
Used for Input and Output instructions,
PRINT, READ, INPUT AND WRITE.
Used for decision making. Has two or
more lines leaving the box. These lines are
labeled with different decision results, that
is, Yes, No, TRUE or FALSE or
NEGATIVE or ZERO.
Used for one or more named operations or
program steps specified in a subroutine or
another set of flowchart.
Used for entry to or exit from another part
of flowchart. A small circle identifies a
junction point of the program
3.2
(ii)
(iii)
(iv)
3.3
The digital computer does not do any thinking and cannot make unplanned decisions.
Every step of the problem has to be taken care of by the program. A problem which can
be solved by a digital computer need not be described by an exact mathematical
equation, but it does need a certain set of rules that the computer can follow. If a
problem needs intuition or guessing, or is so badly defined that it is hard to put into
words, the computer cannot solve it. You have to define the problem and set it up for the
computer in such a way that every possible alternative is taken care of. A typical
flowchart consists of special boxes, in which are written the activities or operations for
the solution of the problem. The boxes linked by means of arrows which show the
sequence of operations. The flowchart acts as an aid to the Programmer who follows the
flowchart design to write his programs.
3.4
Algorithms
Before a computer can be put to any meaningful use, the user must be able to come out
with or define a unit sequence of operations or activities (logically ordered) which gives
an unambiguous method of solving a problem or finding out that no solution exists.
Such a set of operations is known as an ALGORITHM.
Definition: An algorithm, named after the ninth century scholar Abu Jafar Muhammad
Ibn Musu Al-Khowarizmi , is defined as follows: Roughly speaking:
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.
121
981
1234
3924
2943
1962
981
1210554
b.
Multiply the multiplicand one after another by each digit of the multiplier taken from
left to right.
981
1234
981
1962
2943
3924
1210554
(ii)
(iii)
(iv)
The sequence terminates with either a solution or a statement that the problem
is unresolved.
Write an algorithm to read values for three variables. U, V, and W and find a
value for RESULT from the formula: RESULT = U + V2/W. Draw the flowchart.
Solution:
Algorithm
(i)
(ii)
(iii)
(iv)
Stop
Flowchart
START
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
Set up a Counter (1) which counts the number of times the loop is executed.
Initialize Counter (1) to 1.
(ii)
(iii)
(iv)
(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)
(vii)
(viii) Stop.
Flowchart
START
1, SUM
INPUT 1
SUM
SUM + 1
1 + 1
IS
1 < = 20
NO
AVE
SUM/
PRINT AVE
STOP
124
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).
(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)
Flowchart
START
NO
IS
CODE = 2
YES
125
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)
(ii)
(iii)
(iv)
(v)
(vi)
Make a decision (Check how many times you have calculated the wages)
(vii)
1,
WAGES
HRS X RATE
PRINT NAME
WAGES
YES
A + 1
IS
A < = 10
NO
STOP
126
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 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.
127
(a)
(b)
(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).
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.
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.
128
iv.
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.
Gray S. Popkin and Arthur H. Pike (1981). (1981). Introduction to Data Processing with
BASIC, 2nd edition, Houghton Mifflin Company, Boston.
129
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
The objective of this unit is to introduce students to:
i.
The concept of working with graphical objects and the general Visual Basic
Programming concepts.
130
ii.
iii.
A single
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
you see looks like that in Figure 1.
Figure 1
131
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
process multiple windows. See figure 2.
Figure 2
Figure 3
132
You can select the options you want your applications 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
that the use can select the option by pressing Alt+N.
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
the option of adding one of these standard screens to your application:
Splash screen is an opening title screen that appears when your application first
begins.
133
Login dialog is a dialog box that asks for the users ID and password as a part of
application security that you can add.
Options dialog is tabbed blank dialog box from which your users can specify
attributes that you set up for the application.
About box is a dialog box that appears when your users select Help, About from
the application menu.
You can also select a form template from here. A form template is model of a form that
you can customize.
Click Next to get to the last screen and click the Button labeled Finish to instruct Visual
Basic to complete your initial application.
Debug. This toolbar appears when you use the interactive debugging tools to
trace and correct problems.
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.
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
common collection of toolbox tools that youll see.
134
Selection pointer
Picture box
Label
Frame Button
Check box
Text box
Combo box
List box
Horizontal scrollbar
Timer
Directory list box
Shape
Image
Command button
Option button
Vertical scrollbar
Drive list box
File list box
Line
Data
OLE
Figure 5
The Form Window
Most of your work goes on inside the Form window.
applications 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 you create in your application as large or small as needed.
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
clicking anywhere within the window or on the title bar.
The Form Layout Window
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 windows
location.
135
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
In this unit, we have learnt the following:
(a) The concept of working with graphical objects and the general Visual Basic
Programming concepts.
(b) How to design a project from the application wizard and,
(c) How to use the toolbox.
b.
List and discuss the functions of ten items in Visual Basic toolbox
136
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
the view option and then Properties window.
2.0 Objectives
The objective is to enable user gain more mastery of the Visual Basic programming
environment.
3.0 The project Window
The Project Window helps you to manage your applications 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
the current projects forms will appear.
The following kinds of objects can appear in the Project window:
Projects
Forms
Modules
Class modules
User controls
137
User documents
Property pages
138
Figure 6
Example 1
Create an application with three controls, a label, a command button and an image
control to look like what you have in Figure 7.
139
Figure 7
Guide to the solution
To place a control on a form, click on the controls icon on the toolbox and move the
crosshair mouse cursor to the form. As you drag the mouse, Visual Basic draws the
controls 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 applications forms and controls:
Control
Property
Property value
Form
Max Button
False
Label
Alignment
Center
Label
Name
LblHappy
Label
Caption
Label
Font
Courier New
Label
Font style
Bold
140
Label
Size
36
Label
Left
1320
Label
Height
1695
Label
Top
120
Label
Width
4695
Image
Name
imgHappy
Image
Stretch
True
Command button
Name
cmdHappy
Command button
Caption
Click Here
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.
somewhere on the grid inside the Form window to display the code window. Add the
codes shown in Figure 8.
To return to the Form window, click the Project windows View Object button.
141
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
the project to the Source Safe library.
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.
142
Figure 9
Property Value
frmPassword
Try a password
5610
8475
imgPassword
1-Fixed Single
1890
3000
True
2640
2295
lblPrompt
1-Fixed Single
Type the secret password below
MS Sans Serif
14
Bold
855
2520
600
3375
txtPassword
143
375
3360
*
(Leave blank by clearing the default
value)
1600
1695
cmdTest
&Test Password
6360
3000
cmdExit
E&xit
6360
3720
Add the following code seen on the screen in Figure 10 to activate the passwordbased form:
Figure 10
144
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 Basic programming environment that are of immense importance to the
programmer.
5.0 Summary
In this unit we have studied the importance of the project window and the property
window.
6.0 Tutor Marked Assignment
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, supply the default text Type here. In addition to the text boxes, include an Exit
command button, so the user can press Alt+X to terminate program.
145
146
147
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
Checked
option
Submenu
Figure 2
Figure 2 displays the menu bar and its parts.
148
Example 1
Create an application with three menu options and a label. Your screen should look like
what you have in Figure 3.
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 box in the bottom half of the Menu Editor.
Press Tab to move to the Name field. Tab and Shift+Tab shift the focus between
the Menu Editor fields.
Type mnuFile for the name of the first menu option.
149
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
through with the first option and want to enter another.
Type &Color for the next menu bar caption and type mnuColor for the name.
Click Next to add the next item.
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.
3.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 youve done in this exercise, youll
have to insert the menu options in their respective locations when you are ready to add
them. The Menu Editors Insert button lets you do just that.
150
Example 2
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
include a separator bar as shown.
Figure 17
151
Figure 3
Follow these steps to do these:
Open the Menu Editor
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
for the Color menu options.
Highlight the first blank row where youll 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
not currently selected.
Click Next to enter the next option.
152
Type &Green for the caption and mnuColorGreen in the Name field of the next
option.
Click Next to enter 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.
Close the Menu Editor and run your application.
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
receive the next option.
Follow the steps as for the Color menu.
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
mnuMessageSep1 as the separator bars name.
Fix the other options appropriately and run the application.
To finalize the menu with code:
Open the code window and type the code shown in Figures 19 and 20. The code controls
the labels colour and contents.
153
Figure 4
Figure 5
154
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.
Figure 4
Figure 5
155
4.0 Conclusion
Menus make programs interactive and enable programs to be written in modules.
5.0 Summary
In this unit we have learnt how to create a menu application.
6.0 Tutor Marked Assignment
Enumerate the steps involved in creating a menu application.
7.0 References and 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.
Francis Scheid (1983). Schaums Outline Series: Computers and Programming.
Mcgraw-Hill Book Company, Singapore.
156
General-purpose procedures
Event procedures
Figure 1 shows the declarations sections in the first set of codes. After the first wrapper
line, there is an event procedure followed by another one. General-purpose procedures
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
form, or any other event.
157
Figure 1
Figure 2
158
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
a beginning VB Programmer needs to know. The output of the program is displayed in
Figure 5. As it can be seen, key words are in blue, comments are in green while the
other codes are in black.
Figure 3
159
Figure 4
Figure 5
Solving the same problem using SELECT CASE statement, we have the codes displayed
in Figure 6.
160
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 workers data
can be entered (to look like the one displayed in Figure 7)
161
Figure 7
162
Figure 8
Figures 9 and 10 display the code.
163
Figure 31
4.0 Conclusion
The code window is very important to visual basic programming. Ability to write good
programs depends to a large extent on its mastery.
5.0 Summary
In this unit we have learnt how to program in the code window.:
6.0 Tutor Marked Assignment
Using the code window, write a program to display the current time.
7.0 References and 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.
Francis Scheid (1983). Schaums Outline Series: Computers and Programming.
Mcgraw-Hill Book Company, Singapore.
164
Education
Health Care
Recreation
Government
165
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
records on admissions, examinations, staffing and other routine functions.
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 authors name, book title, subject and classmark. Readers using
public terminals can go through a menu-driven programme to find specific books or
periodicals, recall books on loans and also make requisition for short loan items.
166
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
security system is used to maintain security services in libraries as well. In educational
institutions such as nursery schools, primary schools, secondary schools, polytechnics,
colleges of education and universities, computer can be used for the following:
Computer-aided
software
packages
for
special
students
e.g.
the
mentally/physically disable (the blinds, deaf etc), adults, KGs, teenagers etc.
Teleconferencing technology.
Estimating the ratio of students to teachers and teachers to teaching facilities with
a view to assessing the adequacy of teaching and learning.
167
Aiding students to learn basic theoretical concepts. There are currently, some
computer aided learning software packages and hardware devices that are readily
available in the market.
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
computers in education are discussed in details.
5.0 Summary
In this unit we have learnt that computer could, among others, be applied in the
following fields of human endeavour:
Education
Health Care
Recreation
Government
The Military
168
169
Payroll.
(ii)
Inventory Control.
(iii)
Auditing Operations.
(iv)
(v)
(vi)
(vii)
(viii)
(ix)
(x)
Publishing Industry.
(i)
Payroll
Payroll preparation is essentially a repetitive and a routine task which has to be done
periodically for every single employee in an organization at particular points in time
either weekly, fortnightly or monthly. Payroll preparation is a work schedule which
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 capability of the computer to:
(a)
(b)
(c)
Handled repetitive recurring tasks and check on its own work as a way of
controlling human errors.
(d)
Provide a much better and reliable procedure for the necessary security checks to
monitor and detect fraud and other malpractices.
171
(a)
(b)
Computing wages and salaries for each individual workers based on regular and
overtime hours worked.
(c)
Making deductions for income tax and for other payments such as union dues and
repayment of loans.
(d)
(e)
Updating the master payroll file based on the records received from the personnel
department.
(f)
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 accounts, preparation of dividends and summary accounts for shareholders
and management.
(ii)
Inventory Control
An equally important business application of the computer is seen in the execution of the
important business function involved in maintaining a desirable level of inventory in a
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
172
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
quantity analysis and other forecasting techniques.
(iii)
Auditing Operations
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,
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
using various computer audit packages.
(iv)
173
(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.
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 analysis and so on.
(v)
174
(vi)
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
accuracy and speed in which the computer has proved very effective and efficient. With
the aid of the computer, accurate and up-to-date customers 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.
(vii)
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.
(viii) Point of Sale Services
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.
175
(ix)
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 decisions and also to guide them to manage their portfolios effectively.
Furthermore, the computer is used to calculate the foreign exchange rates of
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 which further provides a barometer of the standard of living in a country.
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
customers to have access to funds twenty-four hours a day at an unattended automatic
teller machines. Customers also use their credit cards to open doors to some banking
houses to transact business. There are other Electronic Funds Transfer terminals to
176
perform automatic financial transactions at check out counters in hotels, stores, airlines,
railways and other terminals.
In the banking industry, computer can also be used to:
(a)
(b)
Monitor, control and evaluate the transactions of the customers and clients on
their accounts.
(c)
(d)
Monitor, control and evaluate the bank or insurance companys revenue and
expenditure.
(e)
(x)
Publishing industry
Creative writing
(b)
Typesetting manuscript
(c)
Drawing illustrations.
(d)
(e)
Generating the page size of a book and cut and paste illustrations automatically.
(f)
(g)
(h)
Assisting the writer of an article to identify the words that have similar meaning.
177
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
wealth-creating assets. Information technology transforms the way that business is
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
business and industry.
5.0 Summary
In this unit, the following areas of application of computer technology in business will be
were discussed in details:
(a) Payroll.
(b) Inventory Control.
(c) Auditing Operations.
(d) Personnel Record Keeping.
(e) Preparation of Customer Utility Bills and Payment Orders.
(f) Management Information System.
(g) High Quality Production Controls.
(h) Point of Sale Service.
(i) Financial Market Transactions.
(j) Publishing Industry.
178
Tunji and Dokun (1993). Data Processing, Principles and Concepts. Informatics Books,
Lagos.
179
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
180
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
implementation of projects. Such critical path study is used successfully on various
projects, for example, the construction of roads, bridges, buildings, manufacturing, the
conduct of election and sales campaigns.
181
(i)
Research Institutions
(a)
(b)
(c)
(d)
(e)
(f)
(g)
(ii)
(a)
Designing and drawing with very high precision, accuracy and at minimum cost.
(b)
(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
serious financial commitments.
(d)
3.1
Marketing Department
(a)
(b)
(c)
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
over a number of years.
(b)
Keep records, of poultry and animal husbandry farm with a view to estimating
the feed mix, environmental condition desirable for optimal yield.
(c)
3.3
(a)
(b)
(c)
(d)
(e)
Statistical analysis of criminal and civil cases in the law court and estimating the
rate of growth.
(f)
(g)
(h)
Identifying the causes of crime and assisting with the provision of preventive and
curative measures.
3.4
Health Care
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
183
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
scientific preparation and administration of drugs, x-ray techniques, blood bank
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
keeping records of hospital admission and discharges, administration of drugs and
prescriptions and other hospital administrative functions. Furthermore, the computer is
used to provide a data bank of medical history to meet the data needs of health insurance
schemes and vital health care statistical reports.
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
patients, staff, drugs and equipment.
(b)
Monitoring the temperature, blood pressure, heart beat and a host of other
parameters of patients and raising an alarm when abnormal situation is about to
occur.
(c)
(d)
184
(e)
3.5
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 through the gate.
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
air traffic movements are monitored by computer controlled radars. The scheduling of
trains, subways, and by real-time sophisticated computer systems. Another important
computer application is the introduction of computer devices to improve personal safety
on aircrafts and vehicles and also to detect engine faults and help in the maintenance of
aircrafts and vehicles.
3.6
Government
The business of governance is a serious business. In a multi-cultural, multilingual, multiethnic, 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 assist government business in the following ways:
(a)
Planning
(b)
Decision marking
(c)
Policy formulating
(d)
186
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
value and insurance value.
(b)
(c)
(d)
(ii)
(iii)
(e)
(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
government security agencies to check crime in the society.
(h)
Computers can be used to build and to main the database of the mineral resources
and other resources of the nation.
187
3.7
The Military
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
crunching numbers to sophisticated applications. Specifically, computers are being
used in the following ways, in the military operations:
(a)
(b)
Reconnaissance surveys.
(c)
(d)
Monitoring and tracking of planes with a view to crash landing any un-authorised
plane flying in the nations airspace.
(e)
(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.
(g)
(h)
(i)
(j)
(k)
(l)
188
(m)
(n)
3.8
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
the mind on constructive things and teaches you new skills.
There are different kinds of games such as adventure games, business games, war games,
traditional games, and simulation games.
4.0
Conclusion
Computer as a universal machine is being applied to almost every area of human society.
The discussions in this unit clearly demonstrate this fact.
5.0
Summary
In this unit, we have discussed in details the application of computers in the following
fields:
(a) Science and Engineering
(b) Health Care
189
190
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
know a lot about programming or know a lot about computers.
2.0 Objectives
The objective of this unit is to introduce students to the concept of computer virus, its
mode of transmission, detection, prevention and cure.
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
continues infecting thousands if not millions of people.
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
attaches itself into memory.
Can be Polymorphic. Some viruses have the capability of modifying their code which
means one virus could have various amounts of similar variants.
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
infect the computer.
192
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
stored in one file, diskette or computer.
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
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
changes can be hidden.
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
random data but instead randomly delete or corrupt files.
193
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
a diskette is write protected you may receive a write protection error.
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
reboot the computer when ran.
Once the hard drive is infected any disk that is non-write protected disk that is accessed
can be infected.
Deleted files
Various messages in files or on programs.
Changes volume label.
Marks clusters as bad in the FAT.
Randomly overwrites sectors on the hard disk.
Replaces the MBR with own code.
Create more then one partitions.
Attempts to access the hard disk drive can result in error messages such as invalid drive
specification.
Causes cross linked files.
194
195
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
protection programs are listed above.
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
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, detect and clean viruses in a computer installation.
5.0 Summary
In this unit we have learnt the following:
(a) That computer viruses are programs written by programmers with the aim of
causing havoc to the computer.
(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.
196
197