Lasu CSC 111 Notes - 1
Lasu CSC 111 Notes - 1
I What is a computer?
The term computer is obtained from the word compute. A computer is an electronic
device that inputs (takes in) facts (known as data), and then processes (does
something to or with) it. Afterwards it outputs, or displays, the results for you to see.
Data is all kinds of facts, including, pictures, letters, numbers, and sounds.
There are two main parts of computers, hardware and software. Hardware is all of the
parts of the computer you can see and touch. Software is the instructions that a
computer uses to do what you ask it to. Pieces of software are often called programs.
The basic function performed by a computer is the execution of a program.
-.
--
-----
.l. ,.
.",, r.
.;:.
Many people mistakenly think that where the computer normally displays things is the
computer. This is not true. That is the monitor (see Figure 1.2). The computer is
usually a box (see Figure 1.3). Also, you may call the whole assembly of all the
hardware (the computer and the monitor, for example) the computer.
1
Figure 1.2 -A Cathode Ray Tube (CRT) monitor
There are different styles of monitors. One of these is the one already shown. It is
called a CRT monitor. It takes more power than the other popular kind, called LCDs
(see Figure 1.4). However, CRT monitors work faster, which makes them better for
fast games because the movement will blur less. LCDs are thinner than CRTs, but
they are more expensive.
Monitors are only one way the computer can output information for you to see.
Another popular output device is called a printer (see Figure 1. 5). Printers are used
to put data on paper. This is called hard copy, what monitors show is called soft
copy. Computers can also output sounds; this is also soft copy.
2
Figure 1.5 - A Printer
There are also different kinds of input hardware. The two most important are the
mouse and the keyboard. A mouse (Figure 1.6) is used to move the cursor around
the screen (monitor display). A keyboard (see Figure 1.7) is used to enter (type)
letters, numbers, and other symbols into a computer.
Computers store all data in binary code, which is a number system that only uses
ones and zeros. One digit in binary code is called a bit, eight bits is called a byte. A
byte is the amount of space one letter takes up. However when letters are formatted
specially they get bigger, and so usually things on a computer are thousands of bytes
m size.
There are many different kinds of computers. The ones that most people use are called
Personal Computers (PCs). Smaller computers that are about the size of a briefcase
are called laptops or notebooks. There are also much more powerful computers
called mainframes that can be as big as a room or a house!
3
Main Parts of a Personal Computer
The System Unit
• The "system unit" is the name given to the main PC box that houses the various
elements that go together to make up the PC. For instance within the system unit
is the computer system's motherboard, which contains all the main components,
such as the CPU. The system unit also houses items such as the hard disk, the
floppy disk and CD-ROM drives etc. System units come in two basic varieties, the
tower version, as illustrated, or a desktop version, which is designed to sit on your
desk with your monitor on top of the system unit.
.·., .·..·...·..·..·..·.....
·.··.·.,,···
....... ,.,...... .
• The system (mother) board is contained within your system unit and all the vital
computer systems plug directly into the system board. The CPU is normally
housed on your system board along with all the other electronic components.
Other items such as the hard disk are attached to the system board, either directly
or via cables. These boards are getting smaller and smaller as the components
become more integrated. If you open up a modern system you will find that it is
mainly full of air.
4
More information:
Intel: http://www.intel.com
AMD: http://www.amd.com
Cyrix: http://www.viatech.com
Memory RAM
• Random Access Memory (RAM) is the main 'working' memory used by the
computer. When the operating system loads from disk when you first switch on
the computer, it is copied into RAM. The original IBM PC could only use up to
640 KB of memory Gust over half a megabyte), whereas a modern computer can
effectively house as much RAM as you can afford to buy. Commonly modern
computers are supplied with over 128 MB of RAM. As a rough rule, a Microsoft
Windows based computer will operate faster if you install more RAM. When
adverts refer to a computer having 128 Mbytes of memory, it is this RAM that
they are talking about. Data and programs stored in RAM are volatile (i.e. the
information is lost when you switch off the computer).
Memory ROM-BIOS
• The ROM-BIOS (Read Only Memory - Basic Input Output System) chip is a
special chip held on your computer's system (mother) board. It contains software
that is required to make your computer work with your operating system, for
instance it is responsible for copying your operating system into RAM when you
switch on your computer.
5
What are output devices?
• Output devices allow you to output information from the computer and include the
printer and the monitor.
The Keyboard
• An Input device. The keyboard allows you to type information into the computer.
It has evolved over the years and many people now use a Microsoft style
keyboard, which has additional keys designed to make Microsoft Windows easier
to use.
The Mouse
• An Input device. When using an operating system, such as Microsoft Windows,
you use the mouse to select drop down menus, to point and click on items, to
select items and to drag and drop items from one place to another.
CD-ROM
• Most computers are now supplied with a CD-ROM (Compact Disc - Read Only
Memory) drive. CD-ROM discs look exactly like music CDs but contain
computer data instead of music. The advantage of a CD-ROM is that it can hold a
vast amount of data (equivalent to the storage capacity of over 450 floppy disks).
The other big advantage of CD-ROMs is that they are interchangeable. This
means that you can own a range of different CD-ROMs and choose which one to
insert into your CD-ROM drive.
DVD Drives
• Short for "Digital Versatile Disc". Similar to CD-ROM drives but allows you to
use DVD disks, which contain vastly more information than a traditional CD
ROM disk. These also transfer the data from the disk to the computer far faster,
allowing you to watch movies on your computer screen. A CD-ROM can store
650 MB of data, while a single-layer, single-sided DVD can store 4.7 GB of data.
The two-layer DVD standard allows a capacity of 8.5 GB. A double-sided DVD
increases the storage capacity to 17 GB (or over 25 times the data storage capacity
of a CD-ROM).
Floppy disk
• Floppy disks are also known as diskettes. They are very slow compared to hard
disks or CD-ROMs, and hold relatively small amounts of data (1.44 Mbytes).
Sometimes people will backup (i.e. copy) important data from their hard disk to
floppy disks. However, as diskettes are notoriously unreliable this is not the best
way of backing up valuable data (but is better than nothing).
Zip Disc
• A Zip disc is like a more recent version of the floppy disk, the main difference
being that a single Zip disc can hold up to 250 Mbytes of data. They also offer
increased speed compared to the old floppy disk.
Remark! The floppy and Zip disks are now obsolete. They have been replaced with
USB based flash disks. See below.
7
mm
The Monitor
• An Output device. The monitor is the TV type screen that you view your
programs on. They are supplied in different sizes, common sizes range from 15"
to 21" screens. You should be aware that poor quality or badly maintained
monitors could harm your eyesight.
Modems
• A modem is a device that is used to attach your computer to the telephone system.
The modem converts data into sound that is sent over the telephone line, the
receiving modem turns the sounds back into data. If you wish to connect to the
Internet, you will need a modem.
8
Printers
• Most data is printed once you have created it and there are a vast number of
different printers available to accomplish this. Most common are i n kjet and laser
printers both of which can now produce coloured output (at a cost).
Scanners
• Scanners allow you to scan printed materials into your computer, which can then
be stored within the computer. These pictures can then be altered, resized and
printed as required.
Recordable CDs
• CD-ROMs are read-only devices, but increasingly people are purchasing a special
type of CD drive unit that allows you to record data, music or video to your own
CDs. These devices require the purchase of special CDs that you can write to,
called CD-R (Compact Disc - Recordable).
9
CHARACTERISTICS OF COMPUTERS
Computers have certain definite characteristics that make them umque. These
characteristics include:
(a) Speed: The computers have the ability to execute or carry out instructions at very
great speed.
(b) Accuracy: Computers per se do not make errors i.e. there is accuracy of work.
Any error is usually caused by the human elements.
(c) Storage: Computers can store large volume of data/information on secondary
storage, which can be retrieved at a latter time.
(d) Consistency: Computers have the ability to consistently follow instructions
without getting tired.
(e) Repetitiveness: Computers have the ability to continue processing over an
extended period.
(f) Complexity: Computers have the ability to carry out very complex operations
that beats the best human ability.
10
WEEK2
The first computers used vacuum tubes for circuitry and magnetic drums for memory.
Their characteristics are:
These were the first computers that stored their instructions in their memory, which
moved from a magnetic drum to magnetic core technology.
The first computers of this generation were developed for the atomic energy industry.
The development of the integrated circuit was the hallmark of the third generation of
computers. Transistors were miniaturized and placed on silicon chips, called
semiconductors. Characteristics of computers in this generation are:
11
►They were smaller and cheaper than their predecessors.
►
►Drastical increase in speed
The computers are highly efficient
►
►Keyboard is used as input device
Monitor and printouts are used for output
Users interacted with the third generation computers through an operating system,
which allowed the device to run many different applications at one time with a central
program that monitored the memory. Computers for the first time became accessible
to a mass audience because.
►What in the first generation filled an entire room could now fit in the palm of
the hand. The Intel 4004 chip, developed in 1971, located all the components
of the computer - from the central processing unit and memory to input/output
controls - on a single chip.
► In 1981 IBM introduced its first computer for the home user, and in 1984
Apple introduced the Macintosh. Microprocessors also moved out of the realm
of desktop computers and into many areas of life as more and more everyday
► products began to use microprocessors.
As these small computers became more powerful, they could be linked
together to form networks, which eventually led to the development of the
Internet. Fourth generation computers also saw the development of GUis, the
mouse and handheld devices.
Fifth generation computing devices are based on artificial intelligence. They are still
in development. Applications that have been developed so far in this generation are:
12
WEEK3
The first computers were people! That is, electronic computers (and the earlier
mechanical computers) were given this name because they performed the work that
had previously been assigned to people. "Computer" was originally a job title: it was
used to describe those human beings (predominantly women) whose job was to
perform the repetitive calculations required to compute such things as navigational
tables, tide charts, and planetary positions for astronomical almanacs. Imagine you
had a job where hour after hour, day after day, you were to do nothing but compute
multiplications. Boredom would quickly set in, leading to carelessness, leading to
mistakes. And even on your best days you wouldn't be producing answers very fast.
Therefore, inventors have been searching for hundreds of years for a way to
mechanize (that is, find a mechanism that can perform) this task.
This picture shows what were known as "counting tables" [photo courtesy IBM]
13
A typical computer operation back when computers were people.
The abacus was an early aid for mathematical computations. Its only value is that it
aids the memory of the human performing the calculation. A skilled abacus operator
can work on addition and subtraction problems at the speed of a person equipped with
a hand calculator (multiplication and division are slower). The abacus is often
wrongly attributed to China. In fact, the oldest surviving abacus was used in 300 B.C.
by the Babylonians. The abacus is still in use today, principally in the far east. A
modern abacus consists of rings that slide over rods, but the older one pictured below
dates from the time when pebbles were used for counting (the word "calculus" comes
from the Latin word for pebble).
14
A very old abacus
A more modern abacus. Note how the abacus is really just a representation of the human fingers:
the 5 lower rings on each rod represent the 5 fingers and the 2 upper rings represent the 2 hands.
In 1617 an eccentric (some say mad) Scotsman named John Napier invented
logarithms, which are a technology that allows multiplication to be performed via
addition. The magic ingredient is the logarithm of each operand, which was originally
obtained from a printed table. But Napier also invented an alternative to tables, where
the logarithm values were carved on ivory sticks which are now called Napier's
Bones.
15
An original set of Napier's Bones [photo courtesy IBM]
0 0
7
l 0
4 6
I 2 (1
:! 8 9
:2 :2 0
6 4 _8 2
'l
2 3 3
0 0 s
2
.. .. 3
(;
4
4
z
2
1
2 9
Napier's invention led directly to the slide rule, first built in England in 1632 and still
in use in the 1960's by the NASA engineers of the Mercury, Gemini, and Apollo
programs which landed men on the moon.
I 11311
\;
•t•I •1•1 • I , I I j I I 12""'1111•11111r11n11011u1q11111n11
'·;,t;i",1:1 ·:..;;;:r;vn::i·
·--•t1t16' j II t1111g ''''''''\ •l•l'ltUI''
Cl tl11.11111 11011w 1111lu11T1111i.111 111111111 11+111
l111111111111111111111111l111111111111111t1111111 11111,1,1
i+l,11•1111111
l;t·,;·i;;;·.,.:1;;,; ·:,r:::i"1;;;,y,;;,;;,;
1:1,
A slide rule
16
Leonardo da Vinci (1452-1519) made drawings of gear-driven calculating machines
but apparently never built any.
<.:._·. - -r ·-'-
,. t··- - 1 -
'•--:-- (··-
The first gear-driven calculating machine to actually be built was probably the
calculating clock, so named by its inventor, the German professor Wilhelm Schickard
in 1623. This device got little publicity because Schickard died soon afterward in the
bubonic plague.
In 1642 Blaise Pascal, at age 19, invented the Pascaline as an aid for his father who
was a tax collector. Pascal built 50 of this gear-driven one-function calculator (it
could only add) but couldn't sell many because of their exorbitant cost and because
they really weren't that accurate (at that time it was not possible to fabricate gears
with the required precision). Up until the present age when car dashboards went
digital, the odometer portion of a car's speedometer used the very same mechanism as
the Pascaline to increment the next wheel after each full revolution of the prior wheel.
Pascal was a child prodigy. At the age of 12, he was discovered doing his version of
Euclid's thirty-second proposition on the kitchen floor. Pascal went on to invent
probability theory, the hydraulic press, and the syringe. Shown below is an 8 digit
version of the Pascaline, and two views of a 6 digit version:
17
Pascal's Pascaline [photo © 2002 IEEE]
A 6 digit model for those who couldn't afford the 8 digit model
18
A Pascaline opened up so you can observe the gears and cylinders which rotated to display the
numerical result
19
EDSAC was one of the first computers to implement the stored program (von
Neumann) architecture.
• Konrad Zuse's electromechanical "Z machines". The Z3 (1941) was the first
working machine featuring binary arithmetic, including floating point
arithmetic and a measure of programmability. In 1998 the Z3 was proved to be
Turing complete, therefore being the world's first operational computer.
• The non-programmable Atanasoff-Berry Computer (1941) which used
vacuum tube based computation, binary numbers, and regenerative capacitor
memory.
• The secret British Colossus computers (1943i81, which had limited
programmability but demonstrated that a device using thousands of tubes
could be reasonably reliable and electronically reprogrammable. It was used
for breaking German wartime codes.
• The Harvard Mark I (1944), a large-scale electromechanical computer with
limited programmability.
• The U.S. Army's Ballistics Research Laboratory ENIAC (1946), which used
decimal arithmetic and is sometimes called the first general purpose electronic
computer (since Konrad Zuse's Z3 of 1941 used electromagnets instead of
electronics). Initially, however, ENIAC had an inflexible architecture which
essentially required rewiring to change its programming.
Several developers of ENIAC, recognizing its flaws, came up with a far more flexible
and elegant design, which came to be known as the "stored program architecture" or
von Neumann architecture. This design was first formally described by John von
Neumann in the paper First Draft of a Report on the EDVAC, distributed in 1945. A
number of projects to develop computers based on the stored-program architecture
commenced around this time, the first of these being completed in Great Britain. The
first to be demonstrated working was the Manchester Small-Scale Experimental
Machine (SSEM or "Baby"), while the EDSAC, completed a year after SSEM, was
the first practical implementation of the stored program design. Shortly thereafter, the
machine originally described by von Neumann's paper -E D Y A C - w a s completed
but did not see full-time use for an additional two years.
20
Today, we have computer systems that are small, fast and highly reliable like the one
shown below.
21
WEEK4
I Classes of computers
►
Com puters can be classified based on the following parameters:
Type of data processed
► The size
► The Purpose or scope
► The age of technology
a. Digital computer
These are computers that operate on discrete values. That is, values that occur at a
point in time. E.g. 0,1,2,3... The output from digital computers is usually in the form
of discrete values. This class of computers is commonly found in the business
environments, and they include Desk Calculators, Adding machines, and most of the
computers we have around, that is, the personal computers.
b. Analog computer
22
Electronic analog computers Mechanical analog computers
"'=-= =
,.
...
.
_
--- - ----
·-- - -
-
These are examples of analog computers that have been constructed or practically
used:
• differential analyzer
• Kerrison Predictor
• mechanical integrator
• MONIAC Computer (hydraulic model of UK economy)
• operational amplifier
• planimeter
• Rangekeeper
• slide rule
• thermostat
• Torpedo Data Computer
• Water integrator
• Mechanical computer
23
c. Hybrid computer
Hybrid computers are computers that comprise features of analog
computers and digital computers. The digital component normally
serves as the controller and provides logical operations, while the
analog component normally serves as a solver of differential
equations.
Hybrid computers can be used to obtain a very good but relatively imprecise 'seed'
value, using an analog computer front-end, which is then fed into a digital computer
iterative process to achieve the final desired degree of precision. With a three or four
digit, highly accurate numerical seed, the total digital computation time necessary to
reach the desired precision is dramatically reduced, since many fewer iterations are
required.
Consider that the nervous system in animals is a form of hybrid computer. Signals
pass across the synapses from one nerve cell to the next as discrete (digital) packets of
chemicals, which are then summed within the nerve cell in an analog fashion by
building an electro-chemical potential until its threshold is reached, whereupon it
discharges and sends out a series of digital packets to the next nerve cell. The
advantages are at least threefold: noise within the system is minimized (and tends not
to be additive), no common grounding system is required, and there is minimal
degradation of the signal even if there are substantial differences in activity of the
cells along a path (only the signal delays tend to vary). The individual nerve cells are
analogous to analog computers; the synapses are analogous to digital computers.
Note that hybrid computers should be distinguished from hybrid systems. The latter
may be no more than a digital computer equipped with an Analog-to-digital converter
at the input and/or a Digital-to-analog converter at the output, to convert analog
signals for ordinary digital signal processing, and conversely, e.g., for driving
physical control systems, such as servomechanisms.
Using scope as a criterion, computers can be classified into two broad categories:
(a) Dedicated or Special purpose computers: These are computers that are designed to
carry out only specified task. The series of instructions that these types of computer
follow to carry out its operation is in-built and cannot be modified. E.g. word
processor, robots used in car manufacturing plants.
(b) General Purpose Computers: These are computers designed to perform a wide
variety of operations. They can be programmed to carry out scientific oriented
applications or business oriented ones just by changing the series of instructions in
24
its memory.
Classification by Size
Using physical size as a factor, the following types of computers can be identified:
(a) Micro-Computers: These are computers that are small in size which can be placed
on the desk or lap or palm.
(b) Mini Computers: These are large computers that support multi users. Their speed
of operations is high compared to micros.
(c) Mainframe Computers: These are very large computers that support multi users.
Their speed of operations and memory capacity is larger than that of a mini
computer.
25