Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
19 views

Comp_Science_Notes.PhiriM

Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
19 views

Comp_Science_Notes.PhiriM

Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 103

1INTRODUCTION TO COMPUTING

Information Technology
Definition – It is an organized combination and use of hardware, software,
telecommunications, database management and other information processing technologies
used in a computer -based information system.
Information technology transforms data into a variety of useful information products
specifically by the use of a computer.
Computer
- It is a device that has ability to accept data, internally store and execute a program of
instructions, perform mathematical, logical and manipulative operations on the data and
reports on the results.
- Put simply, it is a machine that accepts data (input) and processes it into useful
information (output).

Computer System
-It is an interrelated system of input, processing, output, storage and control components
-Thus a computer system consists input and output devices, primary and storage devices,
the central processing unit, the control unit within the CPU and other peripherals.

Data and Information concepts


The terms data and information are loosely used interchangeably in ordinary discussions.
The terms, however, are different in their usage in the field of information systems.

Data – it is the complete range of facts, events, transactions, opinions, judgments that exist
both within and
outside the organization. Data are raw facts from which information is produced.

Information – it is part of the total data available which is appropriate to the requirements
of a particular user or group of users. It is processed data upon which a user may rely for
decision.

A computer performs the following basic functions:


(a)Input – computer accepts and captures data from outside for processing

~ 1 ~ PhiriM Computer Science notes


(b)Processing – a computer performs operations on data it holds
(c)Storage – a computer holds data before, during and after processing
(d)Output – a computer produces data for use (information)

COMPONENTS AND CONFIGURATION OF A COMPUTER


Computer Hardware- refers to the physical components of a computer both mechanical
and electronic.
A computer is made up of the following components.
1. Input devices
2. Central Processing Unit
3. Memory
4. Secondary Storage unit
5. Output devices

~ 2 ~ PhiriM Computer Science notes


TYPES AND COMPONENTS OF COMPUTER SYSTEMS
Hardware
Memory
There are two types of memory:
• RAM (random access memory) • ROM (read only memory).
Random access memory
RAM is the computer’s ‘working memory’. RAM temporarily stores programs and data that
are being used at a given time. The contents of RAM can be changed and are lost when the
computer is turned off. This is known as ‘volatile memory’.
Read only memory
The main use of ROM is to store the program that runs when the computer is turned on
which loads the operating system. The contents of ROM can’t be changed and aren’t lost
when the computer is switched off. This is known as ‘non-volatile memory’.
Bits and bytes
Computers store and process data using binary numbers.
A single unit in binary is called a bit which stands for binary digit.
Computer memory is measured in bytes. One byte is made up of eight bits.

Main components
Hardware – all the parts of the physical equipment which makes the computer.
Software – all the programs that allow the hardware to carry out the data processing.
~ 3 ~ PhiriM Computer Science notes
Why use computers?
a) Computers are extremely fast.
b) Computers are very accurate.
c) Computers can work 24 hours per day, 365 days per year.
d) Computers make some jobs possible.

Disadvantages of using computers


a) Computers can replace people’s jobs.
b) Computers hold personal information which could be misused.
c) Computers can fail and without them the job may not get done.

Processing data
Computers can:
o calculate
o sort
o search
o store
o draw.
OPERATING SYSTEMS
An operating system (OS) is a set of programs that controls how the hardware and
applications of a computer works. An OS is the way of communicating between the user
and the computer. The OS loads and runs the other soft ware application programs and
other jobs.
The operating system on a computer means that usually only certain applications will run
on that computer.

Functions
The operating system:
1. enables communication between the user and the computer;

2. loads and runs applications programs as well as other jobs;


3. will only run applications written for that particular type of OS;
4. handles input and output:
– taking data from the input devices and sending it to RAM;
~ 4 ~ PhiriM Computer Science notes
– taking output and sending it to the correct output device;
5. handles the transfer of data from memory to and from the backing storage devices;
6. allocates memory space to programs and data;
7. loads and runs the applications soft ware in memory;
8. handles any errors while the soft ware is running;
9. manages system security, with user ID and passwords;
10. provides a human–computer interface, or HCI, for the user.

Human–computer interface (HCI)


This is the method by which the users communicates with the computer, sometimes called
the user interface.
Two type of HCI are:
1. command-line interface
2. graphical user interface or GUI.

Command-line interface
The user types in the instructions using command words.
The main advantage of command-driven interfaces is that, providing the user knows the
commands, they can be quick to carry out, since they require less translation by the OS than
GUIs. They can also be used in batch files to carry out repetitive administration tasks that
would take a long time using a GUI.

Graphical user interface


The most widely used type of graphical user interfaces are WIMP (Windows Icons Menu
Pointer) systems.
The main advantage of a GUI it is easy to use.
The main disadvantage is the large amount of memory, RAM and disk space that is needed.

Software
There are two main types of computer soft ware – system soft ware and application
software.
Application soft ware is used in particular situations and can be general-purpose (the same
soft ware used in differing situations) or specialist/custom-made (can only be used in one
particular situation).

~ 5 ~ PhiriM Computer Science notes


General purpose
A general-purpose application package (generic) is soft ware that can perform different
related tasks.
Word processors, spreadsheets, databases, graphics and presentation software are all
examples of application packages.
They are:
1. relatively cheap
2. readily available
3. can generally be installed quickly and easily
4. thoroughly tested
5. well supported with books and on-line help.

Here are some examples:


a. Database packages (e.g. MS Access, Foxpro, Open Office, Lotus Approach, Paradox) are
used to store and retrieve information.
b. Spreadsheet packages (e.g. MS Excel, Open Office, Lotus 123) are used for tasks that
involve calculations or graphs and charts.
c. Word-processing packages (e.g. MS Word, WordPerfect, Open Office) are used to
produce letters, reports and memos.
d. Desktop-publishing (DTP) packages (e.g. MS Publisher, PageMaker, PagePlus) are used
to produce posters, newsletters.
e. Graphics packages (e.g. Paint, PaintBrush, Serif Draw, Corel Draw) are used for artwork.
f. Computer-aided design (CAD) packages (e.g. 2D-Design, AutoCAD, TurboCAD) are used
to produce detailed designs and plans.
g. Communications soft ware (e.g. Internet Explorer, Firefox) is used to access the Internet
and send and receive email.
h. Presentation packages (e.g. PowerPoint, Open Office) are used to create slide shows and
presentations.
i. Web-page editors (e.g. MS FrontPage, Macromedia Dreamweaver) are used to create
web pages.

Integrated packages
An integrated package combines different types of application together – for instance,
word-processing, spreadsheet and database – in one single package. Integrated packages
are cheaper than buying the different programs separately.
~ 6 ~ PhiriM Computer Science notes
Generally, interworking between the different applications is made easier with integrated
packages.

Specialist software
Specialist application soft ware performs only one particular task.
Examples include soft ware for payroll, accounts, stock control, route planning and weather
forecasting.

TYPES OF COMPUTER
Mainframe computers
Mainframe computers process large amounts of data and do so very quickly.
Backing storage is provided on lots of disk drives.
A mainframe can have a large number of users connected to it at the same time.
The most powerful mainframes are called ‘supercomputers’ and are used for processing
even larger and more complex amounts of data, such as in weather forecasting.

Personal computers
A typical PC system consists of:
• a base or tower unit that contains the processor, backing storage devices (hard disk
drive), DVD drive, USB connections, Firewire and other connections;
• input devices, normally a mouse and keyboard;
• output devices, typically a screen, printer and speakers.
PCs are single-user computers and used to be called ‘microcomputers’.

Laptop (notebook)
A laptop is an example of a portable computer. Screens are typically 35–47cm (14–19in)
and are used whilst travelling or at meetings.

Netbook
A netbook is an even smaller version of a laptop, screens typically 20–25cm (8–10in).

Palmtop and PDA (personal digital assistant)


PDAs are small hand-held devices with limited functionality (diary, contact lists, email).
Palmtops are small computers with a small number of applications which can be
synchronised with the main network system.
If the PDA also has mobile phone capability, this is known as a ‘smartphone’.

Microprocessors
~ 7 ~ PhiriM Computer Science notes
A microprocessor is a single integrated circuit (chip) that performs the functions of a
central processing unit (CPU).
Microprocessors are used to control devices such as washing machines, videos, burglar
alarms, etc.

Advantages of microprocessors
a. Reliable – no moving parts.
b. Chips are cheap.
c. Programmable – so able perform different functions.

Disadvantages of microprocessors
a. Wasteful to replace whole unit when it could be repaired.
b. Many of the extra features/programs may never be used.
c. More complex – more to go wrong and break down.

Functions of the processor


a) To control the use of the memory to store data and instructions
b) To control the sequence of operations
c) To give instructions to all parts of the computer to carry out processing
The CPU can be subdivided into two major subunits; the control unit (CU) and the
arithmetic logic unit (ALU).

The primary (main) memory is an extension of the CPU and assists the CPU in its
operations.

The Control Unit (CU)

- It is the nerve center of the computer which controls and co-ordinates all hardware
operations i.e. those of peripheral units, main memory and the processor itself.
- It also controls the sequence of the operations.
- The unit fetches (obtains) the instruction from the main memory
- It then interprets it
- It then executes the instruction by sending a command signal to the appropriate hardware
device in the computer system, ordering it to perform required operations.
- The control unit is driven by a 'clock pulse'; the rate of the clock is called the speed.

The Arithmetic-Logic Unit (ALU)

This has two major functions


- Carries out arithmetic tasks e.g. division, addition etc
- Performs logical operations e.g. comparing data items

~ 8 ~ PhiriM Computer Science notes


How the ALU operates:

Data items to be processed are fetched from the main memory as directed by the CU into
registers or accumulators where they are stored. The ALU then performs the operations as
directed by the CU. The ALU leaves the result in a data register from where they are placed
into the main memory again under the direction of the CU.

~ 9 ~ PhiriM Computer Science notes


3 INPUT AND OUTPUT DEVICES [PERIPHERALS]
Peripheral is defined as any device that is physically connected to the CPU.
INPUT Devices/Peripherals
Definition - These devices facilitate communication between the user and the computer.
They facilitate the insertion of data into the computer for processing.

Manual input devices


Require human intervention to enter data:
a. keyboard
b. pointing devices – mouse, touchpad, trackerball, joystick, touch screen, graphics
tablet, light pen
c. digital camera
d. scanner
e. microphone
f. music keyboard (MIDI).
g. Voice data entry [ speech recognition]
h. Video input
(g)Voice Data Entry (VDE) – explained in detail
-Can also be called voice input or speech recognition
-A voice recognizing device analyses and classifies speech or vocal tract patterns
-The device converts the speech into digital codes for entry into the computer
-These are suitable where users do not wish to use their hands to input data e.g. sorting of
luggage at an airport, recording of weight in a slaughterhouse or butchery.
-However, their use is limited by the limited nature of recognizable vocabulary
-The computer needs to be “trained” to recognize an individual’s voice.
-There are bound to be in accuracies in the data input so there is need for a careful proof
reading by the user.

(h)Video Input – explained in detail


-Video images can be entered into the computer from sources such as a TV receiver, VCR or camcorder.
-The data is digitalized and compressed for storage on the computer’s memory sites.

~ 10 ~ PhiriM Computer Science notes


-This method is used to input and store information for a broadcaster of producer of optical disks

Direct input methods


Data is entered directly without human intervention.
Sometimes called direct data entry.
Used when very large amounts of similar data need to be entered.

Optical mark recognition (OMR)


OMR uses an input device called an optical mark reader to detect marks made in certain
places on specially printed forms. Used to input data from things like answer sheets for
multiple-choice exams and registration forms in schools.

Magnetic ink character recognition (MICR)


MICR uses a magnetic ink character reader to input characters that have been printed in
special magnetic ink.
Banks use MICR to process cheques.

Optical character recognition (OCR)


OCR is the use of a scanner and soft ware to convert text and any embedded images in a
document into a format that can be edited by a word processor.
Used for reading typed postcodes (zip codes).

Bar codes
A bar code is a set of lines of different thicknesses that represent a number, which is read
using light by a bar code reader. Most products in shops have unique printed bar codes.
Bar code readers work by shining a beam of light on the lines that make up the bar code
and detecting the amount of light that is reflected back.

Magnetic stripe readers


A magnetic stripe is a thin band of magnetic tape found on the back of a credit or debit card,
identity cards and electronic key cards. The stripe can store data, which can be read by the
magnetic stripe reader.

Chip-and-PIN readers
Credit and debit cards are now made more secure by the inclusion of a chip on the card,
which is much more difficult for a hacker to read.

~ 11 ~ PhiriM Computer Science notes


Sensors
- Sensors are used to input data based on temperature, pressure, light levels, etc.
-The analogue data must be converted to digital data that the computer can understand
using an analogue-to-digital converter.
-Data logging automatically collects data over a period of time without the need for human
intervention and is used in weather monitoring, industrial processes and scientific
experiments.

OUTPUT Devices/Peripherals
There are two forms of output devices, those that produce hardcopy (permanent) and
those that produce softcopy.
Printers are hardcopy devices while the VDU (Visual Display Unit) is a softcopy device.
Hardcopies are needed when copies are to be taken away from the computer to be sent to a
user of the information thereon, or to be filed away or even as legal documentation.
Computers, therefore can produce a number of different documents e.g. reports, sales
invoices, payrolls, or graphics.

Monitors
Monitors (CRT and TFT) display text, graphics and video.
Some monitors have internal speakers.
A multimedia projector is used when giving a presentation.

Printers
a. Dot matrix printers
A dot matrix printer uses a set of pins to press an inked ribbon against the paper. Where
the pin hits against the paper a coloured dot is left. These dots can be controlled in patterns
to produce the required text output on the paper.

b. Inkjet printers
Inkjet printers work by squirting ink at the page out of nozzles; one for each colour used,
and are quiet to operate. They produce good-quality colour text and graphics hardcopy.

c . Laser printers
Laser printers work by using a laser to ‘draw’ the required outputs onto a drum. Laser
printers produce high-quality hard copy at high speed.

Plotters
A plotter uses a pen to draw accurate line drawings and are often used in computer aided
design (CAD).
~ 12 ~ PhiriM Computer Science notes
There are two types – flatbed and drum plotters.

Speakers
Computers can output music, voices and sounds using speakers.
Headphones are personal speakers.
Buzzers are a type of speaker and are oft en used in control applications.

Speech Output (Sound Output)


Some computers are capable of producing speech. The computer can actually speak out
from a stored digital representation of either words or other sounds. A person's voice can
be stored and reproduced later.
This method of output is of great use to the blind, or in poor light. Advanced forms of
speech output are being used to answer telephones, answer some inquiries from an
organization's callers etc

Computer Output on Microforms (COM)


