Comp_Science_Notes.PhiriM
Comp_Science_Notes.PhiriM
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 – 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.
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.
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;
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.
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).
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).
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.
The primary (main) memory is an extension of the CPU and assists the CPU in its
operations.
- 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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
-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.
CAD Requirements
- considerable processor power
Input devices such as:
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.
___ __ __ ________ ______ __ ___________ ______________ ______________ _______________ _____________ _____ _ ___ __ ____
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
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).
3. Explain two uses of computers in each of the following fields.[Nov 2007 QP]
--------------------------------------------------------------------------------------------------------------------------------------------
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
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.
--------------------------------------------------------------------------------------------------------------------------------
~ 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 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.
-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).
128 64 32 16 8 4 2 1 Answer
1 0 0 1 0 0 1 1 100100112
1000 1010
– 001 – 011
0111 0111
- 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
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
- …..
--------------------------------------------------------------------------------------------------------------------------
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.
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
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.
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.
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.
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.
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.
Example
A NAND gate can be used as a NOT gate using either of the following wiring configurations.
---------------------------------------------------------------------------------------------------------------------------
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.
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.
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 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)
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
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
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:
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.
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
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.
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.
Data is fed directly into the computer system from on-line terminals without the storing, sorting
(these are done on-line)
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
Stage 5: Output
The processed information is eventually displayed for use by the user through the various output
systems - printers, VDUs, sound cards & speakers.
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
CO CO CO CO CO CO
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.
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.
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.
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.
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.
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.
Bridge
A bridge allows two different types of network to communicate with each other.
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.
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.
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.
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
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.
4. Mesh Topology
This topology combines the ring and the star topologies. Bi-directional links are established.
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.
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).
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).
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
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.
-- --------------------------------------------------------------------------------
If the data on these computer systems is damaged, lost, or stolen, it can lead to disaster.
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.
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.
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.
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:
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:
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]
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.
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.
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:
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 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 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
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.
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.
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.
(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.
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.
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.
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.
*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.
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.
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,
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.
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.
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:
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.
-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
------
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:
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.
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:
d. Structure Diagrams: These are diagrams that show relationships between different
modules as given below.
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.
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.
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
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)
-- - - - - - - - - - - - - - - - - - - - -- - - - - - - - - - - - - - - - - - - --- - - - - - - - - - - - - - - - - - - --- - - - - - - - - - - - - - - - - - - -
COMPUTING PRACTICAL NOTES include the following to be covered during practical sessions
1) Word Processing
2) Database
3) Presentation [ Powerpoint]
4) Spreadsheet [ Excel]
For example, a school database might contain information about the following:
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.
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.
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.
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
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
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.
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)].
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.
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
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.