It is the recording of computer output onto microfilm or microfiche (microforms).
Recording onto the microfilms and microfiches can be done on-line or via a magnetic tape
in order to convert the computer's digital representation of data into microforms. The
recording is a way of data storage in which the computer stores the data in a reduced
(compacted) way on the film or fiche. The stored data can be retrieved later through the
use of a reader and editing can be done. Microforms are much easier to store than ordinary
hardcopies and last much longer. Accessing and finding the required information can be
made easier by indexing the film or fiches.
COM is most suitable where large amounts of data are processed but are to be used much
later e.g. in a government registry department (birth registrations, important national
statistics for example population censuses.

CONTROL Devices
Control devices are used to change some physical value in response to a command from a
computer, such as:
 motors to operate machines, open windows, etc.
 buzzers to sound warnings
 heaters to increase temperature
 lights used as signals to the user
 lights as output devices to provide light in a greenhouse, for example.

~ 13 ~ PhiriM Computer Science notes


Applications of hardware devices [Input and output]

Applications of hardware devices at Point of Sale (POS)/Electronic Point of Sale


(EPOS)
- These are used in supermarkets.
- A POS or EPOS incorporates a scanner (bar code reader), a printer and a keyboard built
into a service point.
- An item is passed through a window through which the scanner can see the bar code and
thereby identifies the item; alternatively a hand held scanner is used to do the same thing.
- When a bar code is read and recognized, the scanner emits a short sound.
- The linked central computer then automatically looks up details relating to the item.
- The details are then printed on the customer’s receipt

Applications of hardware devices at ATM (Automated Teller Machine)


-mostly used by banks as a means for its clients to withdraw money
-it consists of a touch screen, mounted buttons in a keyboard setup to enable clients to
press digit values.
-screen or mounted monitor for display
-printer for outputting the balance or withdraw transactions on request

~ 14 ~ PhiriM Computer Science notes


STORAGE DEVICES AND MEDIA

Backing storage is used to store programs and data when a computer is switched off or
when they are not needed.
When programs and data are run they remain on backing storage and a copy is transferred
to RAM.
Magnetic tape drives and hard disk drives are both examples of magnetic devices. CD and
DVD drives are examples of optical devices. Memory sticks, pen drives and flash memory
cards are examples of solid-state storage devices.
The important thing to remember is that the medium is the thing which stores the data
(hard disk, magnetic tape, CD, DVD, etc.) and the device is the equipment that reads the
data from the medium and inputs the data into the computer system.

Hard disk drives


Most hard disk drives are fixed inside the computer but some are not fixed and can be
removed for either portability or data security.
Hard disks can store lots of data, now typically 160–500 GB (gigabytes), but the capacity
can be as much as 1.5 TB (terabytes).

Optical disk drives


Equipment designed to read/play CD/DVDs.
When fitted to computer equipment they are almost always capable of writing data to a
compatible disk.
Blu-ray drives are capable of reading normal DVD as well as the high capacity Blu-ray disks.
HD-DVD (high definition) format was an alternative but Blu-ray has now become the
standard.

CDs
CD-ROM (compact disk read only memory) can store up to about 1GB of data, but are read
only and so the data cannot be changed.
CD-R (CD recordable) is a CD which will let you record data once only, but you can read it
many times. Sometimes known as WORM (write once read many).
CD-RW (CD rewriteable) is like a CD-R but will let you record data as many times as you
want and will re-write the data.

DVDs
DVD one of the latest ways of storing data, capable of storing up to 10 GB of data as a dual-
layer DVD disk. DVD has now almost completely overtaken CD as a storage medium.
Blu-ray disks can store up to 50 GB as a dual-layer disk.
~ 15 ~ PhiriM Computer Science notes
NOTE. Any numbers given for the capacity of any medium is liable to increase as
technology advances.

Other examples of storage devices are Floppy disk, Zip disk and Cloud computing
such as google drive or dropbox.

Magnetic tape
One advantage of using magnetic tape as backing storage is that it can store large amounts
of data and is especially useful when speed of access is not important, such as for backups
and archives.

Direct and serial access


Magnetic tape uses serial access to data. To locate the required data on the tape the tape
reader has to search from the beginning until it finds the required data item.
Hard disks, optical disks and pen drives use direct access to data. To locate the required
data on the disk the drive can find the required data item without having to read all the
data from the beginning of the disk.

Backups
It is important to make backups of data in case:
a. something goes wrong with the computer and data is lost
b. data is accidentally deleted
c. viruses either delete or corrupt your data.
In the event of any of these happening, the data can be restored from a backup.
Backups should be made on storage devices that are separate from the computer.

Archives
Data that is no longer regularly used but is still required to be kept can be copied from the
hard disk to an external storage device. It can still be retrieved if necessary but does not
clutter up the system any more.

ATM Example with Input / Output / Processing / Storage / Feedback

Input Output Processing Storage Feedback


o The cash card is o Instructions / o Customer’s data o Customer data is o The amount is
inserted menu choices are is retrieved from stored in the cash instantly deducted
o PIN is entered displayed on ATM the banks database card from the customers
o Menu choice is screen o PIN is validated o o Customers details balance
selected o Receipt may be Amount is checked are stored in the
o Amount is printed o Sum of against the banks database
entered or selected money is issued customers balance o Details of the
o Amount is transaction are
deducted from the stored in the banks
customers balance database

~ 16 ~ PhiriM Computer Science notes


5 THE EFFECTS OF USING ICT
Health and safety
• Electrical safety – computer equipment must be tested periodically for electrical safety.
• Cables should be safely stored to avoid damage and the risk of people tripping over the cable.
• Drinks and liquids should not be allowed near the computers.
• Repetitive strain injury (RSI) is caused by repeating the same actions such as repeatedly
clicking the buttons on a mouse. Regularly stretching the wrist and arm muscles in different ways
can alleviate the problem.
• Eyestrain. Staff using computers continuously should take regular frequent breaks.
• Furniture design. Comfortable working conditions should be provided.
• There should be adequate fire protection.

Computer misuse
• Computer could be used to pirate soft ware, which is protected by copyright laws. It is illegal to
copy, steal or use soft ware on any computer for which the owner has not purchased a licence.

Hacking and viruses


• Hacking is the unauthorised access to a computer or computer data.
• Hacking can be prevented by ensuring that no unauthorised user has access to your computer.
User IDs and passwords, limited access to the Internet and firewall protection can help prevent
hacking.
• A virus is the modification of the contents of a computer impairing the operation of any program
or the reliability of any data.
• Viruses can be prevented by the use of anti-virus soft ware and ensuring that the virus definitions
are up to date. Do not download soft ware from potentially untrustworthy sites.

Patterns of employment
• Some jobs have been lost in banking and offices. Other jobs have been lost where computer-
controlled manufacturing has replaced skilled workers.
• On the other hand jobs have been created in soft ware development and in making computers.
• Different skills are needed and so workers may have to learn new skills.
• Companies can allow some staff to have flexible working conditions by working at home
(teleworkers) and using the Internet in order to communicate.

~ 17 ~ PhiriM Computer Science notes


Microprocessors in the home
• Microprocessors can be found in many devices: phones, televisions, washing machines,
dishwashers, MP3 players, blu-ray players/recorders, games consoles and any electronic device.
• Internet shopping and using computers for entertainment can mean that people stay at home
more.

Capabilities and limitations of ICT


Computers can store vast amounts of data and process it very fast. However there are things that
computers cannot do especially where there are no set rules or too many different possibilities that
the programmer is unable to take all of them into account when writing soft ware.

Internet developments
• The Internet has evolved and become much more interactive rather than just a static source of
information. People now write their own blogs and share their experiences on-line.
• Wikis allow other people to add content to what is already published.
• Digital media uploading sites allow you to upload photos, music or videos and share these with
other people.
• Many people take advantage of the numerous social network sites in order to keep in touch with
other people, some of whom may live in another country or they have not seen for a long time.

Information issues
• Not all information which is available online has been checked for accuracy or suitability of
content. It may not be accurate or may not be appropriate for many people.
• Phishing is an attempt to obtain important personal data from you in an attempt to commit
crimes involving stealing from your bank account or setting up false bank accounts with your
identity.
• Pharming is when you share your personal data with a fake website after being redirected from a
legitimate trusted website.
• Spam is unsolicited emails which are sent to you as a form of advertising. All phishing uses spam
email in an effort to get the data they require.

~ 18 ~ PhiriM Computer Science notes


APPLICATIONS OF COMPUTER SCIENCE

Communication Desktop publishing and word processing; newsletters, websites, multimedia


presentations, flyers, posters, business cards
Interactive blogs, wikis, social network websites
Data handling surveys, contact lists, school reports, school records
Measurement scientific experiments, environmental and weather conditions
Control air conditioning, greenhouses, central heating, electronic gadgets
Modelling simulators, spreadsheets, financial models
Business billing systems, stock control, e-commerce, m-commerce
Schools electronic registration, school reports, school records
Booking systems theatre, travel
Banking EFT, ATM, Internet banking, phone banking, credit/debit cards
Medicine expert system diagnostics, patient records, pharmacy records
Libraries members, books, issuing systems
Expert systems geological surveys, medical diagnostics, car engine diagnostics, share dealing
Retail stock control, POS, EFTPOS, Internet shopping

Below are examples of some of the applications listed above.

ARTIFICIAL INTELLIGENCE
Artificial Intelligence (AI) is the science of developing computer systems that have the ability to
learn from experience and mimic human reasoning in specific areas, as in medical diagnosis,
mineral prospecting, etc. Expert systems are a branch of Artificial Intelligence

Expert systems
Expert systems, also known as knowledge-base systems, simulate human knowledge and suggest
solutions to given problems.
Examples of expert systems:
• medical diagnosis, • engine diagnostics, • energy conservation, • geological surveys, • commodity
prices, • share dealing.

The four parts of a medical expert system are:


1• the facts about illnesses and conditions – the knowledge base;
2• the means of asking questions and getting responses from the system – the user interface or
human computer interface (HCI);
3• the set of rules which the data has to abide by – the rule base;
4•the program that can apply the rules to the data in order to get sensible results – the inference
engine.

Components (Elements) of an Expert System diagram

~ 19 ~ PhiriM Computer Science notes


Limitations
1. Training is needed to operate the system.
2. Knowledge base is only as good as the experts who set up the system.
3. Could become out of date as knowledge improves.

Medical diagnosis using expert systems


The patient’s details and symptoms are input, and the system outputs probable diagnoses,
recommended treatments or drugs which may be prescribed.

Steps Followed When Producing an Expert System


1. Gather information from experts in the field.
2. Design the knowledge base.
3. Input data into knowledge base.
4. Design the rule base.
5. Design inference engine
6. Design display of results
7. Design appropriate user interface

Ways of Improving Expert Systems


- Frequently carrying out researches and making updates.
- Quickly inputting new data into the knowledge base.
- Assigning its control to a number of highly experienced personnel who will monitor and
make updates as soon as possible.

Advantages of an expert system over a doctor are:


~ 20 ~ PhiriM Computer Science notes
1. database knowledge can be kept up to date;
2. system can store more specialised knowledge than a non-specialist doctor;
3. system cannot forget or get facts wrong, provided the original rules were correct;
4. no loss of knowledge as there would be when a doctor leaves.

Disadvantages of expert systems


1. lacks common sense in some of the decision making processes
2. errors in the knowledge base can lead to incorrect decisions being made
3. cannot adapt to changing environments unless the knowledge base is continually updated
4. expensive system to set up in the first place
5. needs considerable training to ensure system used correctly by operators
___ __ __ ________ ______ __ ___________ ______________ ______________ _______________ _____________ _____ _ ___ __ ____
Robotics
A robot can carry out the same task over and over again, and it can be reprogrammed to change the
task.
Robots are mostly used (suitable) in the following areas:
o In very dangerous areas for human beings to work, e.g. fire fighting, nuclear power stations,
underground mining, chemical, nuclear factories, deep in the ocean, in space, etc.
o Where work is repeatedly executed and boring, like traffic control at road junctions
o In areas where heavy items are to be lifted, e.g. for loading containers in ships, in production lines,
etc.
o In areas where the degree of accuracy is of utmost importance, e.g. manufacturing of computer
chips. Thus producing standardised goods.
Robotic systems are real-time systems.

-Any data the processor receives from the sensors will be processed immediately.
-An embedded system contains a ROM chip which has special software to control a machine. This
soft ware will run continuously. The program processes the data and sends output signals to
motors to control the robot.
Advantages of Robotics
Robots:
a• work 24/7 – no need for breaks
b• do not have to be paid
c• work consistently – no mistakes.
d• Reduces labour costs as less people will be employed.
e• Increases production volumes of goods since more goods are produced in a very short period.
f• Ensures high degree of accuracy when producing goods.
g• Create employment as the robots need to be serviced and installed.
~ 21 ~ PhiriM Computer Science notes
h• Eliminates human errors involved in the production process.

Example (in car-making factory)


The jobs may include:
• welding or assembling parts
• paint spraying
• moving heavy parts around the factory.

NB: However errors still exists due to:


- Loss of power to the robot.
- Fault in the software (wrongly programmed). [ --Occurrences of hardware break down. ]
- Some robot components can be missing or misplaced.

Disadvantages of Using Robots


-Leads to unemployment as humans are replaced by robots
-Electricity expenses are very high.
-they can find it difficult to deal with “unusual” circumstances e.g. a door is missing from a car
waiting on the paint spraying line
-leads to de-skilling since many tasks are taken over by robots
-Can only do what they are programmed to do
___ __ __ ________ ______ __ ___________ ______________ ______________ _______________ _____________ _____ _ ___ __ ____
COMPUTER AIDED DESIGN (CAD).
-the use of a computers to produce technical and architectural drawings used by engineers
This is whereby computers are used in the designing and development of new products in a variety
of applications both at home and on a commercial/industrial basis. Models of infrastructure like
bridges are designed and tested for their strength before building actual structures on the ground.
A model is a computer representation of a real object/process, often involving some formula that
determines its behaviour, e.g. a bridge, house, etc. CAD is used in fields like:
- Aerospace, - Architecture, - Car/vehicle design, - Construction (e.g. Roads, services, surveying,
tunnels, bridges, etc.), - Consumer goods (e.g. kettles, toasters, etc.), - Digital circuits, - Factory
layouts (e.g. Ergonomics), - Fashion design, - Heating systems, - Interior designs (houses, offices,
etc.), - Lighting systems (e.g. to get lighting effects at a concert), - Machinery design, - Plant design
(chemical, nuclear, etc.), - Ship building engineering, etc.

CAD Requirements
- considerable processor power
Input devices such as:

~ 22 ~ PhiriM Computer Science notes


-Light pen: Used to make alterations on the screen to the drawings. Also used to write directly on
the screen. Can be used again to select commands.
-Tracker balls: used to draw designs and to select menus
-Mouse: adjust drawings
-Graphics tablet: provide interface for drawing on the screen. It also links with the light pen.
Output Devices such as:
- Large high resolution screens
- Graph plotters to draw scale and full size and high quality drawings - High specification graphics
cards
- Some systems support stereoscopic drawings where 3-D spectacles can be worn and the user sees
a 3-D image.

Features of the CAD software which are used in design are:


- Can zoom, rotate, scale, and crop images
- Has a library of geometrical shapes that will be used in drawings - Has inbuilt library of
components and templates.
- Have ability for labelling and adding text
- use 2-D and 3-D modelling
- has library of parts which can be used in new drawings - use colour fill feature
- Validation and verification of designs against original specification
- Facility to calculate the mass of the actual object once built
- Facility to calculate the cost of producing the article
- Simulation of designs without the need to build a prototype
- Import and export to allow the exchange of data with other software packages
- Kinematics (i.e. check moving parts in assemblies don’t interfere with each other)

Advantages of Computer Aided Design


a]Saves a lot of time spent in drawing and testing objects.
b] Saves costs of designing items
c] Produces accurate scale diagrams.
d] Images are easily manipulated on the screen.
e] One can produce drawings in 3-dimensions as in buildings, gardens, bridges, etc.
f] Images can be saved on the disk and retrieved at a later date.
g] Drawings can be easily scaled up and down.
h] It is easier to modify drawings
i] A library of parts can be kept for future use
j] Ability to do automatic costing of items

~ 23 ~ PhiriM Computer Science notes


k] Ability to model the design
l] Can do ergonomic study.
NB: Ergonomics: the design and functionality of the computer environment and includes furniture
setup and how it affect human beings, e.g. ventilation, security, space, noise, etc.

Disadvantages of Computer Aided Design


a. Can lead to deskilling (skills which were highly valued are taken to be useless or of less value by
the introduction of computers and workers degraded to less important jobs)
b. Involves very high training costs to use the packages
c. Can move work overseas
d. Can lead to unemployment as one CAD operator can do work of 5 manual draftsmen.
___ __ __ ________ ______ __ ___________ ______________ ______________ _______________ _____________ _____ _ ___ __ ____
Simulations
To demonstrate how a simulation can be developed for use in a real situation the following example
has been chosen. The scenario chosen is a series of traffic lights at two busy junctions:

In this simulation it is necessary to consider:

1. how and what data is gathered


2. how the simulation is done
3. how the system would work in real life
4. why simulations are done
5. other examples of simulations

Advantages of carrying out simulations


- saves cost (rather than doing the real thing)
- safer (scenarios tried out on the simulation first before used in reality)
- possible to try out various scenarios in advance
- some environments make simulations the only way to carry out a task beforehand (e.g. outer
space, under sea, chemical processes, nuclear reactors, crash testing cars, etc.)
- faster (no need to build and test real system, so it is possible to get results more quickly)
Other examples of simulations
- training (e.g. pilots, drivers, etc.)
~ 24 ~ PhiriM Computer Science notes
- running/testing chemical plants and nuclear plants
- trying out equipment to be used under sea or in outer space
- financial simulations (e.g. stock market predictions based on various scenarios)
- population growth (i.e. predict how the world’s population will increase based on a
number of different scenarios)
- queues (e.g. simulating queues at supermarket checkouts for example)
- weather (refer to next section)
__ __ __ ________ ______ __ ___________ ______________ ______________ _______________ _____________ _____ _ ___ __ ____
Control systems
Computer systems are used in a variety of control situations including domestic appliances such as
washing machines and large industrial processes such as glass manufacture.
Any control system can be broken down into the stages of input, processing and output.

Input
Sensors take readings at regular time intervals and send the readings to the computer.
Sensors may be measuring temperature, pressure, water flow, wind speed.
Processing
The computer compares these readings and decides what action to take.
Output
The computer sends output signals to devices which control motors/heaters/switches.
Process control
Process control is an example of a real-time system. Data is processed as soon as the computer
receives it, allowing the system to respond immediately to any changes.

Advantages of control systems Disadvantages of control systems


• Immediate response • Greater unemployment
• Fewer staff needed • Large initial cost of setting up the system.
• System can work 24/7, 365 days per year
• Used where it may be dangerous for people.

___ __ __ ________ ______ __ ___________ ______________ ______________ _______________ _____________ _____ _ ___ __ ____
Library systems
Every book in the library has a bar code printed inside it. When a new member joins, a card is
issued containing a bar code.
When a member borrows or returns a book, the barcodes of the book and the member’s card are
read by a bar code reader.
Input
• The bar code from the book
~ 25 ~ PhiriM Computer Science notes
• The bar code from the member’s card
• The date
Process
If the book is being returned, the system will calculate if any book is overdue and any fines to pay.
Output
The library system is a real-time system – as a book is taken out or returned the database is
immediately updated.
The database can be searched for any book to find if it is currently in stock in the library or whether
it is out on loan.
___ __ __ ________ ______ __ ___________ ______________ ______________ _______________ _____________ _____ _ ___ __ ____
Billing systems
Invoice billing systems
The company has a database of all its customers. As well as name and address, this includes details
such as previous order history and possibly payment method.
Input
At regular intervals, customers submit their orders via the Internet, by post or by telephone.
Processing
The invoice for each customer is calculated by the computer.
A billing system is usually run as a batch processing system. Large volumes of data may be entered
and then processed when all the data has been collected. Oft en the bill processing may be run at off
-peak times (e.g. overnight).
The database is updated in the billing process. A backup copy of the database is made before this is
done. The files can then be re-created and the whole process repeated with no loss of data.
Output
Depending on their payment method with the company, the invoice is posted or emailed to the
customer and payment will be made electronically. Otherwise the customer will send payment to
the company after receiving the invoice.
___ __ __ ________ ______ __ ___________ ______________ ______________ _______________ _____________ _____ _ ___ __ ____
Booking systems
Many people now book on-line for holidays, trains, planes, hotel rooms and theatre tickets.
Input
When a booking is made, the customer will need to provide input details (name, date, place,
number of people etc.).
These details may be entered by:
• a ticket/booking agency, at a computer terminal in a multi-access system;
• an individual person, on a form on an Internet web page;
• the company, by transcribing them from a paper booking form posted to them or input during a
telephone booking.
Processing

~ 26 ~ PhiriM Computer Science notes


This data is validated and checks are made for availability, the booking is made and details saved in
the database. On-line payments for the booking are required and can generally be made using a
credit or debit card from a secure web page (or over the counter). As soon as the booking has been
processed, no other customer can make the same booking. This is a real-time (transaction
processing) system.
Output
Documents will need to be printed for the customer and sent, but these are often printed at home
by the customer as an e-ticket.
___ __ __ ________ ______ __ ___________ ______________ ______________ _______________ _____________ _____ _ ___ __ ____
Stock control
Stock control is the name given to the process where the number of items for sale in a shop is under
constant examination.
A stock control system:
a• keeps track of how many of each item are in stock;
b• decides (using the in-built rules and stock reorder level) if items need to be reordered from
their suppliers;
c• analyses sales to determine which items are selling well.

The computer stores a master file with records of every item sold in the shop.
As an item is sold, the barcode is scanned and the computer will deduct 1 from the stock level for
that item. The computer will therefore know exactly how many of each item is in stock.
Once the number of items falls below the reorder level then the computer is able to automatically
order new stock from the supplier. This is another example of a real-time system.
___ __ __ ________ ______ __ ___________ ______________ ______________ _______________ _____________ _____ _ ___ __ ____
Payroll systems
At the end of each month or week, employees have to be paid. A payroll system uses a computer to
calculate the salaries, print out payslips, record the information for financial accounts and arrange
for the money to be transferred to the employees’ bank accounts.
Input
• Employees database (salaries, pay rates, bonus rates etc.)
• If employees are paid by the hour then the number of hours worked and number of
hours overtime are needed.
Process
Calculate:
• actual pay
• deductions such as tax
• net amount for each employee.
A payroll system is usually run as a batch processing system. Large volumes of data may be entered
and then processed when all the data has been collected. Oft en the payroll processing may be run
at off -peak times (e.g. overnight).

~ 27 ~ PhiriM Computer Science notes


The employee database is updated in the payroll process. A backup copy of the database is made
before this is done. The files can then be re-created and the whole process repeated with no loss of
data.
Output
• Print payslips with actual pay, deductions and net amount.
• Update the employee database.
• Pay money directly into employees’ bank accounts.
--------------------------------------------------------------------------------------------------------------------------------
Uses of Computer at Home
Computer can be used at home in the following ways:
a) Home Budget
b) Computer Games
c) Working from Home
d) Entertainment
e) research from the Information on the internet
f) communication by Chatting & Social Media
--------------------------------------------------------------------------------------------------------------------------------
Uses of Computers in Business
The use of computer technology in business provides many facilities.
a) communication / interaction with the business customers anywhere in the world.
b) Many business tasks are performed more quickly and efficiently.
c) Computers also help them to reduce the overall cost of their business.
d) keeping records of daily sales and profits
e) Marketing products- Marketing applications provide information about the products to
customers.
f) Computer is also used to manage distribution system, advertising and selling activities.
g) computers can also be used in deciding pricing strategies. Companies can know more about
their customers and their needs and requirements etc.
h) Many stock exchanges use computers to conduct bids.
i) computers reduces cost as no paper or special building is required to conduct these activities as
stock brokers perform all trading activities electronically.

~ 28 ~ PhiriM Computer Science notes


Sample Questions of Application of computers or ICT

3. Explain two uses of computers in each of the following fields.[Nov 2007 QP]

(a) in Education [2] (b) in Tourism [2] (c) in Agriculture [2]

-research -keeping records of tourists -greenhouses maintenance with use of


-keeping students records -Advertising-information sensors
-Computer Based -bookings both online or offline -records keeping (agricultural records
instruction/Computer Aided -communication with tourists ( via for farmers)
Learning. e-mail, skype or social media). -research
-E-learning -payroll for its employees and clients
-E-marking -agricultural expert system
(d) in Traffic light control (e) in Transport Management (f) in Mining
-enables better synchronisation -transport logistics and record -Use of sensor detection to help ease or
-speed of traffic can be controlled keeping of vehicle departed and fasten the mining
-traffic distribution can be arrival. -For remote sensing the mining area
monitored and controlled -navigation or tracking transport -Record keeping electronically
-pedestrians waiting to cross the vehicles with use of GPRS. (electronic filing)
road can be fitted on with traffic -Payroll of the emplolyees.
flows.
(g) in Robotics (h) in Wildlife Management (i) in Computer aided manufacturing
-enables better utilization of -use of sensors -Engineers use computers to create the
production line since robots can -record keeping design of a complex object using a
work 24/7. -tracking of the wildlife computer program for Computer-Aided
-Robots can be used in dangerous -remote sensing areas if they are Drafting.
places e.g disarming a bomb. environment friendly for the -Storage of data or information and
-Utilization of AI[ Artificial wildlife softcopies of the designed plans.
Intelligence] -Computers enables or makes use of 3D
(k) inEnvironmentalManagement (m) in Banking uses of the Internet
-electronic filling of information -ebanking -communication vai (e-mails, social
-research online -record keeping of data and media)
-use of sensor detection of transactions -E-commerce
unfriendly environment hazards -payroll of its employees -File Transfer (downloading files)
and warning alarms e.g -Entertainment-music, videos, internet
earthquakes. games etc
-GIS remote sensing -Research (through search engines)

--------------------------------------------------------------------------------------------------------------------------------------------

~ 29 ~ PhiriM Computer Science notes


Uses of computers in Medical Field
Hospital Management System

a. Specialized hospital management softwares are used to automate the day to day procedures and
operations at hospitals.
These tasks may be Online appointments, payroll admittance and discharge records etc.
b. Computers are used to store data about patients, their diseases & symptoms, the medicines that
are prescribed.
c. Patients Monitoring
Monitoring systems are installed in medical wards and Intensive care units to monitoring patents
continously.
These systems can monitor pulse, blood pressure and body temperature and can alert medical staff
about any serious situations.
d. Life Support Systems
e. Specialised devices are used to help impaired patients like hearing aids.
f. Diagnosis Purpose
A variety of softwares are used to investigate symptoms and prescribed medication accordingly.
Sophisticated systems are used for tests like CT Scan, ECG, and other medical tests.
--------------------------------------------------------------------------------------------------------------------------------
Uses of Computers in Education

CBT are different programs that are supplied on CD-ROM. These programs include text, graphics
and sound. Audio and Video lectures are recorded on the CDs. CBT is a low cost solution for
educating people. You can train a large number of people easily.

Benefits of CBT

Some benefits of CBT are as follows:

1. The students can learn new skills at their own pace. They can easily acquire knowledge in any
available time of their own choice.
2. Training time can be reduced.
3. Training materials are interactive and easy to learn. It encourages students to learn the topic.
4. Planning and timing problems are reduced or eliminated.
5. The skills can be taught at any time and at any place.
6. It is very cost effective way to train a large number of students.
7. Training videos and audios are available at affordable prices.

Computer can be used at home in the following ways:


a) Computer Aided Learning (CAL)
b) Distance Learning
c) Online Examination

--------------------------------------------------------------------------------------------------------------------------------
~ 30 ~ PhiriM Computer Science notes
7 DATA REPRESENTATION: Binary Systems in Computer systems
Everything in a computer is ultimately reduced to a series of zeros and ones.

Bit – A bit [short for Binary Digit] is the smallest unit of data that can be stored by a computer. Each
bit is represented as a binary number, either 1 [true] or 0 [false].

Byte – is the conversion of using groups of 8 bits as the unit of addressable computer storage.
They called this collection of 8bits or byte.

- A byte contains 8bits, so for example, it could be stored as 11101001.

A single keyboard character that you type, such as the letter A etc.. takes up one byte of storage.

Binary code - is the representation of a number in the binary system, which comprises only the
digits 0 and 1.

Word – Computer words consist of two or more adjacent bytes that are sometimes addressed and
almost are manipulated collectively.
The word size represents the data size that is handled most efficiently by a particular architecture.

-You see the character "A”; the computer sees 01000001.

-Combinations of zeros and ones are converted to languages that we can understand through the use
of the EBCDIC (Extended Binary Coded Decimal Interchange Code) or ASCII (American Standard Code
for Information Interchange).

7.1 Binary Number Systems


(a) Using up to 8 bits
- Convert denary numbers to their binary equivalent
- Convert binary numbers to their denary equivalents
- Adding binary numbers together and - Subtraction of binary numbers

A Review of the Decimal System


Any number not indicated its base value; by default it uses decimal (base 10) numbering system.
When you see a number like “123”, you don’t think about the value 123.456; rather, you generate a
mental image of how many items this value represents. In reality, however, the number 123.456
represents:
(1*102)+ (2*101) + (3*100) + (4*10-1) + (5*10-2) + (6*10-3)
Or
100+20+3+0.4+0.05+0.006

The Binary Numbering System


The binary numbering system works just like the decimal numbering system, with two exceptions:
binary only allows the digits 0 and 1 (rather than 0-9), and binary uses powers of two rather than
powers of ten. Therefore, it is very easy to convert a binary number to decimal. For each “1” in the
binary string, add in 2n where “n” is the zero-based position of the binary digit. For example, the
binary value 11001010 represents:

~ 31 ~ PhiriM Computer Science notes


Conversion of Denary to binary
Method 1

Method 2 – Convert 14710 to binary

128 64 32 16 8 4 2 1 Answer
1 0 0 1 0 0 1 1 100100112

Procedures to convert denary to binary


1. Select the number closer to 147 but not more than its value ---thus 128
2. Write 1; beneath the column value
3. Subtract 128 from 147 = 19
4. Select the number closer to 19 but not more than its value ---thus 16
5. Write 1; in beneath the column value of 16
6. Subtract 16 from 19 = 3
7. Select the number closer to 3 but not more than its value ---thus 2
8. Write 1; beneath the column value of 2
9. Subtract 2 from 3 = 1
10. Select the number closer to 1 but not more than its value ---thus 1
11. Write 1; beneath the column value of 1
12. Write 0 in the column values without 1

~ 32 ~ PhiriM Computer Science notes


~ 33 ~ PhiriM Computer Science notes
Binary Arithmetic
Arithmetic Modulo 2
Arithmetic modulo 2 uses two binary operands with no borrows or carries. The result is likewise
binary and is also a member of modulus 2 system. Because of this closure under addition, and the
existence of identity elements, mathematics say that this modulo 2 system forms an algebraic field.
The addition rules are as follows:
0+0 = 0
1+1 = 0 carry 1
0+1 = 1
1+0 = 0
1+1+1 = 1 carry 1

~ 34 ~ PhiriM Computer Science notes


Example 2.27 Find the sum of 10112 and 1102 modulo 2.
1011
+110
11012 (mod 2)
The subtraction rules are as follows:
0-0 = 0
1-1 = 0
0-1 = 1 MSN
1-0 = 1

e.g. (1000 – 001) e.g. (1010 – 011) e.g. (01001111 – 01100011)

1000 1010
– 001 – 011
0111 0111

8 DATA REPRESENTATION: Logic Gates

- A LOGIC GATE is a device that produces signals of 1 or 0 when the input logic requirements are met
and are used in manipulating binary information.
- A logic gate is a device (or electrical circuit) that performs one or more logical operations on one or
more input signals.
- Its output represent Boolean (T or F) or binary values (1 or 0) as voltages.
- Logic gates are the building blocks of digital technology.
- They can be used in applications like:
Building computer chips
Programming traffic signals
Chips for automatic alarm systems and Chips for automated control systems

~ 35 ~ PhiriM Computer Science notes


- Electronic circuits operate using binary logic gates.
- Logic gates process signals which represent TRUE or FALSE, ON or OFF, 1 or 0, +5V or -5V

Main Logic Gates


The main logic gates are:
(a) AND gate
(b) OR gate
(c) NOT gate
(d) NAND gate
(e) NOR gate

Logic gates are used with truth tables.


 A truth table is a table which shows how a logic circuit's output responds to various combinations
of the inputs, using logic 1 for true and logic 0 for false.
 A truth table is a table that describes the behaviour of a logic gate.
 It lists the value of the output for every possible combination of the inputs
 Truth tables contains 1s and 0s and are an integral part of logic gates functionality.
 Truth table and logic gates use the following:
- 1 (True, ON, Not False)
- 0 (False, OFF, Not True)

The number of rows in a truth table shows the number of combinations of the inputs of a
particular circuit. The number of rows for each gate is found using the following formulae:
rows = 2n , n being the number of inputs in the gate or circuit. For example, a gate or circuit
has the following rows corresponding to the number of input (excluding column headings):
- 1 input = 21 = 2 rows
- 2 inputs = 22 = 4 rows
- 3 inputs = 23 = 8 rows
- …..
--------------------------------------------------------------------------------------------------------------------------

Logic Gates - detailed explanation

Digital systems are said to be constructed by using logic gates. These gates are the AND, OR, NOT,
NAND, and NOR gates. The basic operations are described below with the aid of truth tables.

~ 36 ~ PhiriM Computer Science notes


(a) AND gate

Logic Gate Diagram Boolean Expression Truth Table

A.B

The AND gate is an electronic circuit that gives a high output (1) only if all its inputs are high. A dot
(.) is used to show the AND operation i.e. A.B. Bear in mind that this dot is sometimes omitted i.e. AB

(b) OR gate

Logic Gate Diagram Boolean Expression Truth Table

A+B

The OR gate is an electronic circuit that gives a high output (1) if one or more of its inputs are
high. A plus (+) is used to show the OR operation.

(c) NOT gate

Logic Gate Diagram Boolean Expression Truth Table

The NOT gate is an electronic circuit that produces an inverted version of the input at its output. It
is also known as an inverter. If the input variable is A, the inverted output is known as NOT A. This
is also shown as A', or A with a bar over the top, as shown at the outputs. The diagrams below show
two ways that the NAND logic gate can be configured to produce a NOT gate. It can also be done
using NOR logic gates in the same way.

~ 37 ~ PhiriM Computer Science notes


(d) NAND gate

Logic Gate Diagram Boolean Expression Truth Table

A.B

This is a NOT-AND gate which is equal to an AND gate followed by a NOT gate. The outputs of all
NAND gates are high if any of the inputs are low. The symbol is an AND gate with a small circle on
the output. The small circle represents inversion.

(e) NOR gate

Logic Gate Diagram Boolean Expression Truth Table

A+B

This is a NOT-OR gate which is equal to an OR gate followed by a NOT gate. The outputs of all NOR
gates are low if any of the inputs are high.

The symbol is an OR gate with a small circle on the output. The small circle represents inversion.

NB - The NAND and NOR gates are called universal functions since with either one the AND and
OR functions and NOT can be generated.

Note: A function in sum of products form can be implemented using NAND gates by replacing all
AND and OR gates by NAND gates.

A function in product of sums form can be implemented using NOR gates by replacing all AND and
OR gates by NOR gates.

~ 38 ~ PhiriM Computer Science notes


Table 1: Logic gate symbols

Table 2 is a summary truth table of the input/output combinations for the NOT gate together with
all possible input/output combinations for the other gate functions. Also note that a truth table with
'n' inputs has 2n rows. You can compare the outputs of different gates.

Table 2: Logic gates representation using the Truth table

Example

A NAND gate can be used as a NOT gate using either of the following wiring configurations.

(You can check this out using a truth table.)

---------------------------------------------------------------------------------------------------------------------------

Question Sample

Draw the circuit diagrams like the ones in the example above to show how a NOR gate can be
made into a NOT gate.

~ 39 ~ PhiriM Computer Science notes


---------------------------------------------------------------------------------------------------------------------------
Combinational Logic Gates
A combination of logic gates, which may be different, gives a logic circuit as given
below:

Boolean Expressions
Boolean Expressions are equivalent expressions of the logic state of gates. For
example, the Boolean expression for:
a NOT gate with input A and output C: C = NOT A

NAND and NOR gates are known as universal gates because they are inexpensive to manufacture
and any Boolean function (AND, OR, NOT) can be constructed using only NAND or only NOR gates.
Even NAND and NOR gates can be used as each other’s alternatives in a circuit.

Logic Gate Problems:


Question: Worked Example
A steel rolling mill is to be controlled by a logic network made up of AND, OR and NOT gates only.
The mill receives a stop signal (i.e. S = 1) depending on the following input bits:

A stop signal (S = 1) occurs when:


Either: Length, L > 100 metres and Velocity, V < =10 m/s
Or Temperature, T <=1000 C and Velocity, V >10 m/s

Draw a logic network and truth table to show all the possible situations when the stop signal could
be received.
~ 40 ~ PhiriM Computer Science notes
Answer
Step 1: Deduce and Write the logic statement
o The first statement can be re-written as: (L = 1 AND V = NOT 1) since Length > 100 metres
corresponds to a binary value of 1 and Velocity <=10 m/s corresponds to a binary value of 0
(i.e. NOT 1).

o The second statement can be written as (T = NOT 1 AND V = 1)

o Both these statements are joined together by OR which gives us the logic statement: if (L
= 1 AND V = NOT 1) OR (T = NOT 1 AND V = 1) then S = 1

o The above statement can be written as: S = 1 if (L = 1 AND V = NOT 1) OR (T = NOT 1 AND V = 1)

NB: the Student should first of all write the following logic statement before coming up with a truth
table or logic circuit as this has some marks awarded to it., i.e.
S = 1 if (L = 1 AND V = NOT 1) OR (T = NOT 1 AND V = 1)

Step 2: Logic Circuit


o Using the logic statement above, one can now draw the logic circuit as given below:

Step 3: Truth Table


- One can now draw the truth table, basing from the logic statement in Step 1.

Questions
1. A computer will only operate if three switches P, S and T are correctly set. An output signal (X =
1) will occur if R and S are both ON or if R is OFF and S and T are

~ 41 ~ PhiriM Computer Science notes


ON. Design a logic network and draw the truth table for this network.

2. A traffic signal system will only operate if it receives an output signal (D = 1).
This can only occur if:
Either (a) signal A is red (i.e. A = 0)
Or (b) signal A is green (i.e. A = 1) and signals B and C are both red (i.e. B and C are both 0)
Design a logic network and draw a truth table for the above system.

3. A chemical plant gives out a warning signal (W = 1) when the process goes wrong. A logic
network is used to provide input and to decide whether or not W = 1

A warning signal (W = 1) will be generated if


either : (a) Chemical Rate < 10 m /s
or (b) Temperature > 87 C and Concentration > 2 moles
or (c) Chemical rate = 10 m /s and Temperature > 87 C
Draw a logic network and truth table to show all the possible situations when the warning signal
could be received

4. A power station has a safety system based on three inputs to a logic network. A warning signal (S
= 1) is produced when certain conditions occur based on these 3 inputs:

A warning signal (S = 1) will be generated if:


Either : (a) Temperature > 120C and Cooling Water <= 100 l/hr
Or (b) Temperature <= 120C and (Pressure > 10 bar or Cooling Water < 100 l/hr)

~ 42 ~ PhiriM Computer Science notes


Draw a logic network and truth table to show all the possible situations when the warning signal
could be received.
5. Draw a circuit diagram for d = (xy' + x'y)z
6. Device a suitable Boolean expression and truth table for the circuit below:

7. Draw circuits for following Boolean statements.


a. If A AND B are on AND C AND D are on then output is on.
b. If A OR B are on AND C OR D are on then output is on.
c. If A OR B is on then output is off.
d. If B AND C is off OR A is on then output is on.
e. If A is off AND B OR C is on AND D is off then output is on.
f. If A is on AND B AND C are off AND D is on then output is on.
g. If smoke detector (S) is on OR fire alarm (F) is on then sprinkler (W) is on.

8. a. Simplify the following logic equations by using the rules of Boolean algebra.
a. A • C + A • B • C
b. (A + B) • (B + A)
c. A • (A + C) + C
b. For each of the previous questions, create a circuit for the Boolean expression before
simplification.

~ 43 ~ PhiriM Computer Science notes


9 DATA PROCESSING
It is the process of collecting data and converting it into information. It may be manual
(where only human effort is used), semi-manual where human effort is aided by an electronic
device or mechanical/electronic, where computers replace human effort.
Types of Data Processing
1. Centralised data processing
This is where data is sent to and processed at a central place.
Advantages of centralised data processing
a. All required information can be got from one place
b. Little distortion of information
c. Easy to manage and control
d. Cheaper to implement
e. Easier to enforce standards
f. Is not complicated
Disadvantages of centralised data processing
a. The whole system is disturbed when the computer is down.
b. Users of the system have little control over the data even their own.
c. Loss of data by the processing computer may mean loss of data at other points.
d. Needs specialists to set up and maintain the system and its environment.
e. Processing of data may be slow due to congestion at the central computer.

2. Distributed processing
Data is processed at different points in the organisation. Branch or department may have a
microcomputer or minicomputer that processes the information. The minicomputer in the branch
then sends to a host computer after processing.
HOST COMPUTER

1 2 3 4 5 6

Advantages of distributed processing


a. Data lost at any point may be recovered from the host
b. Faster processing of data
c. Processing may occur even if the host computer is down

~ 44 ~ PhiriM Computer Science notes


d. User have some control over their data
e. Problem can be solved at the different points

Disadvantages of distributed processing


a. The system needs expensive equipment and has high maintenance costs.
b. Management and control difficult
c. There is dada duplication at the different points
d. No uniformity of data
e. There is no overall control time

3. Batch processing
A central computer system normally processes all transactions against a central data base and
produces reports at intervals. In batch processing transactions are accumulated over a period of
time and processed periodically. A batch system handles the inputing, processing, job queuing and
transmission of the data from the remote sites with little or no user intervention. Batch processing
involves.
a. Data gathering from source documents at the remote site through the remote job entry
(RJE)
b. recording the transaction data onto some medium e.g. magnetic tape or disk.
c. Sorting the transactions into transaction files
d. Processing of the data
e. Updating the master file.

Advantages of batch processing


a. It is economical when large amounts of data are being processed
b. Suitable where reports and information is needed periodically.
c. Reduced risk of error due to the time involved in validation and verification.

Disadvantages of batch processing


a. Master files are often out of date
b. Immediate updated responses cannot be made.
c. Unsuitable where decisions and follow up transactions depend on the results of earlier
transactions e.g. in bank withdrawals and deposits.
d. Once the system fails all output is delayed.

4. On-line Processing
It is the input of transactions while the input device is connected directly to the main CPU of the
system. There is no necessity of a batch.

~ 45 ~ PhiriM Computer Science notes


Advantages of On-line Processing
a. Items can be input much easier and quicker.
b. Many errors are dealt with by the operator at entry
c. Time is saved because a batch does not have to be produced first.
d. User can recognise anomalies in the data being entered

Disadvantages of On-line Processing


a. The system may be more expensive than batch processing.
b. Sometimes accuracy of data depends on the operator who might fail to detect or prevent
some errors.
c. Sometimes source document are not used e.g. in the case of telephone orders.

5. On line Real time processing


It is the continual receiving and rapid processing of data as to be able to feedback the result of that
input to the source of that data. There is no delay between the input of a transaction and the
updating of the master files for the transaction. The only delay is for the necessary validation and
verification of the data. This allows for immediate processing of data and results generated to
provide immediate output to users. Data does not have to wait, as is the case under batch
processing.

Data is fed directly into the computer system from on-line terminals without the storing, sorting
(these are done on-line)

Advantages of On line Real time processing


 Processing is instantaneous
 Files and databases are always up to date

Disadvantages On line Real time processing


 The systems are expensive to and complex to develop and put up.
 Data with errors may be processed with damaging effect.
 Hardware costs are high, there is need for on-line terminals, more CPU power, large on-line
storage and back up facilities.

6. Time Sharing Processing


Processor time is shared between users to provide multi-access (many users accessing data at the
same time). This can be done by minicomputers and mainframe computer systems.

~ 46 ~ PhiriM Computer Science notes


Advantages of Time Sharing Processing
a. Each user is given a chance
b. More than one person can use the computer at the same time.
Disadvantages of Time Sharing Processing
The user may not require a service at the time his slice is given - this results in too much excess
capacity at some periods.

9.1 THE DATA PROCESSING CYCLE

1. Data Acquisition 2. Input / Capture


(From source Documents)

5. Output Communication 4. Storage 3. Processing

Stage 1: Data acquisition


This is the collection of data from source documents for input into the computer system.
Stage 2: Input/Capture
Input/Capture - This is the putting of the acquired data into the system e.g. through typing,
scanning, or other forms of input.
Validation - the quality of the data is checked before it is entered or processed and errors detected
and eliminated.
Verification - data is checked for mistakes in copying so that it is correct.
There may be gabbage in and gabbage out (GIGO) meaning that information systems will produce
erroneous output if provided with erroneous input data or instructions. To avoid GIGO common
validation is done:
a. Checking data reasonableness, e.g. pregnancy for a three year old would be unreasonable.
b. Checking data consistency - e.g. it would be inconsistent to record a pregnant male.
c. Checking range units e.g. it would be impossible to have 30hours worked by one worker in a
day.
d. Timeliness - that data is not out of date.

Stage 3: Processing
This is the key part of the cycle where data is converted into information. This is where calculations
and other logical and manipulative operations on the data are done. Specific applications are used
to process the data e.g. word processing, spreadsheet, payroll packages etc

~ 47 ~ PhiriM Computer Science notes


Stage 4: Storage
Information is stored on various storage media including hard disks, floppy disks, magnetic tapes etc.

Stage 5: Output
The processed information is eventually displayed for use by the user through the various output
systems - printers, VDUs, sound cards & speakers.

9.2 DATA PROCESSING PERSONNEL


The job involving the capture, processing and output of data and information involves a number of
people. Sometimes there may be one person to do this and often there may be a department solely
responsible for data processing or for Information technology.

The data processing department interacts with all other departments from where it gets data and
for whom it processes and eventually provides the information to.
The main functions of a DP department are:
a. Design and install a custom built system of data capture and processing.
b. Provision of advice to the organisation on matters regarding the processing of information
e.g. the selection of the correct devices for input, process, storage and output.
c. Provides advice on the installation of a package or information system
d. Manage the organisation's data processing resources.
A typical DP/IT department

Data Processing Manager

Systems Manager Programming Manager Operations Manager

DBA BA SA TA AP SP DPS SL DPL

CO CO CO CO CO CO

Key: DBA -Database Administrator; BA - Business Analyst; SA - System Analyst


TA -Technical Analyst; AP -Application analyst; SP -System Programmer
DPS -Data control Supervisor; SL -Shift Leader; DPL -Data Processing Librarian
CO -Computer Operator

~ 48 ~ PhiriM Computer Science notes


PERIPHERAL DEVICES CONTROL
A peripheral is any hardware connected to the central processing unit (processor),
e.g. mouse, printer, etc. Peripherals can be controlled in a number of ways that will
provide continuous job processing sequence. These include:
1. Buffers: This is a temporary memory store for data awaiting processing or output, compensating
speed at which devices operate, for example printer buffer. Buffering is appropriate where an output
device processes data slower than the processor. For example, the processor sends data to the
printer, which prints much slower and the processor does not need to wait for the printer to finish
printing in order for it to carry out the next task. The processor therefore saves the data, awaiting to
be printed, in a buffer where it will be retrieved by the printer. Buffering usually match devices that
work at different speeds, e.g. processor and disk.

Reasons for using printer buffers:


- Stores data or information being sent to the printer temporarily.
- Compensates for difference in speed of CPU and printer.
- Allows CPU to carry out other tasks whilst printer is printing.

Benefits of increasing size of buffer in a printer:


-Reduces the number of data transfers to the printer.
- Ensures a more efficient use of the CPU.
- Larger files can be sent to the printer without problems

2. Interrupts: An interrupts is a signal send to the processor by a peripheral for attention to be


turned to that peripheral, thereby causing a break in the execution of a program, e.g. printer out of
paper. Examples/types of interrupts include:
 Input / output interrupt e.g. disk full, printer out of paper, etc.
 Arithmetic and Logic Unit error.
 Clock (happens normally in time sharing systems where the clock transfers control from one
computer to another.)
 Program Interrupts: Arithmetic overflow, division by zero, etc
 Hardware Failure: can be caused by power failure or memory parity error

If two devices interrupt the processor at the same time, interrupt priorities will be used. That is,
an interrupt with a higher priority is handled first than that with a lower priority.

3. Polling: A process whereby the processor interrogates peripherals to determine if they are in a
certain condition (or are present). Polling can take place during booting, where the processor checks
the connected devices like keyboard, mouse, hard disks, etc. It also occurs in time-sharing systems
where the processor checks if the terminal has anything that needs processing.

4. Spooling (Simultaneous Peripheral Operating On-line)


A process of transferring data from processor into temporary and faster access storage
awaiting release to a slow output device, for example to a printer. Jobs from different users can be
queued until the printer is ready to print.

5. Handshaking: It is the exchanging of signals to establish communication link between two


devices/computers, for example modem and computer. It is a protocol for establishment of a link
between two communicating devices. This controls movement of data between the computer
~ 49 ~ PhiriM Computer Science notes
devices, e.g. modems. The device engages in something like a dialogue to acknowledge receipt of
data. Can also be called ThreeWay Handshake procedure

6. Scheduling: This is whereby the processor decides the loading and execution of programs to
provide continuous job processing sequence. Scheduling can do this by giving time slices to each
computer or by queuing jobs. A number of scheduling algorithms can be used; e.g Shortest Job
First, Shortest Remaining Time, Round Robin, First Come First Served, etc. Scheduling generally
ensures that:
 No resource is heavily under-utilised or over-utilised.
 The maximum number of interactive users get a reasonable response time.
 Making sure that no job is pushed to the back of a queue.
 Getting maximum number of jobs done in the minimum amount of time.

*NB: Directory: - a folder used to store other folders and files in a hierarchical structure.
Directories are usually created in MS-DOS systems.

~ 50 ~ PhiriM Computer Science notes


MALWARE
Malware (malicious software) is code or software that is specifically
designed to damage, disrupt, steal or inflict some other “bad” or illegitimate
action on data, hosts, or networks.
Malware can be prevented using the following means:
a) Use of audit trails to detect Trojan horses
b) Backing up data to recover it after it has been destroyed or corrupted
c) Use of antivirus programs
d) Use of firewalls
e) Use of anti-spyware.

Spyware is a program that detects programs that run on the background without
knowledge of user in order to steal data from the user,
e.g. stealing passwords, account details, etc. Spyware is mostly used for the purposes of
tracking and storing Internet users' movements on the Web and serving up pop-up ads to
Internet users. Spyware does not self replicate

Types Of Malware
Types of malware includes: Worms, Trojan Horses and Viruses.
1. WORM
A malicious program capable of reproducing itself and spread from one computer to the
next over a network and consume computer resources like memory and CPU. It does not
delete files as viruses do. Worms travel unaided through the computer network. It
does not require a host file or human assistance for it to spread.
2. Trojan Horses
These are malicious programs that appears as programs useful to the user with the
intention of soliciting information like user accounts and passwords or damaging
computer system files and desktop settings. It can also allow other users to access
confidential information from your computer. They do not self-replicate.

3. COMPUTER VIRUSES
A computer virus is a malicious program which attaches itself to computer file,
replicates itself, damages, destroys or corrupts files and memory of the computer, for
example, boot sector viruses. Computer viruses spread with human action, e.g. run an
executable file. Viruses also need a host file to attach to it for it to spread. By
replication, it means that the virus can multiply itself (produces several similar copies of
itself) when it enters the computer system. Examples of known viruses are: Virus Melissa,
Jerusalem, Cascade, etc.

Signs and symptoms of virus attack on a computer:


a) Reduced system performance (reduced speed of operation).
b) The computer displays nasty messages on the screen.
c) The computer displays a blank screen.
d) The computer system produces wrong results of a process.
e) Unexplained and frequent loss of data held in the computer.
f) The hard disk becomes inaccessible (the user cannot access data held in the computer).
~ 51 ~ PhiriM Computer Science notes
g) The computer fails to boot.

Effects of computer viruses:


a) Memory of a computer will be used up, slows down computer.
b) Alters system settings.
c) Erases and corrupts files and data on the computer.
d) Infects other computers on network.
e) Leads to production loss.
f) Leads to financial loss.
g) The hard disk becomes inaccessible (the user cannot access data held in the computer).
h) The computer fails to boot.
i) The computer system produces wrong results of a process.

Methods by which viruses spread from one computer to another


 By sharing diskettes, compact disks, hard disks, memory sticks, memory cards, Video
compact disks, Digital Versatile Disks, etc, with external users.
 Through networked computers, that is on a LAN, WAN or the internet.
 Can come as e-mail attachments, especially emails from unknown sources.
 Can come with downloads from bulletin boards

Methods of preventing virus attack on the computer


a) Avoiding sharing external diskettes, compact disks, hard disks, memory sticks, memory
cards, Video compact disks, Digital Versatile Disk.
b) Installing firewall
c) Install the latest antivirus program on the computer and upgrade it frequently.
d) Scan the computer with the latest antivirus frequently.
e) Avoid software distributed as shareware (freeware) (software produced for
distribution free of charge and can be distributed to others free of charge, e.g. computer
games).
f) Avoiding downloading software from bulletin boards.
g) Use disk free workstations.
h) Do not open email attachments from unknown sources or download doubtful software
from the Internet.
i) Do not use files that come from unknown sources.
j) Buy original software and do not buy pirated software.
k) Disable compact disk drives, diskette drives and USB ports of the computer.

Antivirus programs
These are programs that detect computer viruses and reduce the risk of computers being
attacked by viruses for example Norton Antivirus, MacAfee, Avira, Avast, AVG, etc.

Types of Computer Viruses include:


Boot sector Viruses; File sector Viruses; Direct Action Virus; Macro Virus etc.

~ 52 ~ PhiriM Computer Science notes


12 COMPUTER NETWORKS
Definition of Terms
a. Network: A connection of computers for them to share data, files and resources like a printer.

b. Data communication: The process of transferring data through networked computers

c. LAN [Local Area Network]: the computers are all in the same building or on one site, connected
together by hubs and switches using cables.

Computers and peripheral devices are linked via a direct physical connection [cable] or wireless
connection. A LAN can be connected to other LANs, or to WAN.

d. WLAN [Wireless Local Area Network]: A Wireless Local Area Network or WLAN is a LAN whose
devices are connected by wireless rather than cable.

e. WAN [Wide Area Network]: the computers are spread over a large geographical area connected to
each by using fibre-optic cable, telephone lines, radio transmitters or satellite links.

f. Metropolitan Area Networks [MAN]: MAN, covers a city. The best-known example of a MAN is the
cable television network available in many cities.

g. Personal Area Networks [PAN]: is a computer network organized around an individual person,
and that’s setup for personal use only.

h. Handshake: When the computer wants to communicate with a device it is important that rules are
established for the communication. This must be done before communicating and is known as
handshaking.

Advantages of Networking
a) Expensive peripherals like printers and scanners can be shared between users.
b) Messages can be sent easily and faster between users whether on WAN or LAN.
c) Avoids duplication of information as users can access the same file on the network.
d) Network software can be purchased cheaply than buying individual packages for each computer.
e) It is possible to access data or programs from any terminal or workstation.
f) Data and programs can be stored centrally making it easier to maintain and backup.
g) Users can be easily prevented from accessing files not intended for them.
h) Allows sharing of files, software and data held in computers.
i) Allows emails to be sent between users.
j) It easier to setup new users and equipment
k) It allows the connection of different types of computer, which can communicate with each other.

~ 53 ~ PhiriM Computer Science notes


Disadvantages of Networking
a) Sophisticated equipment is needed, which may be expensive to buy.
b) As traffic increases on the network the performance degrades unless it is properly designed.
c) Security of data can be a problem due to hacking.
d) Wiring can be expensive both to buy and to install; wiring can be sunk on the ground to avoid
trailing cables.
e) If a server breaks down, the whole network becomes unusable.
f) Networks need experienced network managers, who will be highly paid to keep the network
running.

Definitions in Networking
Router
Hardware allowing computer to access the Internet using a phone line.

Modem (Modulator/Demodulator)
Hardware used to change analogue signals from the phone line into digital signals needed by the
computer, also used to change the signals from digital to analogue.

Browser
Soft ware used to find and look at information on the web. Each web page has its own unique
address known as a Universal Resource Locator (URL).

Video conference
Webcam and microphone used to allow people to communicate with each other.

Hubs and switches


Similar hardware in a network which distribute signals between the server and the individual PCs.
A hub sends the signal to all the devices on the network and only one individual PC will accept the
signal. A switch sends the signal to only the one individual PC by specifying the individual address.

Bridge
A bridge allows two different types of network to communicate with each other.

Data Transmission Modes


These are ways through which organisations can communicate via the channel or transmission
media. Three types of data transmission are simplex, half-duplex and full duplex transmission.

a. Simplex transmission
Transmission takes place only in one direction. These are not suitable for long distance
transmission because there is need for acknowledgement or error messages. It is used in the
computer - printer communication. This is also used in radio and television transmission.

~ 54 ~ PhiriM Computer Science notes


b. Half Duplex
Messages can be sent both ways but only one way at a time. The channel alternately sends and
receives data but these are not done at the same time. The same device is used for both sending and
receiving. This is used in two-way radio communication. Example of half duplex: a phone
conversation between two people where one person speaks at a time.

a. Full Duplex
This permits simultaneous transmission of messages in both directions. Sending and receiving can
be done at the same time using the same devices. Example: broadband connection on a phone line.
This is the mode used in modern telephone or cellular transmission.

Serial and parallel data transmission


Serial Data Transmission is when data is sent, one bit at a time, over a single wire or channel (bits
are sent one after the other in a single stream).
An example of its use is sending data from a computer to a modem for transmission over telephone
line.
Parallel Data Transmission is when several bits of data (usually 1 byte) are sent down several
wires or channels at the same time, one wire or channel is used to transmit each bit.
An example of its use is when sending data to a printer from a computer using a ribbon connector.

Network Topology [LANs Network shape]


Computers can be linked together to form networks. The shape of the network is determined by the
way in which the links are made.

1. Star network
• Every networked device has its own physical link with the hub or switch.
• This means that if one network device crashes, or there is a fault in the network cable, all the
other stations are still able to function correctly.
• This type of network is fast, reliable and inexpensive and is the most common.

Star Topology diagram


~ 55 ~ PhiriM Computer Science notes
Advantages of Star Topology Disadvantages of Star Topology
a. It is easy to trouble shoot a. It is prone to failure - failure of the node mean
b. It is economic and offers intensive use of the loss and breakdown to the whole system.
terminals b. The cabling may be costly
c. Requires a single intelligent computers, c. Viruses can be transmitted easily within the
terminals could be dump thereby saving on the network
cost of the network.
d. Each terminal has direct and quicker access to
the host

2. Bus network
• All networked devices are connected to a cable known as a bus.
• Any break in the bus causes serious problems.
• Needs terminators at each end of the bus.
• Superseded by star networks.

or
Bus Topology diagram

Advantages of Bus Topology Disadvantages of Bus Topology


a. Costs of setting up and maintaining the a. Risk of network malfunction
network are low. b. Are more troublesome than the star topology.
b. Each terminal can communicate directly with c. Trouble shooting is more difficult.
any other on the network. d. There is the risk of data collision.

3. Ring Topology
It is made up of a series of nodes connected to each other to form a closed loop. Each loop can
accept data transmitted to it from an immediate neighbour and forward data not addressed to it to
the next neighbour. Messages are transmitted in packets or frames. Each node has an address and
packet is delivered to the node bearing the address required.

~ 56 ~ PhiriM Computer Science notes


Ring Topology diagram

Advantages of Ring Topology


a. There is by-pass technology so that messages can be passed on from a failed workstation -
breakdown of a workstation does not affect the network much.
b. It is easy to install
c. There is less risk of packet collision d. More accurate and reliable

Disadvantages of Ring Topology


a. There is poor response time
b. There is risk of data interception so there should be data encyption.
c. Unwanted data may continue to circulate the network, thus reducing traffic carrying capacity of
the network.

4. Mesh Topology
This topology combines the ring and the star topologies. Bi-directional links are established.

Mesh Topology diagram


This offers better communication and reduces the risk of data collision because of the existence of
alternative routes. The network has quick response time and is very accurate. However, the costs of
the cabling are quite considerable.

Wide area networks


Computers in a WAN are oft en connected to each other using communication media provided by a
third party. An example would be a telephone company providing links via telephone cables or via
broadband facilities.
A WAN may interconnect several LANs. If a LAN needs to be connected to a WAN a special gateway
needs to be set up.
~ 57 ~ PhiriM Computer Science notes
Network security
a) Access to networks and data can be kept secure by authenticating users with their userID and
password.
b) Unauthorised access can be reduced by allowing different users different levels of access.
c) Data encryption gives another level of data security.

The Internet and intranets


The Internet is a communications system linking computers across the world – a network of
networks. Data is passed from computer to computer, from server to server, until the required
destination is reached.
Individuals need to use an ISP (Internet Service provider) to access this network.
An intranet is similar to the Internet but is limited to a particular organisation. It will be tightly
controlled by the organisation.

Requirements for connecting to the Internet


i. Hardware such as Modem; Router; Gateway
ii. Software such as Web browser and Email client

Dangers from the Internet / Network Security


1• Hackers – can be prevented by using firewall soft ware.
2• Viruses (spread via email, unsafe links on web pages)– can be prevented by anti-virus programs.
3• Access to inappropriate material or information.
4• Spamming
5• Phishing
6• Pharming; 7• Adware; 8• Cookies
Advantages of using Internet
a. Easy communication and data exchange with other people.
b. Enables people to work from home (teleworking).
c. A vast amount of information can be accessed.
d. Up-to-date information available immediately.

Disadvantages of using Internet


a. Much of the information isn’t checked and may be wrong.
b. A large amount of undesirable material is readily available.
c. Data can be intercepted and put to illegal use.
d. Risk of hackers or viruses being able to damage your computer.
e. Privacy and security of data difficult to maintain.

Electronic Mail [Email]


- E-mail addresses have an @, for example, nkulumanehighsch@gmail.com .
-One can send and receive messages the same way an ordinary letter is sent and received.
E-mail messages are sent from user to user on a computer network with message being stored in
the recipient’s mailbox or inbox.
~ 58 ~ PhiriM Computer Science notes
E-mail allows for the sending of attachments.
Advantages of e-mails as compared to ordinary mails [Nov 2007 QP2]
1. It is very fast in sending messages (can be delivered promptly while ordinary mails can take
days to reach their destination).
2. It is very cheap to send e-mails since there is no need for envelopes, stamps, paper and pen,
which are needed in conventional mail.
3. They are reliable since e-mails rarely get lost.
4. E-mails are time independent as they can be send any time of the day other than conventional
mails which can be send during the normal working hours.
5. E-mails allow multiple addressing, that is, one e-mail message can be send to several recipients
simultaneously without having to retype it.
6. E-mails can be saved for future use or reference.
7. E-mails are more convenient to use as there is no need to travel to the post office or to shops to
buy stamps and envelopes.
8. In e-mails, attachments in form of reports, scanned documents, pictures and curriculum vitae
can easily be attached to the e-mail.
9. there are no language problems (systems can translate messages sent)
10. it is possible to read emails whenever you want - there are no issues of time differences as
would be the case with video conferencing. If some delegates lived in the USA and the others
lived in India, for example, the time difference is 10 to 14 hours which could be a problem)

Disadvantages of e-mail as compared to ordinary mails


1. Not everyone has equipment to send e-mails.
2. Junk mail (spam) is a problem.
3. You waste a lot of time looking through mails that are just adverts.
4. E-mails are not as secure as traditional mails.
5. The system relies on people checking their mails regularly.
6. People with technophobia feel left out as they consider themselves unwilling to learn.
7. Equipment used to send and receive e-mails is very expensive as compared to traditional
methods.

Intranets
Intranet – Is a privately operated WAN, like the Internet, except that the data content is controlled
and access to it is also controlled
Advantages of intranet
Tight control by the owning organisation so that:
a. Views posted are relevant.
b. Information will be useful, accurate and relevant.
~ 59 ~ PhiriM Computer Science notes
c. The amount of information is limited so it is easier to search.
d. Safety from inappropriate material.
e. Less susceptibility to hackers and viruses.
Disadvantages of Intranet
b. Low volume and variety of information.
c. Tend to have a single view.

Extranet: It is an intranet made available off -site to members or business partners of an


organisation. It is an extension of the intranet giving authorised outsiders controlled access to the
intranet.
The difference between Internet and Intranet
Internet Intranet

the INTERNET is INTERnational NETwork an INTRANET is INTernal Restricted Access


NETwork
Internet gives all information including that the intranet only gives local information relevant
which is not relevant to the organisation to the company/organisation it is not
Always need external modems for internet always necessary to have external modems when
connections using intranets
Information on internet saved in different information for use on intranets is stored on
computers local servers
the internet can be accessed from anywhere Intranet is accessed within the range of the
organisation’s network
the internet is available to anyone without whereas the intranet requires password
password restriction entry

WIRELESS TECHNOLOGY (WIFI) AND BROADBAND


Broadband: a communications network that provides for high quality and high speed voice, data and
video transmission usually over one channel in wireless networks or over high bandwidth media
like fiber optics and satellites.

Wireless Communication:
This is a method of networking (linking) computers and computer devices without the use of
cabling (wires), e.g. using Bluetooth, radio, satellite, infra-red, microwave, etc. The devices that can
be used in wireless technology include:
- Mobile phones /cell phone/remote key pad/remote control/ remote keyboard. - Infra-red mouse.
- Multimedia mobile handsets and notebooks.
- GPRS (General Packet Radio Service) modems.
- Wireless LAN(or Wi-Fi -Wireless Fidelity: A local area network that uses high frequency
radio signals to transmit and receive data over distances of a few hundred feet; uses Ethernet
protocol).
- PDAs (personal digital assistants).

~ 60 ~ PhiriM Computer Science notes


Advantages of wireless communication
-Cheaper as no wires are needed for networking.
- Ensures fast wireless Internet access.
- Wireless LAN is faster than a modem or mobile.
- Wireless LAN enables working at home.
- Users can create and send multimedia messages to mobiles or e-mail while in transit.
- Ensures instant transmission.
- Users can download e-mail and file attachments while on mobile. Users can watch live web cast on
mobile.
- Users can listen to streaming video on mobile.
- Users can watch news, weather, sport, games while travelling.
- Users can access information from mobile anytime.
- Users can send, receive, delete e-mail while travelling.
- Users can view business appointments while out of office on mobile.
- Users can send corporate e-mail while out of office - even behind a firewall on mobile.
- Users can use wireless internet connection from chat rooms for discussions with colleagues while
travelling.

Most areas in the world now offer broadband rather than dial up for connecting to the internet.
The advantages of broadband over dial up include:
- the system is always “on”-no need to dial into ISP every time you want access
- the connection rate/data transfer rate is much higher (for example broadband operates at 11 000
kbps compared to the dial up rate of 60 kbps)
- there is a flat monthly rate with broadband (dial up is charged per hour of usage)
-it is possible to use the telephone at the same as the internet with broadband/the line isn’t tied up
-broadband permits other facilities such as “skype”
- Wireless technology (WiFi) allows connection of a computer to the Internet without the need for
connecting cables. A router (containing a modem and external aerial) is connected to a
telephone line and it is then possible for any computer within range to communicate with the
router and allow Internet access - the link between computer and router is completely
wireless.. The main advantage of doing this is clearly the portability (i.e. can go anywhere
within range since no wires are needed).

Disadvantages of Wireless Technology


- Wireless LAN speeds are slower than Net access at work due to narrow bandwidth.
- Anyone within the Wireless LAN nodes range with an appropriate device can use your Wireless
LAN and broad band link.
- Anyone who walks past your house or WLAN linked into a corporate system can access sensitive
information like credit card details.

~ 61 ~ PhiriM Computer Science notes


- 3G phones are not compatible with 2G phones.
- Signals can be blocked, distorted or will be weak.
- Can lead to health problems from microwaves
- the range can be very limited, e.g. using Bluetooth.
- possible interference from nearby electronic devices
- security issues (i.e. tapping illegally into WiFi networks) is very common
- access speed/transfer rate is often slower using wireless systems
It isn’t just computers that can be linked without wires, various peripheral devices can be linked
to a computer system without the need for a physical, wired connection. For example:
Printers; Keyboards ; Mouse ; Digital cameras
---- --- -----------------------------------------------------------------------------------------------------------------------
NETWORK PROTOCOLS
Definition – these are data communication rules governing the exchange of information on a
network.

TCP/IP Model
TCP/IP is a large collection of different communication protocols based upon the two original protocols TCP and IP. Below are
some of the protocols

TCP - Transmission Control Protocol


TCP is used for transmission of data from an application to the network.
TCP is responsible for breaking data down into IP packets before they are sent, and for assembling the packets when they arrive.

IP - Internet Protocol
IP takes care of the communication with other computers.
IP is responsible for the sending and receiving data packets over the Internet.

HTTP - Hyper Text Transfer Protocol


HTTP takes care of the communication between a web server and a web browser.
HTTP is used for sending requests from a web client (a browser) to a web server, returning web content (web pages) from the
server back to the client.

HTTPS - Secure HTTP


HTTPS takes care of secure communication between a web server and a web browser.
HTTPS typically handles credit card transactions and other sensitive data.

-- --------------------------------------------------------------------------------

~ 62 ~ PhiriM Computer Science notes


OSI Model

Comparison of OSI Model in relation to the TCP/IP Model

~ 63 ~ PhiriM Computer Science notes


13 SECURITY AND ETHICS
.1 Data Security
Definition – data security is about keeping data safe. Many individuals, small
businesses and major companies rely heavily on their computer systems.

If the data on these computer systems is damaged, lost, or stolen, it can lead to disaster.

Key threats to data security


Data may get:

a. lost or damaged during a system crash – especially one affecting the hard disk
b. corrupted as a result of faulty disks, disk drives, or power failures.
c. lost by accidentally deleting or overwriting files
d. lost or become corrupted by computer viruses.
e. hacked into by unauthorized users and deleted or altered.
f. destroyed by natural disasters, acts of terrorism, or war.
g. deleted or altered by employees wishing to make money or take revenge on their employer.

There are four main threats to the security of data:

1. Accidental damage
Data stored on magnetic media such as disks or tapes can easily e damaged by poor
storage, dirt, heat or magnetic fields generated y televisions or loudspeakers.

Computer equipment can e damaged by acts of nature such as fire or floods.

People using computer system can easily delete the wrong file from a disk or the wrong
record from a database y selecting the wrong option in a software package.

2. Data theft
Important data such as a list of a company’s customers or information about how products
are produced could e stolen and sold. Often such data is stolen by employees of the
company who have legitimate access to the data. Disgruntled employees can also sometime
destroy or change important data.

3. Hacking
Sometimes computer “hackers“deliberately gain unauthorized entry to computer systems.
They can delete files or change the data stored in them.

4. Computer virus
Computer viruses can deliberately delete or damage data stored on a computer.

SECURITY MEASURES TO REDUCE THE RISKS

Companies and organizations should take appropriate measures to ensure that the data
they store remains secure. The most appropriate measures to use will depend on:
~ 64 ~ PhiriM Computer Science notes
-How important the data is.
-How confidential the data is.
-How likely it is that someone will want to steal, change or destroy the data secure to
comply with the Data Protection Act.
Some of the more measures used to ensure data security are described below:

Physical Protection
The risks of losing valuable data can be reduced or even eliminated by making your
equipment more secure by for example doing the following:

-Lock the room when not in use


-use swipe cards or keypads to activate locks
-CCTV video cameras
-In large firms, security guards.

Safe Storage of Data


Often important data is kept in fireproof, waterproof safes. Good quality disks or tapes
should be used to store data and be kept in dust-free environment that is not too hot and is
nowhere near any magnetic fields.

Limiting physical Access to Computers


By keeping the system locked in a room. Unauthorized people should not be able to access
the computers. This would not however stop an employee who had the authority to access
the computer room from causing deliberate or accidental damage or stealing important
data.

A further limitation of this solution is that it is not always possible to limit access to a
computer system physically. Some systems such as Automatic Teller Machines [ATMs] used
by banks to dispense money have to be available for the public to use. Also, many
computers are connected to networks and can be accessed from other computers on the
network.

Biometrics

Biometric means to measure and analyse some human characteristic in order to correctly
identify an individual. Examples of physical characteristics which can be used are:

- fingerprints, - voice patterns, - retinas or irises, - facial patterns, - palm prints

To use biometrics an organization needs:

 A reader or scanning device that takes a biometric reading from a person


 Software that can convert the scanned information into digital format for the computer
to use. This computer identifies the ‘match points’ from the digital information

~ 65 ~ PhiriM Computer Science notes


 Once match points have been identified the data is compared to all of the records held
in the company biometric database. If a matching record is found the individual can be
positively identified.

However, biometric systems are far from being foolproof. Most systems have a significant
number of false accept rates and false reject rates. This might be a reason as to why they
are not yet as widely available as a physical method of security as many other conventional
method.

Software Protection

Firewall
A firewall is a program or hardware device that filters the information coming through the
Internet connection into your personal computer or into a company’s network.

It is set up to allow mainly one way access, i.e. you can go access internet web pages, but it
checks everything coming back against set rules. If the data coming back is from an
unauthorised source, then it is blocked. [That is the firewall in action]

User Name and Password Security Systems


If a password system is in use then before you can access a computer system you must
enter a valid username and password. The process of entering this information and being
granted (or refused) access to a computer is known as logging on.

Proxy servers
A proxy server is dedicated computer or software system running on a computer that acts
as an intermediary between an endpoint device, such as a computer and another server
from which user or client is requesting a service. The proxy server may exist in the same
machine as a firewall server or separate server which forwards requests through the
firewall.

Logs /audit log file


One effective way of deterring authorised users from damaging or stealing data from a
computer system is to get the system to keep logs of all the actions that each user carries
out.

All of the actions that the user carries are stored together with their username in a log.

Encryption
Encryption is a process of putting a file or document into a coded form. If a file has been
encrypted then unless you know what the code used to encrypt the file is, you will not be
able to use its contents.

~ 66 ~ PhiriM Computer Science notes


Backups
Whatever measures are implemented to try and avoid data being deleted or change, it is
impossible to guarantee that this will not happen. Therefore it is vital that extra copies are
made of important data. A regular backup procedure should be implemented.

Backups should be kept away from the computer room so that they will not be damaged by
fires/floods etc. The type of backups that are kept usually depend on the type of processing
being carried out:

1. Batch Processing systems use the Grandfather-Father-Son or Ancestral backup system.

2. With Transaction Processing systems a regular backup of the master file is made. As
transactions are carried out details of each transaction are stored in a transaction log file. If
the master file becomes corrupted the latest backup master file and the transaction log file
can be used to recreate it.

3. In Real-Time systems there is often little point in keeping backups of data. However
much backup hardware is used to reduce the likelihood of system failing. Sometimes
backing up data to disk can be useful in real-time systems. For example an aeroplane “black
box” can e used to analyse why the system failed…….

Virus Checking
Viruses can get onto a computer from infected floppy disks, over a network or over the
internet. Virus checking software can e installed on a computer to examine all the files that
are accessed, checking them for viruses. It virus is fount the virus checker will attempt to
remove it. The virus checker may not however be able to recover ant data that has already
been damaged by the virus.

Disaster Recovery Plans


No matter how secure you attempt the computer systems and data; things will always go
wrong, hence a need for a disaster recovery plan.

Disaster Recovery Plan will detail the procedures that should be followed to minimise any
further damage once disaster has occurred. It will also include the procedure which will be
used to attempt to repair or restore as much of the system as is possible.

SSL [‘Secure Socket Layer’]

SSL stands for ‘Secure Socket Layer’. It is a web browser security technology. SSL is built
into a web browser. SSL allows confidential data to safely pass from your web browser to a

~ 67 ~ PhiriM Computer Science notes


distant server via the internet. The confidential data is ‘encrypted’ or scrambled so that
only the server can read it.

Keeping data secure


Measures that can be taken to keep data secure include

a. Making regular backups of files


b. Running anti-virus software
c. Using a system of passwords so that access to data is restricted
d. Safe storage of important files stored on removable disks, e.g. locked away in a fireproof
and waterproof safe.
e. Allowing only authorised staff into certain computer areas, e.g. by controlling entry to
these areas by means of ID cards or magnetic swipe cards
f. Allowing logging off or turning terminals off and if possible locking them
g. Voiding accidental deletion of files by write protecting disks
h. Using data encryption techniques to code data so that it makes no apparent sense.

13.2 Computer Ethics


Computer Ethics is set of moral principles that regulate the use of computers. Some
common issues of computer ethics include intellectual property rights (such as copyrighted
electronic content), privacy concerns, and how computers affect society.

13.3 Legal issues relating to the use/ misuse of ICT, the constraints placed on individual
a• Computer crime – that is, crime is only possible because of widespread use of ICT systems and
networks – has increased in variety and extent.

b• Software piracy – is the unauthorised copying using or selling of software without an


appropriate license.

c• Copyright violation – using the Web you can download music, books etc. The copyright to some
of this material is restricted to its owners. They may sell you the right to copy it, but if you copy it
without permission this is effectively theft.

13.4 Legal constraints on use of information [THE DATA PROTECTION ACT (1984)]
This tries to regularise the use of automatically processed individual information by organisations.
The Act outlines some of the following rules:
a• Data about individuals must be obtained fairly and lawfully for the purpose collected for.
b• Data must be used only for the specific purpose collected for and may only be disclosed in
accordance with such a purpose.
~ 68 ~ PhiriM Computer Science notes
c• Data collected must not be excessive for the purpose collected for but must be adequate and
relevant.
d• Data collected must be accurate, up-to-date.
e• Data should not be kept for longer than is necessary for the purpose it was obtained.
f• Data must be protected from unauthorised access or loss.
g• Individuals with collected data have the right to view it and make alterations where necessary.

13.5 Personal Responsibility on the Internet


-be cautious who you share personal data, -no plagiarism, -don’t download copyrighted software, no hacking, etc..

Implications of Computer Application


The following are some of the effects of use of computers (computerisation): deskilling,
electronic scabbing, new production methods, new products and services, health and safety,
changes in working environment, unemployment, retraining
- Many people lose their jobs leading to high levels of unemployment.
- Huge profits are made by companies that engage in electronic commerce (the advertising, buying
and selling of goods and services on the internet) and industrial automation.
- High productivity of high quality goods.
- Cheaper goods have been produced by companies.
- Cheaper, faster and more reliable means of communication have been realised.
- Creation of new jobs, e.g. computer programmers, computer technicians, etc.
- Companies lose a lot of money by re-training of their employees for them to catch up of software
updates, software changes and hardware changes.
- Retraining of workers without computer knowledge for them to keep up with changing technology. A
lot of money is invested in this exercise.
- De-skilling: - this is the replacement of skilled and semi-skilled labour by microprocessor
controlled systems, with workers having to do jobs they did not train for, e.g. in manufacturing, for
example in car assemblies.
*NB: - Electronic scabbing: a process whereby managers switch word-processing duties from
striking workers in one country to none-striking workers in another country.
- Improved working conditions and environments for employees.
- Misuse of personal data held in public offices like police stations, registry offices, etc. The data
can be misused by:
Hackers may read the data and pass it on. Hackers may delete the data. Hackers may amend the data,
plant viruses in the computer system, engage in industrial espionage, sell company secrets and
even blackmail.

~ 69 ~ PhiriM Computer Science notes


14 Systems analysis and design
The systems development cycle is used to create a new or modified computer system. It comprises
several stages:
1• Problem Identification
2• Fact finding
3• Feasibility Study
4• Analysis
5• Design
6• Development and testing
7• Implementation
8• Documentation and User training
9• Evaluation.

1. Problem identification/Recognition/Definition/Realisation:
This is where the problems of the current system are stated.
These might have been realised by system users or by managers. The system might be producing
wrong results.
This includes the general statement of the problems being experienced by the system.

2. Fact Finding/Data Collection/Investigation


This is the stage whereby the analyst collects data from users, management and the
stakeholders, about the current system. Each data collection procedure is appropriate
for a given situation, not in all cases.
Fact-finding methods to gather information, for example:
a) questionnaires
b) interviews
c) observation
d) examining documents or Record inspection.
From the fact finding, a list of things that will be necessary in the solution is compiled –the
requirements specification.

(a) Questionnaire:
A document with carefully crafted questions to be answered by the respondent by filling on the
spaces provided. Questionnaires are used when collecting information from a widely spaced
population sample and when collecting information from many people. A questionnaire contains
open-ended and closed questions. Open-ended questions are gap filling questions which require the
respondent to express his or her own view. Closed questions are guided questions where the
respondent just chooses Yes or No, True or False, or by just putting a tick on given options.
Questionnaires can be distributed personally or by post.

Advantages of questionnaires
~ 70 ~ PhiriM Computer Science notes
 Questions are very simple and faster to answer.
 It saves time as questionnaires can be distributes and then collected later.
 Respondents can fill questionnaires at their own pace.
 Give guarantees confidential of information, thereby encouraging respondents to give accurate
information.
 They are cheap to use when collecting data from a very large sample

Disadvantages of questionnaires
 Some questions are left blank.
 Some questionnaires may not be returned at all.
 Biased information can be collected as people may lie.
 Respondents usually do not fill the correct information.
 It is difficult to analyse information collect using questionnaires.
 They are expensive to use if the postal system is used.
 Abusive information can be filled by respondents.
 It is difficult to prepare a good questionnaire

(b) Interview:
This refers to the face-to-face communication between two or more people in order to obtain
information. Interviews can also be done over the phone but the most common ones are face
to face. Interviews are done when you want to collect information from a very small
population sample.
Advantages of Interviews
 The researcher can ask for clarification on some points that may not be clear.
 Encourages good rapport between the researcher and the respondent.
 Non-verbal gestures like facial expressions can help the researcher to determine if the
respondent is telling the truth.
 Information can be collected even from the illiterate since the respondent’s language
could be used.
 First-hand information is collected.
 The researcher can probe to get more information.

Disadvantages of Interviews
 It is impossible to remain anonymous on the part of the interviewee.
 It is expensive since the researcher has to travel to the interview venue.
 It is time consuming as more time is spent travelling and carrying out the interview.
 Good interview techniques are required as failure may lead to disappointments.
 Biased information can be given since the respondent may not tell the truth.
~ 71 ~ PhiriM Computer Science notes
(d) Record/Document inspection:
A fact finding method which involves scrutinising system documents in order to solicit information.

Record inspection has the following advantages:


 Accurate information is collected from system records.
 First-hand information is obtained

Disadvantages of record inspection


 It is time consuming to go through all system records.
 Manual files can be tiresome to go through and some of the data may be illegible.
 Confidential files are not given to the researcher
(c) Observations:
It is a fact finding method that involves viewing the actual system in operation by the researcher. The
researcher can even take part in operating the system. It is used when the researcher wants to see for
himself how the system operates.
Advantages of observations
 First-hand information is collected.
 Accurate information can be obtained.
 Areas of interest can be observed.
 The researcher can take part in operating the system thereby getting insight on how the system
operates.
 the analyst obtains reliable data
 it is possible to see exactly what is being done

Disadvantages of observations
 People work differently if they feel that they are being observed, therefore inaccurate
information can be collected.
 The researcher may not understand some of the activities being observed.
 It is time consuming to collect the required information.
 The researcher may interrupt some of the activities being done.
 if workers perform tasks that violate standard procedures, they may not do this when being
watched!!

3. Feasibility Study:
It involves an evaluation of proposals to determine if it possible to construct a new system or just
modification of the existing one. Feasibility can be measured by making the following considerations:

Economic feasibility: determining whether the benefits of the new system will out-weigh the
estimated cost involved in developing, purchasing, assembling requirements, installing and
maintenance of the new system.

~ 72 ~ PhiriM Computer Science notes


Technical feasibility: determines if the organisation can obtain software, equipment and personnel
to develop, install and operate the system and even to maintain it.

Social feasibility: a measure of the system’s acceptance by the general public; if it will meet the
norms and values of the society.

Legal feasibility: This is determining if the system can conform to the laws and statutes of the
country. This is done by considering government legislation, e.g. Data processing system must
comply with the local Data Protection Acts

Operational feasibility: determines whether the current work practices and procedures are adequate
to support the system, e.g. effects on social lives of those affected by the system, can it work well with
existing hardware, etc

After carrying out the feasibility study, a feasibility study report must be produced and it contains the
following information:
 A brief description of the business.
 Advantages and problems of the existing system.
 Objectives of the new system.
 Evaluation of the alternative solutions.
 Development timetable.
 Management summary.
 Terms of reference.
 Proposed solution.

4. Analysis
This is the in-depth study of the system to determine how data flows within the system.
Analysis tools used includes:
- Decision trees
- Decision tables
It involves use of flowcharts, data flow diagrams, structure diagrams, decision trees, and others, to
describe the operations of the system in detail. The analysis stage determines whether
computerisation will take place or not. The analysis stage also specifies the hardware and software
requirements of the new/proposed system, the advantages and disadvantages of the proposed
solution, etc.

5. Design
Alternative possible solutions are identified, evaluated and the best solution is identified.
A design specification should include:
 Input – file formats, layouts, screen design, validation techniques, data capture forms,
verification routines.
 Output –report layouts, screen displays.
 Processing – how the input data will be processed to produce the outputs.
 Data storage – backing store requirements
 User interface
 Backup and recovery procedures
 Security procedures
 Test plan – how the solution will be tested before implementation.

~ 73 ~ PhiriM Computer Science notes


6. Development and testing
Define the system so that it matches the design specification, file structures, validation routines,
input methods, output methods.
Testing the solution using the specified test plan with the three kinds of test data:
(a) Normal test data is data that the solution should accept.
(b) Extreme test data is used for data at the two limits of acceptance (e.g. if the normal data is a
number between 0 and 100 inclusive, then the two values of extreme data would be 0 and 100).
(c) Abnormal test data is used to check that a system can identify data that it should reject it (e.g.
in this case any number greater than 100 or less than 0 or any letter/symbol).

7. Implementation
Four methods of implementing the new system:
Method Explanation
1.Direct changeover Implemented all at once on a set date (only useful for small-scale projects).

2. Parallel running Entire new system is operated at the same time as old system (can compare
results, and no problems if new system crashes).

3.Pilot running New system implemented at the same time as old system is still operating, but on
only some of the data. The remaining data is processed using the old system.

4.Phased Different parts gradually implemented one by one.

*NB – Learners should be able to deduce the advantages and disadvantages of each method.

8. Documentation
A system needs two types of documentation – the technical documentation is used by the
technical support staff to maintain the system and the user documentation explains to the
user how to use the system.

Technical Documentation includes: User Documentation includes:

• Purpose and limitations of system • Purpose and limitations of system


• Program coding and flowcharts • Hardware and soft ware requirements
• System flowcharts • How to load and run the system;
• Hardware and soft ware requirements • Input and output formats
• File structures, list of variables • Sample runs:
- error messages and how to deal with them
• Validation techniques.
- user guide with FAQs.

~ 74 ~ PhiriM Computer Science notes


9. Evaluation
The solution should be evaluated against the original requirements specification.
The users’ comments should be invited.
Limitations should be identified.
Areas for potential improvement should be identified.
Consider a review after the new system has been running for a few weeks or months to identify any
modifications that may need to be made.
A new information system may need to be changed due to:
• Change in needs of user, change in legal requirements.
• Problems not found during testing.
• Improvements required in the way the system works, e.g. in functionality, performance (make it
faster).

~ 75 ~ PhiriM Computer Science notes


PROGRAMMING CONCEPTS
Definition of terms:
- Program: a set of detailed and unambiguous instructions that instructs a computer to perform a
specific task, for example, to add a set of numbers.
- Programming: A process of designing, coding and testing computer programs
- Programmer: A person who specialises in designing, coding and testing computer programs
- Problem: any question or matter involving difficulty or uncertainty and is proposed for solution.

Programming Languages
A programming language is a set of symbols in computer language that are used in coding computer
programs. A programming language is a specially written code used for writing application programs
e.g C, Pascal, COBOL, BASIC, C++ and Java.
Programming languages are of the following types:

1. Low Level Languages (LLL): These are programming languages used to write programs in
machine code that is in zeros and ones or in mnemonic codes. Low level language is in two forms:
Machine Language and Assembly Language.

a. Machine Code (Language) is the language used to write programs in binary form (zeros and ones).
Machine language has the following advantages:
(i) Programs run faster since they are already in computer language. There is no need for conversion as
programs are in machine language.
(ii) Programs occupy very small disc storage space by storing just 1s and 0s.

Disadvantages of Machine Language:


 They are very difficult to learn.
 They are difficult to understand.
 Very difficult to use and takes too long to find an error in a program.
 It takes too long to develop working programs.
 They are machine dependent (they can only work on type of computer designed for and not
work on other computers)

b. Assembly Language: These are programming languages that use mnemonic codes in coding
programs. Mnemonic codes are abbreviations used in coding assembly language programs, for
example, LDA for Load, ADD for Addition, etc. Mnemonic codes are very close to machine code,

~ 76 ~ PhiriM Computer Science notes


hence are low level language assembly language codes

Advantages of Assembly language:


 One assembly language instruction corresponds to one machine code instruction and therefore
translation is easier and faster.
 Programs run faster since they are close to machine code.
 They occupy very small disk storage space hence are economical to use.
 Easier for a programmer to use than machine language.

Disadvantages of Assembly Language


 They are very difficult to learn.
 They are very difficult to understand.
 Takes too long to develop working programs.
 They can be machine dependent.

2. High Level Languages (HLL): These are programming languages that use English like statements
in coding programs, for example COBOL, Pascal, BASIC, etc. There are so many high level languages
because each language is designed for a specific problem to be solved in our daily lives. For example
BASIC was designed for learning purposes, COBOL for business applications, FORTRAN for scientific
purposes, etc. Below is an example of a BASIC program that accepts two numbers entered through the
keyboard, adds them and display the result on the screen:
INPUT “ENTER FIRST NUMBER.”, A
INPUT “ENTER SECOND NUMBER.”, B SUM = A + B
PRINT SUM
END

Programs written in High Level Language are first converted to machine code before running.

Advantages of High Level Languages:


 They are easier to understand since they are written in English-like statements which are more
readable.
 They are easier to learn.
 It is easier to work with, that is to correct errors and to test programs.
 They are problem oriented and therefore can be used on any computer (not machine dependent)

~ 77 ~ PhiriM Computer Science notes


Disadvantages of HLL
 Takes long to run since they need to be first converted to machine code.
 They occupy a lot of disk storage space as compared to low level languages.

Factors to consider when choosing a programming language


 Nature of the application.
 Availability of needed facilities in the programming language for system implementation.
 Availability of compatible hardware.
 Availability of expertise of the programmers.

Translators
These are programs used to convert source code into machine code, and are in two types, which are
interpreters, compilers and assemblers, which are further explained below:

1. Interpreters
These are programs that convert (translate) and run one instruction of a program at a time before
going to the next, until the end of the program, e.g. the BASIC interpreter. They do not produce the
machine code version of a program; hence conversion is repeated when you run the program again.
Thus interpreters retain source code. The interpreter must be present in the computer for the
program to run.

Functions of Interpreters
o They check syntax error in a program statement.
o They translate an instruction into machine language and run it before going to the next.
o Allocates storage space to variables.

Advantages of interpreters
 It is easy to find and correct syntax errors in interpreted programs.
 It is very fast to run programs for the first time.
 It is very fast to run small programs.
Disadvantages of interpreters
 They are very slow in running very large programs.
 They do not produce an object code of a source code and hence difficult to use.
 The interpreter must be present in the computer for the program to run.

~ 78 ~ PhiriM Computer Science notes


2. Compilers
These are programs that convert a high level language program into its machine code equivalent at
one go and then run it, e.g. the COBOL compiler. Thus it translates the entire program before
running it. Once compiled, the program no longer needs conversion since the machine code
version is the one that will be run, until some changes are made to the program code. Thus a
compiler produces an object code of the program. The computer must have a compiler for translation.

Functions of Compilers
 They check syntax errors in program statements.
 They allocate storage space to variables.
 Translate the whole program into machine code at one go.
 Run an object code of the program.
 Produces a program listing which indicates position of errors in a program.

Advantages of Compilers
 Compiled programs runs faster since the object code is run.
 Compilers indicate the line numbers with syntax errors and therefore assist programmers in
debugging programs.
 They are appropriate even for very large programs.

Disadvantages of Compilers
 Slower than interpreters for running programs for the first time.
 The compiler must be present for the translation process to occur.
 They can cause the computer to crash.
 Difficult to find errors in compiled program.

*NB: Source Code refers to the program written in English-like statements (High Level Language)
by the programmer.
Object Code refers to a machine code version of a source code. All programs written
in source code must be converted to object code for the computer to understand
them.

3. Assemblers: These are programs used to convert assembly language instructions into machine
language. Other uses of assemblers include:

~ 79 ~ PhiriM Computer Science notes


 They generate machine code that is equivalent to assembly language.
 They are used to check the validity of instructions, that is, checking for syntax errors in an instruction.
 They also assign memory locations to variables.

Difference between High Level Languages and Low Level Languages


High Level Language Low Level Language
1. Written in English like statements Written in 1s and 0s (machine code) or in
mnemonic codes.
2.Easier to work with Difficult to work with
3.Easier to understand Difficult to understand
4.Are problem oriented and can be used on any Machine oriented
computer
5.Slower in execution since they need to be first Faster in execution since they are in machine code
converted to machine code before running already.
6.Occupy large disk storage space on the computer Occupy small disk storage space on the computer
7. They are machine independent They are machine dependent

Top-Down Program Design


Refers to the splitting of a program into simpler subtasks called modules which will be easier to
solve. For example, a program can be split into modules to Accept Number, Add, Divide,
Subtract and to Display Results. Modules are also called procedures, routines, sub-routines or
functions. The splitting of a problem into a series of self-contained modules is called
modularisation (modular programming).

Advantages of modularisation (modular programming)


o Programmer can concentrate at one task at a time.
o Modules are simpler and easier to understand and to solve.
o Modules are easier to test and to debug.
o Program modification is easier since changes are isolated with specific modules.
o More experienced programmers can be assigned complex modules.
o It saves programming time by sharing tasks.
o A large project will be easier to monitor. It is easier to update (modify) modules
However,
o It may be difficult to link the modules together.

~ 80 ~ PhiriM Computer Science notes


o There could be problems of usage of variables as similar variable names may be referring to different
sets of data. They may also vary in scope.

*NB: Library programs: this refers to a collection of standard programs and


subroutines that are stored and available for immediate use by other modules in the
system. Library programs are referenced by most modules in the systems.
*NB: Stepwise refinement: a technique used in developing a system by breaking it
into modules and then work on the internal working of a module.
*NB: The difference between a procedure and a function is that a procedure is a sub-
program that does not return a value while a function is a sub-program that returns a
value.
_ _ _ _ _ _ _ _ _ _ _ _ __ _ _ __ _ _ __ _ _ __ _ _ __ _ _ __ _ _ __ _ _ __ _ _ __ _ _ __ _ _ __ _ _ __ _ _ __ _ _ __ _ _ __ _ _ __ _ _ __ _ _ __ _ _ _

ALGORITHMS
A set of instructions describing the steps followed in performing a specific task,
for example, calculating change. Algorithms are not necessarily written in any
specific language. Algorithms can be illustrated using the following:
Descriptions, Flowcharts, Pseudocodes, Structure diagrams.

Advantages of algorithms
a) not biased towards any programming language
b) easy to convert to a program code or flowchart
c) easy to determine logic errors
d) has finite steps which lead to a solution
Disadvantages
a) time consuming to design, i.e. first convert to flowchart, then to program code
b) most people find them difficult to learn

a. Descriptions: These are general statements that are followed in order to complete a
specific task. They are not governed by any programming language. An example is as follows:
Enter temperature in oC
Store the value in box C
Calculate the equivalent temperature in oF Store the value in box F
Print the value of box C and F
End the program.

b. Pseudocodes: These are English-like statements, closer to programming language that


indicate steps followed in performing a specific task. They are however independent of
any programming language. An example is as follows:
Enter centigrade temperature, C If C = 0, then stop.
Set F to 32 + (9C/5)
Print C and F
End

~ 81 ~ PhiriM Computer Science notes


VARIABLES
Definition: A variables is a memory location that can store a value that can change during
program execution.
Naming variables: Each programming language has its own way of naming variables.
However, the following conventions are common:

-a variable should not be a reserved word. A reserved word is a word with a specific
meaning / function in that programming language, e.g. Print, else, are reserved words in
BASIC
- Variables must start with an alphabetic character, not with digit.
-It is wise to name a variable using the data it stores, e.g. surname (to store surnames), DOB
(to store a date of birth), etc. Thus it must be meaningful to avoid confusion
- Must not be too long
- Must be one word
Control Structures in Pseudocode
A number of control structures are used in designing Pseudocodes. These includes: simple
sequence, selection and iteration (looping/repetition).

i. Simple sequence: This is whereby instructions are executed in the order they appear
in a program without jumping any one of them up to the end of the program. Statements
are executed one after another in the order they are. It is simple and avoids confusion.
Example:
Enter first number, A
Enter second number, B
C=A+B
Print C
Stop

ii. Selection Structure:


This allows one to choose the route to follow in order to accomplish a specific task.
Selection is written using the IF ....THEN...ELSE statement or the CASE statement.
IF...THEN ...ELSE statement: A programming structure that allows the user to choose
one from at least two routes of solving a problem. The following Pseudocodes
compares two numbers entered through the keyboard and determines the bigger one.

------
CASE Statement: This is an alternative to the IF...THEN...ELSE statement and is
shorter. For example:
~ 82 ~ PhiriM Computer Science notes
Enter first Number, A
Enter second number, B
Enter operand (+, -, * /)
CASE operand of:
“+”: C = A + B
“-”: C = A-B
“*”: C = A*B
“/”: C = A/B
ENDCASE
Print C
END

iii. Repetition/Iteration/Looping:
A control structure that repeatedly executes part of a program or the whole program until
a certain condition is satisfied. Iteration is in the following forms: FOR...NEXT loop,
REPEAT... UNTIL Loop and the WHILE...ENDWHILE Loop.

a. For...Next Loop: A looping structure that repeatedly executes the loop body for a specified
number of times. The syntax of the For...Next loop is as follows:

A group of statements between the looping structures is called the loop body and is the one that is
repeatedly executed.
The For...Next loop is appropriate when the number of repetitions is known well in advance, e.g.
five times. An example of a program that uses the For...Next loop is as follows:
Sum, Average = 0
FOR I = 1 to 5 DO
Enter Number
Sum = Sum + number
NEXT I
Average = Sum/5
Display Sum, Average
End

b. Repeat...Until Structure: This is a looping structure that repeatedly executes the loop
body when the condition set is FALSE until it becomes TRUE. The number of repetitions
may not be known in advance and the loop body is executed at least once. The syntax is as
follows:

For example
~ 83 ~ PhiriM Computer Science notes
In the above program:
-Count records the number of times the loop body executes.
-999 is used to stop further data entry through the keyboard and thereby ending the
loop. Such a value that stops further data entry through the keyboard thereby
terminating a loop is called a Rogue value or sentinel.
-The condition here is {Number = 999}. The loop exits when the number 999 is entered. If
999 is part of the number to be entered in this program, then the user has to split it into
two numbers, that is 999 = 990 + 9, therefore can be entered separately as 990 and 9.
-A flag is also used to control the loop. In this case 999 is also a flag.
NB. As for the Repeat...Until loop, the condition is tested after the loop body has been
run at least once, even when the condition is true from start. This is rather misleading.

c. While ... Do Statement: A looping structure in which the loop body is repeatedly
executed when the condition set is TRUE until it becomes FALSE. It is used when the number of
repetitions is not known in advance. The condition set is tested first before execution of the loop
body. Therefore the loop body may not be executed at all if the condition set is FALSE from start.
The syntax of the WHILE…END WHILE structure is as follows:

An example of the program is as follows:


Sum, Count, Average = 0
WHILE Count < 6 DO
Enter Number
Sum = Sum + number
Count = count + 1
ENDWHILE
Average = Sum/count
Display sum, count, average
END

The word WEND can be used to replace the word ENDWHILE in some structures and
therefore is acceptable. The word Do, after the condition is optional.

~ 84 ~ PhiriM Computer Science notes


Differences between the Repeat...Until and the While…ENDWHILE structures

c. Flowcharts
it is diagram used to give details on how programs and procedures are executed. Flowcharts are
drawn using specific symbols, each with its own meaning, as given below:

Illustrations of flowcharts for programs


1. Using Simple Sequence Structure

~ 85 ~ PhiriM Computer Science notes


~ 86 ~ PhiriM Computer Science notes
Flowchart (a) above indicates modules named Accept Numbers, Add numbers, Multiply
Numbers and Display Results. Flowcharts for individual modules can then be designed as
given in diagram (b) above, only the first module is indicated. Can you do the rest?

d. Structure Diagrams: These are diagrams that show relationships between different
modules as given below.

~ 87 ~ PhiriM Computer Science notes


-The structure diagram above indicates five sub-programs of the program Process Numbers,
namely Initialise, Accept Numbers, Process Numbers, Display Results and Exit.
-The module Process Numbers has its own sub-programs, which are Add Numbers and
Multiply Numbers. Modules are appropriate for very large programs.

Can you write pseudocode for individual modules? The program can be written as a continuous
single program as indicated on the right side of the diagram.

Interpreting and Testing Programs


Dry running (desk checking): the process of manually testing the logic of a program on
paper before coding on the computer. Dry running is done to determine the logic of a
program (to check if it gives intended results.)
Debugging: The process of finding and correcting errors in a program. Bugs are errors in a
program. A debugger is a program used in aiding the finding and removal of errors in a program.

TYPES OF PROGRAMMING ERRORS

As programs are written by humans; they may contain errors namely the following;

a) Syntax error
Is where a program statement doesn’t obey the rules of the programming language. A program
cannot be translated if it contains syntax error.

b) Logic errors
Is where the program doesn’t do what the programmer wanted it to do. Logic errors are found
when a program is being run.

c) Runtime / execution errors


These are errors that occur during program execution and can be generated when the computer
tries to read past an end of file marker or by dividing a number by zero.

d) Semantic error
refers to an error in the sequencing of instructions, modules and specifying wrong formulae that
will produce undesirable results. For example, instructing the computer to display result before
any processing has been done. Logic errors cannot be detected by the computer. The user just finds
wrong and unintended results of a process.
~ 88 ~ PhiriM Computer Science notes
17 Data types
Files, records, fields and the key field
Suppose a school stores information about its students. Each student has their own
individual record card; this is their record.

The individual pieces of information recorded on each card, such as name and date of birth, are
called fields.
Information in computer-based fi ling systems is stored in data files.
A file is a collection of records.
A record must have at least one field. Most fi les contain a primary key (or key field),
the field which uniquely identifies that particular record. In this case it is the student’s admission
number (it is unique to each student).
A field contains one individual item of data.

Data types
For each field, the type of data needs to be specified:
Data type Explanation
Text (or alphanumeric) letters or mixtures of letters and numbers
Boolean only two possible entries – Yes/No Male/Female
Numeric numbers
Integer exact whole number
Date date
Real numbers which have a decimal part
Currency real number with always two numbers after the point

~ 89 ~ PhiriM Computer Science notes


Computer databases
A database is a structured collection of related data.
It can be a single (flat) file that contains a large number of records.
Many modern databases are described as being relational.
A relational database stores data in tables that are linked together using common fields – the
foreign key – which also has to be the primary key in one of the tables.

Flat-File Database Relational Database


A flat-file database is one that only contains a single A relational database is one that contains two
table of data. or more tables of data, connected y links called
relationships.

All of the data in the database is stored in this one place. *NB that the table contains several items of data
In this case above is a student database. that are repeated over and over again such as:
Class (5B)
Tutor(Mr noggin)
Room(56)

Repeated data in a database is generally considered a bad thing


It wastes space in the database
It takes time to input, typing the same data over and over [and mistakes can be made]
~ 90 ~ PhiriM Computer Science notes
It is a pain to update [

Digital and analogue data


Digital data is data which can only take exact whole number data and when used in computers can
only be represented by combinations of either 0s or 1s.

~ 91 ~ PhiriM Computer Science notes


Analogue data is data which can take any value and not restricted to whole numbers, e.g.
temperature.
Analogue-to-digital converter
Measuring devices collect the data in analogue form. This must be converted into digital form so
that this data can be input to the computer system. This is done by an analogue to-digital converter
(ADC).
Digital-to-analogue converter
After the computer has processed the data, this digital data must be converted into analogue form,
by a digital-to-analogue converter (DAC), so that a device can be controlled in the particular
application, e.g. turn on a motor to drive the air conditioning unit.

~ 92 ~ PhiriM Computer Science notes


DATA LOGGING
The process of automatically collecting data from source at set intervals, over a period of time, for use
at a later stage. A device that automatically collects data from source at set intervals for use at a later
stage is called a data logger.

Features of Data Loggers:


-They contain processor inside them.
-Have Interface: Devices that act as connection point between data loggers and the computer.
- They have own storage facility: For storage of data collected from sensors
- They contain or are connected to sensors that are used for collecting data in analogue form. All
physical properties can be measured with sensors e.g. light, heat, sound, pressure, acidity and
humidity.

Sensor type Purpose


Mercury Tilt switch Detects if device is tilted, e.g. a vending machine
Light sensor Detects the intensity of light (light level), e.g. so as to turn on or off street lights.
Used also in greenhouses, automatic door,traffic control, etc
Can detect light reflected from a barcode
Push switch Used to turn on or off interior light, e.g inside a fridge if a door is opened or closed
Temperature Detects temperature levels in central heating systems,
sensor chemical plants, etc
Infra-red sensor Used in burglar alarms, counting people, detecting heat sources
Sound sensor Records sound levels from beer halls, houses, etc
Proximity sensor Detects how close to each other are two parts, e.g if a window is opened; an alarm
is raised because the proximity between the window and the sensor is changed.
Position sensor Senses the angle of an object from a certain point, e.g from a robot
Pressure/motion senses when someone has walked over an object e.g. used in burglar alarm
sensor systems, automatic doors, counting vehicles, etc
Acoustic sensor Listening to foot steps (in burglar alarms), sound from broken glass, etc
pH sensor Measures the acidity or alkalinity of objects e.g. of soil and water, in pollution
monitoring, chemical process control, etc
Humidity(moisture) Measures humidity (moisture) levels in air, greenhouses, irrigation systems, etc
sensor
Distance sensor (could Measure the distance from one point to another
be proximity)
Oxygen sensor Used to monitor pollution levels

- They can be connected to small keyboards or other special reading devices.


- They are connected to an Analogue to Digital Converter (ADC), which converts data signals in
continuously varying form (analogue) collected by sensors into discrete (digital) values that can be
accepted by the computer.
Types of Data Loggers
a. Data loggers with permanent computer connection
- These take readings and send them to the computer in offices through connection cables or
~ 93 ~ PhiriM Computer Science notes
through wireless connections.
- The time intervals (time between each reading) and the period over which the logging takes place
can vary
- The computer may process the readings instantly and produce graphs
- The readings may also be stored on the disk for processing at a later date
- These are suitable for experiments in laboratories

b. Data loggers with temporary connections


- These are not always connected to the computer, but are connected when necessary
-They are mostly used in monitoring environmental conditions over a period of time
-The time intervals (time between each reading) and the period over which the logging takes place
can vary. The time interval for data logging is the time between readings. The logging period is
the total length of time over which readings are taken.
-Reading are stored by the data logger and loaded into the computer at a later date for processing
-They can be used in remote areas (not directly connected to the computer): remote data logging.

Benefits of computerised data logging


-Data loggers are a very fast method of data collection than manual methods.
-Data can be processed immediately (real-time)
-Data loggers are very accurate than humans in collecting data.
-Data loggers enable collection of data on events that happen too quickly than human beings could do.
-They can also record data on events that happen too slowly and boring for human beings to carry
-Data loggers stored data for a very long period of time.
-Data loggers can work 24 hours a day, thus ensuring continuous data logging process.

-- - - - - - - - - - - - - - - - - - - - -- - - - - - - - - - - - - - - - - - - --- - - - - - - - - - - - - - - - - - - --- - - - - - - - - - - - - - - - - - - -

COMPUTING PRACTICAL NOTES include the following to be covered during practical sessions

1) Word Processing
2) Database
3) Presentation [ Powerpoint]
4) Spreadsheet [ Excel]

~ 94 ~ PhiriM Computer Science notes


2. USING THE APPLICATION THE DATABASE
Database Concepts

A database is an organised store of information constructed around a particular theme. It consists


of a series of rows (called records in Access) and columns (fields).

For example, a school database might contain information about the following:

a) Entities such as students, department, subjects, and classrooms


b) Relationships between entities, such as students’ enrollment in school, department teaching
subjects and the use of rooms for subjects.

Other examples of database users are: For instance, a business might use a database to store
information about sales and stock inventories. A doctor might search a database to find information
about particular medical symptoms.

In an office application suite, the different applications have different areas of focus. In the case of
word processors, the focus is on documents. In spreadsheets, the emphasis is on calculation. In the
case of databases, the focus is on working with information.

Examples of Database Packages are:


-Microsoft Office Access 2007, -SQL Server 2000, -MySql, -MySQL Front, -OpenOffice.org Base, etc.

Data and information

Data refers to a collection of unorganised facts. A collection of data may contain millions of items.
When we make sense out of the data through manipulating it in some way, we say that we have
information. In other words, information is data that has been made intelligible.

Turning data into information


The purpose of a database system is to store the data and turn it into information. This involves a
number of processes. Some of these are:

 Storage and retrieval.


 Sorting.
 Performing numerical analysis on the data such as counting, averaging and summation.
 Filtering: Selecting on data that satisfies certain criteria.
 Reporting: Producing output in some standardised and readable format.

Advantages of Databases
1) Data can be shared reducing the need for redundant duplication.
2) Centralized functionality leads to consistency in the management of data, its storage,
validation, security, processing and control.
3) The separation of concerns simplifies the task for programmers developing user processes.
4) There is reduction of unproductive maintenance incurred when the requirements of data and
programs are changed.
5) Ad hoc querying becomes easily achievable the DBMS can translate a logical user query into
the more complex physical requirements of the underlying computer system.
6) Data independence
~ 95 ~ PhiriM Computer Science notes
A database is made up of tables, queries and reports. The tables contain the data. The queries
contain instructions on how the information is to be retrieved, and the reports contain layouts to
dictate how the retrieved information will be printed. Each table is made up of records and each
record contains fields that relate to that record.

Each different table, query or report within the database file is called an object. An object that has
been opened is termed an active object.

Hence the hierarchy is:

a) A field is a single item/fact such as First Name, Surname, Date of Birth, etc.
b) A record is a collection of fields
c) A table is made up of a group of records
A Table is a collection of data related to a single topic and a database is a collection of tables. For
example, a company human resource database may comprise a number of tables such as staff
personal details, salary data, pension data, dispute data, academic, professional and training data,
and medical scheme data.

Note that each table is related to a single topic. Where a table is found to contain data on more than
one topic, it should be split.

d) An object is a table or a query or a report (as necessary to extract information from the table)
e) A database is made up of objects. It may contain several tables, and the related queries and
reports

DATA TYPES were covered in earlier theory topics

Key Terms
a) Primary key is a unique field that can be used to distinguish one record from another. An
example could be a staff id number or National Id number. This field is called the primary key.
b) Secondary key is a
c) An index refers to a field on which a database can be sorted. When you create a table, you
specify whether or not you wish a field to be indexed. When you do, a special structure in the
background which allows the table to be rapidly sorted based on the indexed fields.

If you might sort a table on a field, you should index it. On the other hand, if you have too many
indexed fields, the action of the database will be slowed down since the more indexed fields there
are the more work the database will have to do.
How To perform certain tasks in MS Access
Methods of Opening Database Application (Ms Access 2007)
Method 1 Method 2 Method 3 Method 4
a) Click Start button Double Click Microsoft a) Click Start button. Use Keyboard to
b) Click All Programs Office Access 2007 b) Click Microsoft Office execute method 1
c) Click Microsoft Office Shortcut icon From the Access 2007 Icon from rather than use a
d) Click Microsoft Office desktop. the Startup Menu. mouse
Access 2007

~ 96 ~ PhiriM Computer Science notes


Methods of Closing Ms Access 2007
Method 1- Keyboard Method 2 – Menu Bar Method 3 – Close Button Method 4 - Taskbar
Press ALT + F4 on keyboard a) Click Office button Click Access’s Close button Click the document’s close
b) Click Close button from the task bar.

Methods of Opening an existing Database (Ms Access 2007)


Method 1 Method 2 Method 3
a) Click Office button a) Click Office button a) Allocate the
b) Click Open b) Click the pinned recent document of your database’s path
c) Browse for the path/ location where the database path/ location b) Double Click the
database is. database icon.
d) Select the database
e) Click Open command

Creating a Table Creating a Query


a) Click Create Menu Bar a) Click Create Menu Bar
b) Click Table Design View combobox b) Click QueryDesign
c) Type the fieldname and assign appropriate datatype for c) Select table(s) and click the add command from Show Table
the field Dialogue box
d) Assign a primary to a unique field, if you want. d) Select the fields corresponding to the table chosen
e) Save the table and assign/type the table name. e) Assign aappropriate criteria for screening for the affected
column/ field.
f) Save the query and assign/type the query name.

Creating a Form Creating a Report


a) Click Create Menu Bar a) Click Create Menu Bar
b) Click More Forms combobox from the Form group. b) Click Report Wizard from the Report group.
c) Select the table or query from the Form Wizard Dialogue c) Select the table or query from the Report Wizard Dialogue
box. box.
d) Select the field to appear in finished form. d) Select the field to appear in finished Report.
e) Click next command s choosing the layout, styles e) Click next command s choosing the grouping, layout, styles
f) Assign the formname f) Assign the Reportname
g) Lastly Click Finish g) Lastly Click Finish

Saving a database to a removable device: Printing the database:


a) Click Office button a) Click Office button
b) Click SAVE AS b) Click Print Command
c) Click Access 2007 Database c) Specify the number of copies to print or any adjustment to
d) Specify the path/ location to a removable device (U.S.B) the printout
e) Click Save button d) Click OK button

Methods of Deleting a Record in a Table


Method 1 Method 2 Method 3
a) Select the record a) Select the record a) Select the record
b) Click Delete command from b) PressDelete command b) Right Click
the records group in the Home from the keyboard. c) ClickDelete
Tab

~ 97 ~ PhiriM Computer Science notes


3. USING THE PRESENTATION APPLICATION (THE POWERPOINT)

Presentation Application Concepts

A PowerPoint presentation is a presentation created using Microsoft PowerPoint software. The


presentation is a collection of individual slides that contain information on a topic. PowerPoint
presentations are commonly used in business meetings and for training and educational purposes.

Definition 2 – PowerPoint is a complete presentation graphics package. It gives you everything you
need to produce a professional-looking presentation. PowerPoint offers word processing, outlining,
drawing, graphing, and presentation management tools- all designed to be easy to use and learn.

When you create a presentation using PowerPoint, the presentation is made up of a series of slides.
The slides that you create using PowerPoint can also be presented as overhead transparencies or
35mm slides.

Presentation Software packages examples are:


1. PowerPoint 2. Flash 3. Open Office Impress 4. Apple Keynote 5. Photoshop

Emphasis on this application that we would be using is Microsoft Office Powerpoint

5 Uses of Powerpoint are:


1. Guided Presentations
2. Self-Running Presentations
3. Recorded Videos
4. Vector Art
5. Animation

Advantages of Powerpoint

1. Visual Impact
Making your presentation more interesting through the use of multimedia can help to improve the
audience's focus. PowerPoint allows you to use images, audio and video to have a greater visual
impact. These visual and audio cues may also help a presenter be more improvisational and
interactive with the audience. However, try not to overly rely on these sources as your message
might get lost in the clutter.

2. Collaboration
PowerPoint allows you to work with other people in a collaborative manner. This is especially
useful in office settings where teamwork is key. Multiple people can collaborate on and contribute
to a presentation. By going to the "Review" tab at the top of the program and clicking the "New
Comment" button, you can leave notes and reposition them on the screen for other team members
to view. Comments can be an especially beneficial tool for clarification.
3. Content Sharing
Share your PowerPoint presentation with the world. You can upload your presentation to websites
such as YouTube with everything featured in your work including all of the slides, commentary and
transitions. All you have to do is go to "File," "Save and Send" and "Create a Video." The file will be
saved and can be uploaded to most video sites.
~ 98 ~ PhiriM Computer Science notes
4. Flexibility
PowerPoint can be used in a number of different effective ways to communicate with your
audience. Slides are completely customizable to fit your needs. Depending on your approach, you
may want to have a presentation that is text-heavy, image-heavy or some combination of both.
Text-heavy presentations are generally good if you are giving a lecture to a group within your
company and want them to take notes. Image-heavy presentations can help to make your
presentation more conversational in style since there only visual cues. Combining the two
approaches gives listeners the benefits of both visual aids and notes.

Key Terms
a) The Master Slide is the design template or design theme used for the slides within your
presentation. There are four different master slides -- title master, notes master, handout
master and the most common, the slide master.
b) Slide Master is the first slide or parent slide whereby the other slides (child) inherit the
characteristics of the parent slide. [All slides in a presentation are created using the fonts, colors
and graphics in the slide master, with the exception of the Title slide (which uses the title master)].

How To perform certain tasks in MS Powerpoint


Methods of Opening Presentation Application (MsPowerpoint 2007)
Method 1 Method 2 Method 3 Method 4
Click Start button Double Click Microsoft Click Start button. Use Keyboard to
Click All Programs Office Powerpoint 2007 Click Microsoft Office execute method 1
Click Microsoft Office Shortcut icon From the Powerpoint 2007 Icon from the rather than use a
Click Microsoft Office desktop. Startup Menu. mouse
powerpoint 2007

Methods of Closing MsPowerpoint 2007


Method 1- Keyboard Method 2 – Menu Bar Method 3 – Close Button Method 4 - Taskbar
Press ALT + F4 on keyboard Click Office button Click Powerpoint’s Close Click the document’s close
Click Close button button from the task bar.

Methods of Opening an existing Presentation (MsPowerpoint 2007)


Method 1 Method 2 Method 3
Click Office button Click Office button Allocate the Powerpoint’s
Click Open Click the pinned recent document of your path
Browse for the path/ location where the Powerpoint path/ location Double Click the Powerpoint
database is. icon.
Select the database
Click Open command

Inserting a Table in a slide Inserting options from (Illustration, links, text and media clips)
a) Click Insert Menu Bar in a slide
b) Click Table combobox and select method to create a. Click Insert Menu Bar
table b. Click option from the category group
c) Specify the number of columns and rows.

Changing theme or background of slide Apply animations and transition sound to the presentation
a) Click Design Menu Bar a) Click Animations Menu Bar
b) Select the theme of your choice. b) Select the animation style of your choice.
c) Specify to all to the selected slide or all slides c) Select the transition sound of your choice.

~ 99 ~ PhiriM Computer Science notes


Saving a presentation or Powerpoint to a removable device:
a) Click Office button
b) Click SAVE AS
c) Click Powerpoint 2007
d) Specify the path/ location to a removable device (U.S.B)
e) Click Save button

Printing the presentation:


a) Click Office button
b) Click Print Command
c) Specify the number of copies to print or any adjustment to the printout
d) Click OK button

Methods of Deleting a Slide in a Powerpoint Presentation


Method 1 Method 2 Method 3 Method 4
Select the slide Select the slide Select the record Select the record
Click Cut command from Press Delete Right Click Click Delete from the slides
the clipboard group in command from the Click Delete group
the Home Tab keyboard.

~ 100 ~ PhiriM Computer Science notes


4. USING SPREADSHEET
1. Spreadsheet is a computer application which is used to perform some calculations and mathematical modeling; it mainly used for
budgeting and summarized accounts.
2. Differences between the following:
a)
Workbook Worksheet
 It is a file in which you work and store your data  The primary document used to store and work with
 It is the overall notebook or file that contains a data.
number of worksheets  It consists of cells organized in rows and columns;
 Cell address is shown in the name box and it is a subsidiary of a workbook

b)
Active Cell Cell Referencing
 The initial or current cell that is selected  Is the unique identification of the cell contents;
 The cell is identified by the bold outline around the showing the row number and column e.g B2 (
cell and the highlighted Row and Column meaning the contents are in second row, column B)

c)
Name bar Formular bar
 This is the cell address of the active cell eg. C14  Shows the contents of the cell
 It shows formulation and calculation formulas

3. Detailed explanation of how to :


a) Saving a workbook to a removable device
 Click Office button
 Click SAVE AS
 Specify the path/ location to save (U.S.B)
 Click SAVE button.

b) Creating a new workbook


Method 1 Method 2
 Click Office button - Press Ctrl + N from your keyboard
 Click New
 Select blank workbook
 Click Create button

c) Launch the spreadsheet


Method 1 Method 2
 Click Start Button/All Programs/Microsoft Office/  Double Click the shortcut icon of Microsoft Office
Microsoft Office Word 2007 Excel 2007 from your desktop

d) Add or Insert the worksheet


Method 1 Method 2
 Right click the active worksheet  Press Shift +F11 from your keyboard
 Click insert
 Select worksheet and click OK button

e) Deleting contents in the cells of a worksheet


Method 1 Method 2
 Right click the selected cells in a worksheet  Select the cell (s)
 Click delete  Press delete from the keyboard

4. Advantages of Spreadsheet are:


i. Automatic updating of formulars
ii. Editing Functions
iii. Comprehensive range of functions
iv. Creating custom made functions
v. What if Analysis
vi. Macros
vii. Viewing of figures charts and columns

~ 101 ~ PhiriM Computer Science notes


1. USING WORD PROCESSING
Word processing is a text editor that is used to enhance and produce high quality documents.
Examples of word processing software are Microsoft office Word, Librewriter, Word pad, Richtext
Advantages of using word processing
o Typographical error detection and correction
o Automatic word wrap-during typing
o Flexibility
o Inclusion of graphics in the document-it allows pictures to be imported and placed in the document
o Multiple copies-it allows the printing of multiple copies without retyping
o Mail merge-it enables same piece of information to be send to multiple recipients

Changing text to capital letters (i) using CAPSLOCK (ii) using Uppercase (iii) using Shift Key + appropriate key
1. Methods of Closing Word
Method 1 Method 2 Method 3 Method 4
Press ALT + F4 on Click Office button Click document’s Close Click the document’s close
keyboard Click Close button button from the task bar.
4. Display Modes are:
i. Outline ii. Web Layout iii. Draft iv. Print Layout v. Full Screen
5. Methods of opening Microsoft Word:
 Click Start Button/All Programs/Microsoft Office/ Microsoft Office Word 2007
 Double Click the shortcut icon of Microsoft Office Word 2007 from your desktop
7. Saving a document in rich text format:
i. Click Office button
ii. Click SAVE AS
iii. Specify the path/ location to a removable device (U.S.B)
iv. Change the file format to rtf (rich text format)
v. Click Save button
8. Purposes of the following:

Term Purposes
a. Help Function  For hints as to how to perform certain tasks
 Procedural assistance step by step
b. Hyphenation  Gaps in text can be eliminated.
 Even lines lengths can be maintained in narrow columns.
c. Print preview  Gives an outlook of how the soft copy will look like.
 Enables the user to ascertain areas that need to be edited.

9a. Moving text from 1 document to another 9b.Method 1 - changing font colour and size
 select the portion of text in icdl document.  select the portion of text in the document.
 right click and copy the text from icdl  Double click the font group
document.  Select the appropriate font size and color you
 open exam document and paste the text. want.

9c.Method 2 - changing font colour and size 9d. Insert Page number
 select the portion of text in the document.  Click insert tab and click page number style from
 Double click the font group header and footer group.
. Page border
 Click the page layout tab.
 Click page border and select the border style you want.

9e.Insert special characters or symbol 9f. Insert page break


 Click the Insert menu bar  Click the Insert menu bar
 Click Symbol and select the character or symbol you  Click page break
want

~ 102 ~ PhiriM Computer Science notes


CONTENTS PAGE
1.INTRODUCTION TO COMPUTING............. .................. .................. .................. .................. .................. ......................... .... .... .... .... .... .... ....1
2.TYPES AND COMPONENTS OF COMPUTER SYSTEMS.................. .................. ......................... .... .... .... .... .... .... .... .... ..............3.
3.INPUT AND OUTPUT DEVICES [PERIPHERALS] .................. .................. ......................... .... .... .... .... .... .... .... .... .... .... .... ..... ....10
4.STORAGE DEVICES AND MEDIA.................. .................. ......................... .... .... .... .... .... .... .... .... .................. .................. ......................... ....15
5.THE EFFECTS OF USING ICT............ .... .... .... .... .... .... .... .... ............ .... .... .... .... .... .... .... .... ............ .... .... .... .... .... .... .... ... .... .... ..... .....17
6.APPLICATIONS OF COMPUTER SCIENCE ............ .... .... .... .... .... .... .... .... ............ .... .... .... .... .... .... .... .... ............ .... .... .... .... .... ...19
7.DATA REPRESENTATION: Binary Systems in Computer systems............ .... .... .... .... .... .... .... .... ............ .... .... .... .... ..31
8.DATA REPRESENTATION: Logic Gates............ .... .... .... .... .... .... .... .... ............ .... .... .... .... .... .... .... .... ............ .... .... .... .... .... .... ......35
9.DATA PROCESSING............ .... .... .... .... .... .... .... .... ............ .... .... .... .... .... .... .... .... ............ .... .... .... .... .... .... .... .... ............ .... .... .... .... .... .... .44
9.1THE DATA PROCESSING CYCLE............ .... .... .... .... .... .... .... .... ............ .... .... .... .... .... .... .... .... ............ .... .... .... .... .... .... .... .... ..........47
10.PERIPHERAL DEVICES CONTROL.... .... .... .... .... .... .... .... ............ .... .... .... .... .... .... .... .... ............ .... .... .... .... .... .... ......... .... ............49
11.MALWARE.... .... .... .... .... .... .... .... ............ .... .... .... .... .... .... .... .... ............ .... .... .... .... .... .... .... .... ............ ..... ..... ..... ..... ..... ..... ..... ..... ..... ..... ...51
12.COMPUTER NETWORKS.... .... .... .... .... .... .... .... ............ .... .... .... .... .... .... .... .... ............ .... .... .... .... .... .... .... .... ............ ..... ..... ..... ..... ...53
13.SECURITY AND ETHICS.... .... .... .... .... .... .... .... ............ .... .... .... .... .... .... .... .... ............ .... .... .... .... .... .... .... .... ............ ..... ..... ..... ..... .....64
13.1SECURITY.... .... .... .... .... .... .... .... ............ .... .... .... .... .... .... .... .... ............ .... .... .... .... .... .... .... .... ............ .... ............ .... ............ ..... ..... ..... .....64
13.2Computer Ethics .... .... .... .... .... .... .... .... ............ .... .... .... .... .... .... .... .... ............ .... .... .... .... .... .... .... .... ............ .... ............ ..... ..... ..... .....68
13.3Legal issues relating to the use/ misuse of ICT, the constraints placed on individual..... ..... ...... ..... .....68
13.4 Legal constraints on use of information [THE DATA PROTECTION ACT..... ..... ..... ..... ..... ..... ..... ....... ..... .....68
13.5 Personal Responsibility on the Internet ..... ..... ..... ..... ..... ..... ..... ..... ..... ..... ..... …... ..... ..... ..... ..... ..... ..... ..... ....... ..... ..... .....69
Implications of Computer Application .... .... .... .... .... .... .... .... ............ .... .... .... .... .... .... .... .... ............ .... .... .... .... .... .... .... .... ............69
14.Systems analysis and design.... .... .... .... .... .... .... .... ............ .... .... .... .... .... .... .... .... ............ .... .... .... .... .... .... .... .... ............ ..... ..... .....70
15.PROGRAMMING CONCEPTS.... .... .... .... .... .... .... .... ............ .... .... .... .... .... .... .... .... ............ .... .... .... .... .... .... .... .... ........... ..... ..... .....76.
16.ALGORITHMS.... .... .... .... .... .... .... .... ............ .... .... .... .... .... .... .... .... ............ .... .... .... .... .... .... .... .... ............ .... ............ .... ............ .... ............81
17.Data types.... .... .... .... .... .... .... .... ............ .... .... .... .... .... .... .... .... ............ .... .... .... .... .... .... .... .... ............ .... ............ .... ............ .... ............ .... ....89
DATA LOGGING.... .... .... .... .... .... .... .... ............ .... .... .... .... .... .... .... .... ............ .... .... .... .... .... .... .... .... ............ .... ............ .... .... ............ .... ............93
COMPUTING PRACTICAL NOTES
2. USING THE APPLICATION THE DATABASE.... .... .... .... .... .... .... .... ............ .... .... .... ........ .... .... ................ ........ .... .... .... .... .... ...95
3. USING THE PRESENTATION APPLICATION (THE POWERPOINT) .... .... .... .... .... .... .... .... ............ .... .... ........ .... .... .98
4. USING SPREADSHEET .... .... .... .... .... .... .... .... ............ .... .... .... .... .... .... .... .... ............ .... .... .... .... .... .... .... .... ............ .... ... ..... .... ............101
1. USING WORD PROCESSING.... .... .... .... .... .... .... .... ............ .... .... .... .... .... .... .... .... ............ .... .... .... .... .... .... .... .... ............ .... .... .... ... .102

~ 103 ~ PhiriM Computer Science notes

You might also like