0% found this document useful (0 votes)
88 views123 pages

Comp f3 With Pictures 2024

This document provides notes for the Kenya Certificate of Secondary Education Form 3 Computer Studies syllabus. It covers four main topics: 1) data representation in computers, 2) data processing, 3) elementary programming principles, and 4) system development. For each topic, it defines key terms and concepts and describes methods and structures such as number systems, data collection stages, program control structures, and the stages of system development.

Uploaded by

Peter Njuguna
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
88 views123 pages

Comp f3 With Pictures 2024

This document provides notes for the Kenya Certificate of Secondary Education Form 3 Computer Studies syllabus. It covers four main topics: 1) data representation in computers, 2) data processing, 3) elementary programming principles, and 4) system development. For each topic, it defines key terms and concepts and describes methods and structures such as number systems, data collection stages, program control structures, and the stages of system development.

Uploaded by

Peter Njuguna
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 123

COMPUTER ST UDIES NOTE PACK

Notes for Kenya Certificate of Secondary


Education Form 3 Syllabus

By Teacher John
©2018
Updated 2020 September

1 | Page
Computer Studies Note Pack <🖒🖒enjoy computing> ©CUTE IDEAS LEARNING 2020
Contents
Course Outline Form 3 4
1. DATA REPRESENTATION IN A COMPUTER 7
Concepts of data representation in digital computers 8
Symbolic representation using coding schemes 26
BINARY ARITHMETIC OPERATIONS 28
2. DATA PROCESSING 37
Introduction 37
Definition of terms 37
Data processing cycle 37
Stages of data collection 38
Description errors in data processing 40
Data integrity 41
Factors that determine data integrity 41
Minimizing threats to data integrity 41
Data processing methods 42
COMPUTER FILES 42
File organization methods 44
DATA PROCESSING MODES 47
3. ELEMENTARY PROGRAMMING PRINCIPLES 51
COMPUTER PROGRAMMING 51
PROGRAM DEVELOPMENT 58
Development of algorithms 65
Examples of Pseudocodes 66
Program control structures 71
Sequence 71
Selection 73
1. IF…THEN 73
2. IF…THEN…ELSE 77
NESTED IF 80
CASE CONSTRUCT 83
Iteration 85
1. WHILE loop 85
2. REPEAT…UNTIL.. 87

2 | Page
Computer Studies Note Pack <🖒🖒enjoy computing> ©CUTE IDEAS LEARNING 2020
3. The FOR loop 91
4. SYSTEM DEVELOPMENT 93
Description of a system 93
CLASSIFICATION OF SYSTEMS 93
CHARACTERISTICS OF SYSTEMS 94
INFORMATION SYSTEM 96
Theories of system development 97
Stages of system development 100
1. Problem recognition and definition 100
2. Information gathering 101
3. Requirement specification 106
4. System design 109
5. System construction 112
Testing the system 112
6. System implementation 113
7. System review and maintenance 117
System documentation 118
BIBLIOGRAPHY 119

3 | Page
Computer Studies Note Pack <🖒🖒enjoy computing> ©CUTE IDEAS LEARNING 2020
Course Outline Form 3
a. Data Representation in a computer
● Concepts and reasons of data representation
● Definition of terms: bit, byte, nibble and word
● Types of data representation
o Number systems and their representation of integral values
▪ Decimal
▪ Binary
▪ Octal
▪ Hexadecimal
o Symbolic representation using coding schemes
▪ Binary Coded Decimal Code (BCD)
▪ Extended Binary Coded Decimal Interchange Code (EBCDIC)
▪ American Standard Code for Information Interchange Code
(ASCII)
o Conversion between binary and decimal
o Further conversion of numbers from one number system to another
● Binary arithmetic operations
o Representation of signed binary numbers
o Binary addition
o Binary subtraction
b. Data processing
● Definition of terms: data, information and data processing
● Data processing cycle
o Data collection
▪ Stages of data collection
▪ Methods of data collection
o Data input
o Processing
o Output
● Description of errors in data processing
o Transcription errors
o Computational errors
o Algorithm or logical errors
● Data integrity
o Accuracy
o Timeliness
o Relevance
● Data processing methods
o Manual data processing
o Mechanical data processing
o Electronic data processing
● Computer files
o Elements of computer files
4 | Page
Computer Studies Note Pack <🖒🖒enjoy computing> ©CUTE IDEAS LEARNING 2020
o Logical and physical files
● Types of computer processing files
o Master
o Transaction
o Reference
o Report
o Backup
o Sort
● File organization methods
o Sequential
o Random/direct
o Serial
o Indexed sequential
● Electronic data processing modes
o On-line
o Real-time
o Distributed
o Time sharing
o Batch processing
o Multi-processing
o Multi-programming/Multi tasking
o Interactive processing
c. Elementary Programming Principles
● Definition of terms used in programming
o Source program
o Object code
o Translators
● Levels of programming languages
o Low level language
● Machine
● assembly
o High level language
● 3GLS
● 4GLS
● OOPs
● Internet(scripting) languages
● Advantages and disadvantages of low and high level languages
● Program development
o Program recognition
o Problem definition
o Program design
o Program coding
o Program testing and debugging
o Implementation and maintenance
5 | Page
Computer Studies Note Pack <🖒🖒enjoy computing> ©CUTE IDEAS LEARNING 2020
● Program documentation
● Development of algorithms
o Pseudocodes
o Program flowcharts
● Program control structures
o Sequence
o Selection
o Iteration (looping)
d. System Development
● Description of a system
o Soft systems
o Hard systems
o Some characteristics of systems
● Definition of an information system
● Purpose of an information system
● Theories of system development
o Traditional approach
o Rapid Application Development (RAD)
o The structured approach
● Stages of system development
o Problem recognition and definition
o Information gathering
o Requirements specification
o System design
o System construction
o System implementation
o System maintenance and review
● System documentation
o Report on fact finding
o Requirement specification
o System flowchart
o Table/file structure/ descriptions
o Sample test data
o Output reports
o User manual

6 | Page
Computer Studies Note Pack <🖒🖒enjoy computing> ©CUTE IDEAS LEARNING 2020
1. DATA REPRESENTATION IN A COMPUTER
By the end of the topic, the learner should be able to:

a) Explain concepts and reasons for data representation in a computer


b) Define the term bit, byte, nibble and word
c) Explain types of data representation in the computer
d) Perform binary arithmetic operations

Introduction
According to functionality, computers can be classified as

● Analog
● Digital
● hybrid

In digital computers, the users input is first converted and transmitted as electrical pulses that
can be represented by two distinct states ON and OFF. The ON state may be represented by a
1 and the OFF state by a 0. These two digits are referred to as Binary Digits and the form
electrical signals that the computer can understand.

Digital and analog data representation

(a) digital signal

(b) analog signal

The above waves repeat themselves at equal intervals. These types of electrical signals or
waveforms are said to be periodic.

A periodic wave representing a signal can be described using the following parameters:

1. amplitude (A)
2. Frequency (f)
3. Periodic time (T)
1. Amplitude (A)
This is the maximum displacement that the waveform of an electrical signal can
attain.
2. Frequency (f)
7 | Page
Computer Studies Note Pack <🖒🖒enjoy computing> ©CUTE IDEAS LEARNING 2020
This is the number of cycles made by the signal in one second. It’s measured in hertz
(Hz). 1Hz is equivalent to 1 cycle/second.
3. Periodic time (T)
This is the time taken by a signal to complete one cycle.
Given by the formula T=1/f, where f is the frequency of the wave.

When sending digital signals over analog telephone lines e.g. when sending an e-mail,
it has to be converted to analog signal. This is done by using amodem which is
connected to the digital computer. This process of converting a digital signal to analog
signal is known as modulation. On the receiving end, the incoming signal is converted
back to digital form in a process called demodulation.
Example

Concepts of data representation in digital computers


Data and instructions cannot be entered and processed directly into computers using human
language. Any type of data whether numbers, letters, special symbols, sound or pictures must
first be converted into machine readable form (Binary Form).

The following is how computer together with its peripheral devices handle data in its
electronic circuits, magnetic media and in optical devices.

1. Data representation in digital circuits


Electronic components, e.g. microprocessor, are made up of millions of electronic circuits.

The availability of a high voltage (on) in these circuits is represented as ‘1’ while low voltage
(off) is interpreted as ‘0’.

This forms a basis for describing data representation in digital computers usingthe binary
number system.

2. Data representation on magnetic media


The presence of a magnetic field in one direction on magnetic media is interpreted as
‘1’, while the field in the opposite direction is interpreted as ‘0’.
Magnetic technology is used mostly on storage devices which are coated with special
magnetic materials such as iron oxide.
8 | Page
Computer Studies Note Pack <🖒🖒enjoy computing> ©CUTE IDEAS LEARNING 2020
Data is written on the media by arranging the magnetic dipoles of some iron oxide
particles to face in the same direction and some others in the opposite direction as
shown below:

Data recording on the surface of a floppy disk

3. Data representation on optical media


In optical devices, the presence of light is interpreted as ‘1’ while its absence as ‘0’.
Optical devices use this technology to read or write data.
Taking an example of a CD-ROM, if the shiny surface is placed under a powerful
microscope, the surface can be observed to have very tiny holes called pits. The areas
that don’t have pits are called land.
In the following diagram, the laser beam enters a ‘pit’ and is not reflected. This is
interpreted as ‘0’. The reflected pattern of light from the rotating disk falls on a
receiving photoelectric detector that transforms the patterns into digital form.

Reading data on a CD-ROM

9 | Page
Computer Studies Note Pack <🖒🖒enjoy computing> ©CUTE IDEAS LEARNING 2020
Reason for use of binary system in computers
1. It is difficult to develop devices that can understand or process natural language
due to the complexity of natural languages
2. It is easier to construct electrical circuits based on binary or ON and OFF logic
3. Digital devices are more reliable
4. Digital devices are small in size
5. Digital devices use less energy

Bits, bytes, nibble and word


1. Bits: a bit is a binary digit which can either be 0 or 1. It is the basic unit of data and
information in digital computers.
2. Byte: a group of 8 bits used to represent a character. It is the basic unit of measuring
memory size in computers.
3. Nibble: this is half a byte or a group of 4 bits.
4. Word: consists of one or more bytes and is the largest amount of memory that the
computer can handle.
5. Word length: the number of bits in each word of a computer. e.g. a word can have a
length of 32bits, 64 bits, etc

Assignment 1: arrange the following in ascending order of size BYTE, BIT,


NIBBLE, FILE (2MKS)

Types of data representation


Computers not only process numbers, letters and special symbols but also complex types of
data such as sound and pictures. However, these complex types of data take a lot of memory
and processor time when coded in binary form. This limitation necessitates the need to
develop better ways of handling long streams of binary digits.

Higher number systems are used in computing to reduce these streams of binary into
manageable form which helps to improve the processing speed and optimize memory usage.

Number systems and their representation


A number system is a set of symbols used to represent values derived from a common base or
radix.

The magnitude of a number is evaluated using three parameters:

a. Absolute value
b. Place value or positional value
c. Base value

Absolute value
This is the magnitude of a digit.
This is the value of the digit according to its value in the number line.

10 | Page
Computer Studies Note Pack <🖒🖒enjoy computing> ©CUTE IDEAS LEARNING 2020
E.g.the digit 7 in 5271 has a value of 7 according to its value in the number line as
shown below:

Place value or positional value


This refers to the position of the digit in that number. I.e. whether “tens”, “hundreds”,
etc as shown below:

Thousands, 103 hundreds, 102 Tens, 101 ones, 100

5 2 7 1

The total value of a number is the sum of the place value of each digit making the
number. Thus, 527110
= (5x103) + (2x102) + (7x101) + (1x100)

= (5000) + (200) + (70) + (1)

=5000+200+70+1

=5271

a. Base value
This is the type of number system being used. It is also known as the radix.
The value of a number depends on the radix. Thus, 100 base 10 is not equivalent to
100 base 2.

Number systems can be classified into four major categories:

1. Decimal number system

11 | Page
Computer Studies Note Pack <🖒🖒enjoy computing> ©CUTE IDEAS LEARNING 2020
2. Binary number system
3. Octal number system
4. Hexadecimal number system

Decimal number system


This number system has ten digits ranging from 0-9.

It is also called base ten number system or denary number system.

A decimal number should always be written with a subscript 10. E.g. 13210.

Each digit of a given number has a place value which is influenced by base ten.

e.g. 345610

Place values Thousands, 103 hundreds, 102 Tens, 101 ones, 100
(10n)

Decimal 3 4 5 6
digit

(3x103)+ (4x102) + (5x101) + (6x100) = 345610

Binary number system


This uses two digits namely, 1 and 0 to represent numbers.

The place values of binary numbers go up in factors of two.

Binary numbers are written with base two, i.e. X2.

For example, the number 10102 , the rightmost digit has a place value of 1 x 20 while the
leftmost has a place value of 1 x 23 as illustrated below:

Place eights, 23 = 8 fours, 22 = 4 twos, 21 = 2 ones, 20 = 1


values (2n)

Binary 1 0 1 0
digit

Thus, we can get that the decimal equivalent of 10102 is

X10= (1x23) + (0x22) + (1x21) + (0x20)

=8+0+2+0

12 | Page
Computer Studies Note Pack <🖒🖒enjoy computing> ©CUTE IDEAS LEARNING 2020
=1010

Octal number system


This uses eight digits running from 0 – 7 to represent values of a number.

The place values of octal numbers go up in factors of eight from left to right.

For example to represent the octal number 72458, we place each digit in its positional
value as follows:

Place 83 = 512 82 = 64 81 = 8 80 = 1
values (8n)

octal digit 7 2 4 5

Thus the decimal equivalent of 72458 can be got as follows:

X10= (7x83)+ (2x82)+ (4x81)+ (5x80)

= (7x512) + (2x64) + (8x4) + (5x1)

=3584+128+32+8

=374910

Hexadecimal number system


This number system uses sixteen digits ranging from 0-9 and letters A-F where A is
equivalent to 10, B to 11 up to F which is equivalent to 15 in base ten systems.
A hexadecimal number is usually denoted using subscript 16 or capital letter H to the
right of the number.
The place value of hexadecimal numbers goes up in factors of sixteen as shown
below:
e.g. 94616

Place values 162=256 161=16 160=1


(16n)

Hexadecimal 9 4 6
digit
Thus the decimal equivalent of 94616 can be got as follows:
X10= (9x162) + ((4x161) + (9x160)
= (9x256) + (16x4) + (6x1)
=2304+64+6
=237410

13 | Page
Computer Studies Note Pack <🖒🖒enjoy computing> ©CUTE IDEAS LEARNING 2020
Base 10 to base 16

Base 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
10

Base 0 1 2 3 4 5 6 7 8 9 A B C D E F
16

Reasons for using octal and hexadecimal number systems


1. Automatic data compression - A single octal or hexadecimal digit encodes
more than one binary digit, hence storage media can save on space.
2. Improves transmission efficiency – instead of transmitting long digits of
0’s and 1’s between devices, the data can be encoded as octal or hexadecimal.

Base conversion
The following conversations will be considered:

1. Conversion between binary and decimal numbers


2. Converting octal numbers to decimal and binary form
3. Converting hexadecimal numbers to decimal and binary form

Conversion between binary and decimal numbers

Decimal to binary conversion


To convert a number from base 10 to base 2, the decimal number is continuously
divided by 2.
At each level of the division, the remainder which is either a 1 or 0 is written to the
right of the quotient.
The remainders are then copied bottom upwards.
The series of 1’s and 0’s obtained represent the binary equivalent of the number.
Examples:

Convert the following decimal numbers into binary


1. 4510

2 45

14 | Page
Computer Studies Note Pack <🖒🖒enjoy computing> ©CUTE IDEAS LEARNING 2020
2 22 R 1
2 11 R 0
2 5 R 1
2 2 R 1
2 1 R 0
2 0 R 1

2. 12110

2 121
2 60 R 1
2 30 R 0
2 15 R 0

2 7 R 1
2 3 R 1
2 1 R 1
2 0 R 1

3. 2610

15 | Page
Computer Studies Note Pack <🖒🖒enjoy computing> ©CUTE IDEAS LEARNING 2020
2 26

2 13 R 0
2 6 R 1
2 3R 0

2 1 R 1
2 0 R 1

TASK:

CONVERT THE FOLLOWING DECIMAL NUMBERS TO BINARY:

A. 24710
B. 4510
C. 910
D. 6210
E. 12110
F. 13210
G. 1410
H. 52610
I. 310

Converting decimal fraction to binary


We use the same method of long division method for the integral part but for the fractional
part we follow the following method:

1. Multiply the fractional part by 2 and write down its product


2. Take the fractional part of the immediate product and multiply it by 2 again.
3. Continue with this process until the fractional part of the subsequent product is 0 or
starts repeating the value of the original fractional part of the number being converted.

16 | Page
Computer Studies Note Pack <🖒🖒enjoy computing> ©CUTE IDEAS LEARNING 2020
4. The binary equivalent of the fractional part is extracted by reading the respective
integral digits from the top downwards.
5. Combine the result of the integral part and fractional part to set the binary equivalent.

Examples

a. Convert 0.37510 into binary form

Sol.

0.375 x 2 = 0.750

0.750 x 2 = 1.500

0.500 x 2 = 1.000

You read the highlighted numbers going downward.

Thus 0.37510 = 0.0112

b. Convert 7.562510 into its binary equivalent


Sol.
i. Convert the integral part separately:

2 7

2 3 R 1

2 1 R 1
2 0 R 1

ii. Convert the fractional part


0.5625 x 2 = 1.125
0.125 x 2 = 0.250
0.250 x 2 = 0.500
0.500 x 2 = 1.000

17 | Page
Computer Studies Note Pack <🖒🖒enjoy computing> ©CUTE IDEAS LEARNING 2020
Thus, 0.562510 = 0.10012

Therefore, 7.562510 = 1112 + 0.10012 =111.10012

c. Convert 0.4010 into its binary equivalent.


Sol.
0.40 x 2 = 0.80
0.80 x 2 = 1.60
0.60 x 2 = 1.20
0.20 x 2 = 0.40
0.40 x 2 = 0.80 (fractional part is repeating itself)
Note: 0.40 x 2 gives the original decimal fraction. This means that the bit is
recurring and has to be ignored.
Therefore, 0.4010 = 0.0110.2
Exercise
Convert the following decimal numbers into their binary equivalent:
1. 0.45010
2. 2.50010
3. 0.625010
4. 5.162510

Converting binary numbers to decimal


To convert a binary number to decimal:

1. Write the place values starting from the right hand side.
2. Write each digit under its place value.
3. Multiply each digit by its corresponding place value.
4. Add up the products.

Examples

Convert the following binary numbers to their decimal equivalent:

a. 1011012

Sol.

1. Place each digit under its corresponding place value

Place 25 24 23 22 21 20
value

Binary 1 0 1 1 0 1
digits

2. Multiply each digit by its corresponding place value

= (1 x 25) + (0 x 24) + (1 x 23) + (1 x 22) + (0 x 21) + (1 x 20)


18 | Page
Computer Studies Note Pack <🖒🖒enjoy computing> ©CUTE IDEAS LEARNING 2020
= 32 + 0 + 8 + 4 + 0 + 1

= 4510

NB: REMEMBER TO INDICATE THE BASE SUBSCRIPT SINCE IT


DISTINGUISHES THE VALUE FROM THE OTHER NUMBER SYSTEMS.

b. 1001002

Sol.

Place 25 24 23 22 21 20
value

Binary 1 0 0 1 0 0
digits

= (1 x 25) + (0 x 24) + (0 x 23) + (1 x 22) + (0 x 21) + (0 x 20)

= 32 + 0 + 0 + 4 + 0 + 0

= 3610

c. 10110012

Place 26 25 24 23 22 21 20
value

Binary 1 0 1 1 0 0 1
digits

= (1 x 26) + (0 x 25) + (1 x 24) + (1 x 23) + (0 x 22) + (0 x 21) + (1 x 20)

= 64 + 0 + 16 + 8 + 0 + 0 + 1

= 8910

Assignment

1. 01012
2. 111101112
3. 10112

Converting binary fractions to decimal number


A decimal number which has both an integral and fractional part is called a real number.

19 | Page
Computer Studies Note Pack <🖒🖒enjoy computing> ©CUTE IDEAS LEARNING 2020
The weight of the integral part of the real number increases from right to left in factors of 10
while that of the fractional part decreases from left to right in factors of 10-x .

Examples:

Convert the following binary numbers to their decimal equivalent


1. 11.110112

Place 21 20 2-1 2-2 2-3 2-4 2-5


value
.
Value 2 1 0.5 0.25 0.125 0.0625 0.03125
in base
ten .
Binary 1 1 1 1 0 1 1
digit
.
=(2 x 1) + (1x1) + (0.5x1) + (0.25x1) + (0.125x0) + (0.0625x1) + (0.03125x1)

=2+1+0.5+0.25+0+0.0625+0.03125

=3.8437510

NB: when converting a real number from binary to decimal, work out the integral and
fractional parts separately then combine them.

2. 11.0112

Place 21 20 2-1 2-2 2-3


value
.
Value in 2 1 0.5 0.25 0.125
base ten
.
Binary 1 1 0 1 1
digit
.
= (2X1) + (1X1) + (0.5 X 0) + (1 X 0.25) + (1 X 0.125)

= 2 + 1 + 0 + 0.25 + 0.125

= 3.37510

20 | Page
Computer Studies Note Pack <🖒🖒enjoy computing> ©CUTE IDEAS LEARNING 2020
ASSIGNMENT

1. 11.110112
2. 0.10012
3. 0.0112

2. Conversion between octal numbers to decimal and binary numbers


a. Converting octal numbers to decimal numbers
To convert an octal number to decimal:

1. Write the place values starting from the right hand side.
2. Write each digit under its place value.
3. Multiply each digit by its corresponding place value.
4. Add up the products.

Examples:
Convert the following numbers to their decimal equivalent:

1.5128
Sol.
● Write each digit under its place value:

Place value 82 81 80

Octal digit 5 1 2

● Multiply each number by its place value

= (5 x 82) + (1 x 81) + (2 x 80)

= (5 x 64) + (1 x 8) + (2 x 1)

=320 + 8 + 2

= 33010

2. 3218

Place value 82 81 80

21 | Page
Computer Studies Note Pack <🖒🖒enjoy computing> ©CUTE IDEAS LEARNING 2020
Octal digit 3 2 1

= (3 x 82) + (2 x 81) + (1 x 80)

= (3 x 64) + (2 x 8) + (1 x 1)

= 192 + 16 +1

=20910

3. 3328

Place value 82 81 80

Octal digit 3 3 2

= (3 x 82) + (3 x 81) + (2 x 80)

= (3 x 64) + (3 x 8) + (2 x 1)

= 192 + 24 + 2

= 21810

4. 11258

Place value 83 82 81 80

Octal digit 1 1 2 5

= (1 x 83) + (1 x 82) + (2 x 81) + (5 x 80)

= (1 x 512) + (1 x 64) + (2 x 8) + (5 x 1)

= 512 + 64 + 16 + 5

= 59710

Assignment

Convert the following octal numbers to decimal

1. 10008
22 | Page
Computer Studies Note Pack <🖒🖒enjoy computing> ©CUTE IDEAS LEARNING 2020
2. 1668
3. 1028
4. 3458

Converting octal numbers to binary numbers


To convert an octal number to binary, each digit is represented by 3 binary digits.

Thus, we use the following table:

Octal digit Binary equivalents


0 000
1 001
2 010
3 011
4 100
5 101
6 110
7 111

Examples

Convert the following octal numbers to their binary equivalent:

1. 5268
Soln.
We work from the left to right, each octal digit is represented using 3 digits and then
combined together to get the final binary equivalent.
Thus:

5 2 6

101 010 110

5268 = 1010101102
2. 3328
Soln.

3 3 2

23 | Page
Computer Studies Note Pack <🖒🖒enjoy computing> ©CUTE IDEAS LEARNING 2020
011 011 010

3328 =0110110102
3. 3218

3 2 1

011 010 001

3218=0110100012
4. 2228

2 2 2

010 010 010

2228= 0100100102

5. 14138

1 4 1 3

001 100 001 011

14138 = 0011000010112

Assignment

Convert the following octal numbers to their binary equivalent

1. 2448
2. 14138]0
3. 33708
4. 33708
5. 13318

24 | Page
Computer Studies Note Pack <🖒🖒enjoy computing> ©CUTE IDEAS LEARNING 2020
3. Conversion between hexadecimal numbers to decimal and binary numbers

Converting hexadecimal numbers to binary numbers

To convert a hexadecimal number to binary, each digit is represented by 4 binary digits as


shown in the table below:

Hexadecimal digit Binary equivalents


0 0000
1 0001
2 0010
3 0011
4 0100
5 0101
6 0110
7 0111
8 1000
9 1001
A 1010
B 1011
C 1100
D 1101
E 1110
F 1111

We express each hexadecimal digit as a four bit binary number and then arrange the groups:

Example

Convert the following hexadecimal numbers into their binary equivalent:

1. 32116

3 2 1

0011 0010 0001

Thus, 32116 we combine the three sets of bits to get:


=0011001000012
2. 5E6H

5 E 6

25 | Page
Computer Studies Note Pack <🖒🖒enjoy computing> ©CUTE IDEAS LEARNING 2020
0101 1110 0110

=0101111001102
3. D116

D 1

1101 0001

=110100012

Assignment

Convert the following hexadecimal numbers into their binary equivalent:

1. EFDH
2. 585CH
3. 247H

Converting binary numbers to hexadecimal numbers

To convert from binary to hexadecimal, we group the digits of the binary number into
groups of fourfromright to left.Then write the hexadecimal equivalent of each group.

FOR EXAMPLE:

1. 110100012
Soln:
11010001
1101 = D
0001 = 1

Therefore:

110100012 = D1H

2. 0101111001102
0101 1110 0110
0101 = 5
1110 = E
0110 = 6

Therefore, 0101111001102 = 5E616


26 | Page
Computer Studies Note Pack <🖒🖒enjoy computing> ©CUTE IDEAS LEARNING 2020
ASSIGNMENT

CONVERT THE FOLLOWING NUMBERS TO THEIR HEXADECIMAL EQUIVALENT:

1. 001100100000120
2. 11110001101112

Converting hexadecimal numbers to decimal numbers

To convert hexadecimal to decimal:

1. Right the place values starting from the left hand side.
2. Write the hexadecimal digits, if it’s a letter write its decimal equivalent. e.g. ‘A’=10
3. Multiply each hexadecimal digit with its corresponding place value and then add the
products.

Examples

Convert the following hexadecimal digits to their binary equivalents:

1. 11116
Soln.

Place value 162=256 161=16 160=1

Hexadecimal 1 1 1
digit

= (256 x 1) + (16 x 1) + (1 x 1)
=256 + 16 + 1
= 27310

2. A9H

Place value 161=16 160=1

Hexadecimal A=10 9
digit

= (16 x 10) + (9 x 1)

=160 + 9
27 | Page
Computer Studies Note Pack <🖒🖒enjoy computing> ©CUTE IDEAS LEARNING 2020
= 16910

Assignment

Convert the following hexadecimal numbers into their decimal equivalent:

1. 32H
2. 11916
3. 10AFFD16
4. 1AD116

Symbolic representation using coding schemes


In computing, a single character such as a letter, a number or a symbol is represented using a
group of bits. The number of bits per character depends on the coding scheme used.

There are three common coding schemes namely:

1. Binary Coded Decimal (BCD)


2. Extended Binary Coded Decimal Interchange Code (EBCDIC)
3. American Standard Code for Information Interchange (ASCII)

Binary Coded Decimal (BCD)

This is a 4-bit code used to represent numeric data only.

For example, a number like 9 can be represented as 10012 ; 7 as 01112.

BCD is mostly used in simple electronic devices like calculators and microwaves because
it makes it easier to process and display individual numbers on their Liquid Crystal
Display (LCD) screens.

NB: an enhanced format of BCD known as standard Binary Coded Decimal, is a


6-bit representation scheme which can represent non-numeric characters.

Examples on conversions using BCD

Write the BCD equivalent of the following numbers:

i. 2910
Soln.

2 2

28 | Page
Computer Studies Note Pack <🖒🖒enjoy computing> ©CUTE IDEAS LEARNING 2020
1 R 0

2
0 R 1

210 = 00102

2 9

2
4 R 1

2
2 R 0

2
1 R 0

2
0 R 1

910 = 1001
=001010012

ii. 79610

2 7

2
3 R 1

2
1 R 1

29 | Page
Computer Studies Note Pack <🖒🖒enjoy computing> ©CUTE IDEAS LEARNING 2020
2
0 R 1

=01112

2 9

2
4 R 1

2
2 R 0

2
1 R 0

2
0 R 1

2 6

2
3 R 0

30 | Page
Computer Studies Note Pack <🖒🖒enjoy computing> ©CUTE IDEAS LEARNING 2020
2
1 R 1

2
0 R 1

Thus, 79610 =0111100101102

Extended Binary Coded Decimal Interchange Code (EBCDIC)

This is an 8-bit character coding scheme primarily used on IBM computers.


Using this scheme a total of 256(28) characters can be coded.
e.g.
Under EBCDIC the number 9 is represented as 111110012.

American Standard Code for Information Interchange (ASCII)

This is a 7-bit code, which means that only 128 characters (27) can be
represented.

When a document is in ASCII format, it means that the text is ‘plain’ with no
formatting such as tabs, bold or underline that any computer can understand. This
makes it easy to import the file into other applications without issues of interpreting.
E.g. Windows Notepad creates ASCII text.
E.g.under ASCII the number 9 is represented as 01110012.
NB: manufacturers have added an eighth bit to this coding scheme which can
now provide for 256 characters. This coding scheme is referred to as an 8-bit
American Standard Code for Information Interchange.

BINARY ARITHMETIC OPERATIONS


The four basic arithmetic operations applied on numbers (addition, subtraction, multiplication
and division)are performed inside the central processing unit by the arithmetic and logic unit
(ALU).
31 | Page
Computer Studies Note Pack <🖒🖒enjoy computing> ©CUTE IDEAS LEARNING 2020
The ALU cannot perform binary subtraction directly, it therefore uses a process called
complementation, whereas that of multiplication and division is performed using a method
called shifting.

Representation of signed binary numbers

There are three common ways of representing a signed binary number(positive or negative).

1. Prefixing an extra sign bit to a binary number


2. Using ones complement
3. Using twos complement

Prefixing an extra sign bit to a binary number

In decimal numbers, a signed number has a prefix ”+” for a positive number e.g. +210
and”-” for a negative number e.g. -210.

In binary a negative number may be represented by prefixing a digit 1 to the number, while a
positive number may be represented by prefixing a digit 0.

NB :the problem of using this method is that zero can be represented in two ways
i.e.(0)00000002 or (1)00000002.

Ones complement

In decimal numbers, we talk of nine’s complement where the nine complement of 9 is 0, that
of 6 is 3, that of 5 is 4 e.t.c

In binary numbers, the unary operator Bitwise NOT is applied to the number to get the ones
complement. This operator performs logical negationon each bit. This means that 0s are
negated to 1s while 1s are negated to zero.

E.g. 001011012 in ones complement is 110100102 which represents -4510.

NB: like the method of adding an extra sign bit, in ones complement, there are two ways of
representing a zero.

Twos complement

This method is equivalent to tens complement in decimal numbers.

It is the most popular way of representing negative numbers in computer systems.

Advantages of using twos complement

1. There are no two ways of representing a zero as in the case with the other two
methods.
32 | Page
Computer Studies Note Pack <🖒🖒enjoy computing> ©CUTE IDEAS LEARNING 2020
2. Effective addition and subtraction can be done even with numbers that are represented
with a sign bit without a need for extra circuitries to examine the sign of an operand.

To get the two complements of a number, we first get its ones complement then add 1.

E.g. to get the twos complement of 4510 ,

1. first find the binary equivalent of 4510


Thus, 4510 = 001011012
2. find the ones complement of 001011012
NOT (001011012) = 11010010
3. get the twos complement of 11010010
Two’s complement = 110100102 + 12
=110100112

Binary addition

The five possible additions in binary are:

1. 02 + 02 = 02
2. 02 + 12 = 12
3. 12 + 02 = 12
4. 12 + 12 = 102(0 carry 1)
5. 12 + 12 +12 = 112(1 carry 1)

Examples of binary addition:

Find the sum of the following numbers:

1. 1112 + 0112

Soln.

1 1 1
+ 0 1 1

1 0 1 0

This can be summarized in a table as shown below:


1st number 1 1 1

2nd number 0 1 1

Carry digit - 1 1

Sum 10 1 0

=10102

33 | Page
Computer Studies Note Pack <🖒🖒enjoy computing> ©CUTE IDEAS LEARNING 2020
2. 00110+01101
Soln.

0 0 1 1 0

+ 0 1 1 0 1

1 0 0 1 1

1st number 0 0 1 1 0

2nd number 0 1 1 0 1

Carry digit 0 1 1 0 0

Sum 1 0 0 1 1

=100112

3. 101102 + 10112 + 1112


Soln.

1 0 1 1 0

+ 1 0 1 1

1 0 0 0 0 1

1 0 0 0 0 1

+ 1 1 1

1 0 1 0 0 0

=1010002

4. 10102 + 1112
Soln.
1 0 1 0
+ 1 1 1

1 0 0 0 1

=100012

5. 11112 + 1112
34 | Page
Computer Studies Note Pack <🖒🖒enjoy computing> ©CUTE IDEAS LEARNING 2020
Soln.
1 1 1 1
+ 1 1 1
1 0 1 1 0

=101102

6. 1000112 + 101012 + 1112


Soln.
1 0 0 0 1 1
+ 1 0 1 0 1
1 1 1 0 0 0
+ 1 1 1
1 1 1 1 1 1

= 11111112

7. 1100102 + 1110112 + 11002


Soln.
1 1 0 0 1 0
+ 1 1 1 0 1 1
1 1 0 1 1 0 1
+ 1 1 0 0
1 1 1 1 0 0 1

=11110012

Binary subtraction

Direct subtraction

The four possible subtractions in binary are:

1. 02 - 02 = 02
2. 12 - 02 = 12
3. 12 - 12 = 02
4. 02 -12 = 12 (borrow 1 from the next most significant digit to make 0 become 102 ,
hence
102 -12 = 12)

Examples

Work out the following binary subtraction

1. 11012 - 10102
1 1 0 1
35 | Page
Computer Studies Note Pack <🖒🖒enjoy computing> ©CUTE IDEAS LEARNING 2020
- 1 0 1 0
0 0 1 1

Explanation

Working from right to left, proceed as follows:


o 1 – 0 = 1,
o 0 – 1 = 1 (Borrow 1 to make the current value 102 (210) from the next
significant digit, thus: 10 – 1 =1),
o 0 – 0 = 0,
o 1–1=0

Therefore, 11012 - 10102=00112

2. 101012 - 1102

1 0 1 0 1

- 1 1 0
0 0 1 1 1
Therefore, 101012 - 1102 = 11112
3. 100112 - 11002
Therefore, 100112 - 11002 = 1112
4. 110012 - 10102
Therefore, 110012 - 10102 = 11112

5. 110112 - 1112
Therefore, 110112 - 1112 = 101002
6. 1012 -1002
Therefore, 1012 - 1002=12

Assignment

1. 11002 - 0112
2. 1110112 - 1102
3. 111111112 - 101011012
4. 111012 - 10102

Subtraction using ones complement

The main purpose of using ones complement in computers is to perform binary subtraction.

For example to find the result of 510 – 310 using ones complement, the following steps are
followed:

36 | Page
Computer Studies Note Pack <🖒🖒enjoy computing> ©CUTE IDEAS LEARNING 2020
Step 1: rewrite the equation as 5 + (-3). This is to show that the computers perform binary
subtraction by adding the binary equivalent of 5 to the ones complement of 3.

Step 2: convert the absolute value of 3 into 8-bit equivalent i.e. 000000112

Step 3: get the ones complement of 000000112 i.e. 111111002 which is the binary
representation of -310.

Step 4: add the binary equivalent of 5 to the ones complement of 3 i.e.

0 0 0 0 0 1 0 1

+ 1 1 1 1 1 1 0 0

1 0 0 0 0 0 0 0 1

From the above answer, we will observe that it has a ninth bit. This bit is known as an
overflow bit.

The overflow digit is added back to the magnitude of the 8-bit difference. Therefore the result
becomes 00000001 + 1 = 000000102.

Examples:

Use ones complement to subtract 1012 from 10002:

Soln.

10002 - 1012

1000 + (-101)

00001000 + (-00000101)

1C of 00000101 = 11111010

0 0 0 0 1 0 0 0

+ 1 1 1 1 1 0 1 0

1 0 0 0 0 0 0 1 0

+ 1

0 0 0 0 0 0 1 1

= 112

Using ones complement, work out 1510 – 810 in binary form.

37 | Page
Computer Studies Note Pack <🖒🖒enjoy computing> ©CUTE IDEAS LEARNING 2020
Soln.

15 + (-8)

1510= 000011112

810 = 000010002

1C OF 810 = 111101112

0 0 0 0 1 1 1 1

+ 1 1 1 1 0 1 1 1

1 0 0 0 0 0 1 1 0

0 0 0 0 0 1 1 1

= 1112

ASSIGNMENT:

USING THE ONES COMPLEMENT, CALCULATE:

A. 3110 - 1710
B. 1310 - 610
a. Subtraction using twos complement

We use the same method like in ones complement: for example to get the difference in 510 –
310 using twos complement: we proceed as follows:

Step 1: rewrite the equation as 5 + (-3). This is to show that the computer performs binary
subtraction by adding the binary equivalent of 5 to the ones complement of 3.

Step 2: convert the absolute value of 3 into 8-bit equivalent i.e. 000000112

Step 3: get the ones complement of 000000112 i.e. 111111002 which is the binary
representation of -310 .

Step 4: add a 1 to the ones complement of 11111100 i.e. 111111002 + 12 = 111111012

Step 5:add the binary equivalent of 5 to the ones complement of 3 i.e.

0 0 0 0 0 1 0 1

+ 1 1 1 1 1 1 0 1

1 0 0 0 0 0 0 1 0

38 | Page
Computer Studies Note Pack <🖒🖒enjoy computing> ©CUTE IDEAS LEARNING 2020
Step 6: the overflow bit is ignored, thus the result is 000000102 which is the binary
equivalent of +2.

Examples:

Use twos complement to subtract 1012 from 10002:

Soln.

10002 - 1012

1000 + (-101)

00001000 + (-00000101)

1C of 00000101 = 11111010

2C of 00000101 = 11111010 + 1

= 111110112

0 0 0 0 1 0 0 0

+ 1 1 1 1 1 0 1 1

1 0 0 0 0 0 0 1 1

Ignore the overflow

= 112

Using twos complement, work out 1510 – 810 in binary form.

Soln.

15 + (-8)

1510= 000011112

810 = 000010002

1C OF 810 = 111101112

2C OF 810 = 111101112+1

= 11111000

0 0 0 0 1 1 1 1

+ 1 1 1 1 1 0 0 0

1 0 0 0 0 0 1 1 1
39 | Page
Computer Studies Note Pack <🖒🖒enjoy computing> ©CUTE IDEAS LEARNING 2020
Ignoring the overflow

= 1112

ASSIGNMENT
ASSIGNMENT:

USING THE TWOS COMPLEMENT, CALCULATE:

A. 2710 -510
B. 1510 - 610

40 | Page
Computer Studies Note Pack <🖒🖒enjoy computing> ©CUTE IDEAS LEARNING 2020
2. DATA PROCESSING
By the end of the lesson, the learner should be able to:

a) Define the terms data, information and data processing


b) Describe data processing cycle
c) Explain types of errors in data processing
d) Explain the various methods of data processing
e) Describe data integrity
f) Describe a computer file
g) Describe types of computer files
h) Describe file organization methods
i) Describe the various data processing modes.

Introduction

Definition of terms
Data: this refers to the raw facts that do not have much meaning to the user and may include
numbers, letters, symbols, sound or images.

Information: this refers to the meaningful output obtained after processing the data.

Data processing: this refers to the process of transforming raw data into meaningful output.

Data processing cycle


This refers to the sequence of activities involved in data transformation from its raw form to
get information.

It is referred to as a cycle because the output obtained can be stored after processing and may
be used in future as input.

The four main stages of data processing cycle are:

1. Data collection
2. Data input
3. Processing
4. Output

This can be represented diagrammatically as shown below:

41 | Page
Computer Studies Note Pack <🖒🖒enjoy computing> ©CUTE IDEAS LEARNING 2020
1. Data collection
Data collection is also referred to as data gathering or fact finding.

It involves looking for crucial facts needed for processing.

In most cases, the data is collected after sampling. Sampling is the process of selecting
representative elements e.g. people, organizations from an entire group(population) of
interest.

Methods of data collection include:

● Interviews
● Use of questionnaires
● Observation

Some of the tools used in data collection include:

● Source documents such as forms


● Data capture devices such as digital cameras

Stages of data collection


The stages of data collection include:

a) Data creation

42 | Page
Computer Studies Note Pack <🖒🖒enjoy computing> ©CUTE IDEAS LEARNING 2020
This includes identification of the data required to meet a specific need and the
process of capturing the data in a form that can be input easily into the
computer system.
b) Data transmission
This will be determined according to the method and medium of data
collection adopted:
● If the computer is located at a central point, the documents will be
physically “transmitted”, i.e. by the post office or a courier to the
central point (e.g. posting batches of source documents)
● Transmission can also be done electronically.
c) Data preparation
This is the conversion (transcription) of the data from the source documents to
machine readable format.
If the data is captured already in electronic format, it may not need
transcription.
d) Media conversion
Data may need to be converted from one medium to another for faster input.
E.g. from a floppy disk to a hard disk.
e) Input validation
Data entered into the computer is subjected to verification and validity checks
by a computer program before being processed to reduce errors at the input.

Data verification – this is confirming that the input data is correct by


comparing the already stored data with what is being typed in.
Data verification methods
1. Proof Reading / visual check
After the data has been entered a person compares the original data with
the data in the computer (either on the screen or using a print-out).
If mistakes are spotted they can be corrected by the person.
2. Double-Entry
The data is entered into the computer twice (preferably by two different
people).
The computer compares the two sets of data to see if they match. If not it
generates an error and a person will need to correct the mistake.
A common example of double-entry verification is when you are asked to
choose a new password - you are usually asked to type it in twice to make
sure you've typed it correctly (since the actual letters are hidden)

Data validation: this is using a computer program to check that the data
entered satisfies the laid down rules
Types of validation checks
1. Presence check – ensures that the data to be processed exist
2. Type check – ensures that the data is of the correct data type

43 | Page
Computer Studies Note Pack <🖒🖒enjoy computing> ©CUTE IDEAS LEARNING 2020
3. Format check – ensures that the order of the characters to be input is
achieved. E.g. dates should be entered in the format of dd/mm/yyyy
4. Range check – ensures that the data is within the limits e.g. marks should
be in the range of >0 and <100
5. Length check – ensures that the correct number of characters is input
6. Consistency check- makes sure that data in one field is consistent with data
in another field. E.g. If ‘Male’ has been typed into gender then title cannot
be ‘Mrs’
f) Sorting
In this case the data needs to be arranged into the sequence required for
processing.

2. Data input
This refers to the process where the collected data is converted from human readable
form to machine readable form. The conversion takes place in the input device.
3. Processing
This is the transformation of input data by the Central Processing Unit(CPU) to a
more meaningful output (information). E.g. calculations, comparing values e.t.c.
4. Output
This is the final activity of producing the desired output or information.
The information can then be distributed to the target group(information
dissemination) or stored for future use.
The process of dissemination may involve electronic presentation over radio or
television, distribution of hard copies, broadcast message over the internet or mobile
phones, e.t.c.

Description errors in data processing


Some of the errors that influence the accuracy of data input and information output
include:
● Transcription
● Computation
● Algorithm

1. Transcription errors
These errors occur during data entry.
They include:
● Transposition errors
These result from incorrect arrangement of characters i.e. putting
characters in the wrong order. E.g. the user may enter 396 instead of 369.
● Misreading errors
These are brought around by incorrect reading of the source document by
the user and hence entering wrong values. E.g. a user may misread a hand
written figure such as 589 and type S89 instead i.e. confusing 5 for S.
44 | Page
Computer Studies Note Pack <🖒🖒enjoy computing> ©CUTE IDEAS LEARNING 2020
Transcription errors can be avoided by using modern data capture devices such as bar code
readers, optical character readers, and digital cameras etc. which enter data with minimum
user intervention.

2. Computational errors
These occur when an arithmetic operation does not produce the expected results.
The most common computation errors include:
● Overflow errors
This occurs if the result from a calculation is too large to be stored in the
allocated memory space. E.g. if a byte is represented using 8 bits, an
overflow will occur if the result of a calculation gives a 9-bit number.
● Truncation errors
These result from having real numbers that have a long fractional part
which cannot fit in the allocated memory space.
The computer would cut off the extra characters from the fractional part.
E.g. a number like 0.784968 can be truncated to four digits become
07.784.
● Rounding errors
These result from raising or lowering a digit in a real number to the
required rounded number.
If the successor of the next number after the number of decimal places to
be rounded off is greater than five, it is raised.
If the successor of the next number after the number of decimal places to
be rounded off is below five, it is rounded down.
E.g. 35.777 to one decimal place is 35.8
35.737 to one decimal place is 35.7
3. Algorithm errors
An algorithm is a set of procedural steps followed to solve a given problem.
Algorithms are used as design tools when writing programs.
Wrongly designed programs would result in a program that runs but gives
erroneous output.

Data integrity
Data integrity refers to the correctness and completeness of data entered in a computer or
received from the information system.

Factors that determine data integrity


1. Accuracy
This refers to how close an approximation is to an actual value.
In numbers, the accuracy of a real number depends on the number. E.g. 3.142 is more
accurate than 3.1.
2. Timeliness
45 | Page
Computer Studies Note Pack <🖒🖒enjoy computing> ©CUTE IDEAS LEARNING 2020
This is the relative accuracy of data in respect to the current state of affairs for which
it is needed.
Timeliness of data and information is important because data and information have a
time value attached to them. If received late, information may have become
meaningless to the user.
3. Relevance
Data entered into the computer must be relevant in order to get the expected output.
Thus the data entered must be pertinent to the processing needs at hand and must meet
the requirements of the processing cycle.
4. Audibility
This is audit ability.
It also refers to verifiability.
This is the ability of users to check the accuracy and completeness of information.

Minimizing threats to data integrity


Threats to data integrity can be minimized through the following ways:

(i) Control access to data by enforcing security measures


(ii) Back up data preferably on external storage media
(iii) Design user interfaces that minimize chances of invalid data entry.
(iv) Using error detection and correction software when transmitting data.
(v) Using devices that capture data directly from the source. E.g. digital cameras,
optical character readers

Data processing methods


Data can be processed using one of the following methods:
● Manually
● Mechanically
● Electronically

Manual data processing


In manual data processing, tasks are done manually with a pen and paper.

No machines are used to process data instead simple tools such as tables and rulers are
used.

The processing of each task involves a person using the brain in order to respond to
queries.

Mechanical data processing


Mechanical systems involve use of mechanical machines such as calculators, type
writers, cash registers, etc to help in automation of manual tasks.
46 | Page
Computer Studies Note Pack <🖒🖒enjoy computing> ©CUTE IDEAS LEARNING 2020
Electronic data processing
This involves use of electronic programmable and microprocessor controlled devices
such as computers, washing machines, modern digital television sets, etc.

COMPUTER FILES
Def: a file is a collection of related records that give a complete set of information about a
certain item or entity.

A file can be stored manually in a file cabinet or electronically in computer storage devices.

Advantages of computerized filing system


1. Information takes up less space than the manual system.
2. Enhance data integrity and reduces duplication.
3. Offers fast access and retrieval of data
4. It enhances data integrity and reduces duplication.
5. Enhances security of data if proper care is taken to secure it.

Elements of a computer file


A computer file is made up of three elements:

i. Characters
This is the smallest element in a computer file and refers to a letter, number or
symbol that can be entered, stored and output by a computer.
ii. Field
This is a single character or collection of characters that represents a single piece
of data. E.g. in employee’s record, employee number is a field.
iii. Records
This is a collection of related fields that represent a single entity. E.g.in a class
score sheet, details of each student in a row such as admission number, name, total
marks and position make up a record.

Classification of computer files


Computer files can be viewed in two ways:

Logical files
This is the way the user views the file in terms of its contents and the processing
to be carried upon them. It doesn’t have implementation specific information like
field, data types, and size and file type.

Physical files
This is the actual arrangement of the file contents into the storage media surface
and how the processing operations are made possible.

47 | Page
Computer Studies Note Pack <🖒🖒enjoy computing> ©CUTE IDEAS LEARNING 2020
Types of computer processing files
The main common types of processing files include:

i. Master file
This is the main file that contains relatively permanent records about particular
items or entries. E.g. a customer file will contain details of a customer such as
customer id, name and contact address(static fields which rarely change) and data
about earning and deductions(dynamic fields which frequently change)
ii. Transaction (movement) file
This is used to hold input data during transaction processing.
This file is used to update dynamic data on master files.
iii. Reference file
This is mainly used for reference or look up purposes.
Look up information is that information which is stored in a separate file but is
required during processing. E.g. at a point of sales terminal, the item code entered
manually or using a bar code reader looks up the item description and price from a
reference file stored on a storage device.
iv. Sort file
These files are created from existing transaction or master files.
It stores data which is arranged in a particular order.
Used where data is to be processed sequentially.
v. Back- up file
These files are duplicate copies of existing files.
They are used to supplement the operational files in case of loss by any reason.
vi. Report file
Store relatively permanent records extracted from the master file or generated
after processing.
They are used to prepare reports that can be printed at a later date, e.g. list of
absentees, overtime, etc.

File organization methods


File organization refers to the way data is stored in a file.

Importance of file organization


● Determines method of access
● Determines efficiency
● Determines flexibility
● Determines storage devices to be used

There are four methods of storing files and retrieving them from secondary storage devices:

● Sequential

48 | Page
Computer Studies Note Pack <🖒🖒enjoy computing> ©CUTE IDEAS LEARNING 2020
● Random
● Serial
● Indexed sequential

Sequential file organization


Records are stored and accessed in a particular order sorted using a key field.

Retrieval requires searching sequentially through the entire file record by record from the
beginning to the end.

Because the records are sorted in a particular order, better file search methods like the binary
search technique can be used to reduce the time used to search the file.

Advantages of sequential file organization


1. Simple to understand approach
2. The sorting makes it easier to access records
3. The binary chop technique can be used to reduce record search by as much as
over half the time that would have been taken without sorted records
4. Easy to organize, maintain and understand
5. Reading a record requires only the key field

Disadvantages
1. The sorting does not remove the need to access other records as the search
looks for a particular record.
2. Random enquiries are impossible to handle
3. Transactions must be sorted and placed in sequence prior to processing
4. The requirements that all records be of the same size is sometimes difficult to
enforce
5. Cannot support modern technologies that require fast access to stored records.
6. Data redundancy is quite high since the same data may be stored in several
files sequenced in different keys.

Random or direct file organization


Records are stored randomly but accessed directly.

To access a file stored randomly, a record key is used to determine where a record is
stored on the storage media.

Used in magnetic and optical discs.

Advantages
1. Records are quickly accessed
2. File update –adding, deleting or amending the records is easily achieved.
3. The records can be of different sizes

Disadvantages
49 | Page
Computer Studies Note Pack <🖒🖒enjoy computing> ©CUTE IDEAS LEARNING 2020
1. Data may be accidentally erased or over-written unless special precautions are
taken
2. System design around it is complex and costly
3. Expensive hardware and software resources are required
4. May be less efficient in the use of storage space than a sequentially organized
file.

Serial file organization


Records in a file are stored and accessed one after another on the storage media in no
particular sequence.

Mostly used on magnetic tapes.

Serial files can only be accessed serially, that is search through the file starting from the
‘head’ of the file towards the ‘tail’ of the file.

Advantages
1. It is simple
2. It is cheap

Disadvantages
1. It is cumbersome to access because you have to access all preceding records
before retrieving the one being searched for.
2. Wastage of space on medium in form of inter record gap
3. It cannot support modern high speed requirements for quick record access.

Indexed-sequential
The records are arranged sequentially as in sequential files but there is an index which
allows for selective access/enable the computer to locate individual records on the storage
media.

Advantages
1. Records can be accessed sequentially or randomly
2. Records are not duplicated
3. Fast access of records if done randomly

Disadvantages
50 | Page
Computer Studies Note Pack <🖒🖒enjoy computing> ©CUTE IDEAS LEARNING 2020
1. The storage medium is rather expensive
2. Accessing records sequentially is time consuming.
3. Processing records sequentially may introduce redundancy.

Comparison of file organization methods


File organization method Method of access
Serial serial
Sequential sequential
Random direct
Index sequential - sequential
- selective sequential
- random

DATA PROCESSING MODES


Data processing modes describe the ways transactions are handled during processing.

Factors to consider in selecting the data processing mode


1. The need for direct information retrieval and/ or file interrogation
2. The control over the resources e.g. files, input/output devices
3. The cost of acquiring the relevant hardware, software, media, etc
4. The optimization of the processing time.
5. The time factor of the information for decision making by managers.

They include:

51 | Page
Computer Studies Note Pack <🖒🖒enjoy computing> ©CUTE IDEAS LEARNING 2020
1. Online processing
2. Real-time processing
3. Distributed processing
4. Time-sharing
5. Batch processing
6. Multiprocessing
7. Multitasking
8. Interactive processing

1. Batch processing
This is the processing mode whereby transactions are accumulated over a period of time
e.g. daily, weekly or monthly and then processed at once.
Application
● Payroll processing

Advantages
i. Simple to develop systems
ii. Timing of the information is not a necessity
iii. The unit cost of processing is low.

Disadvantages
i. Time lag between origination of the transactions and the information availability
ii. Late information is not suitable in situations where instant decisions are required
iii. It is difficult to provide the desired priority scheduling
2. Online processing
The data is processed immediately it is received. The computer is connected directly to
the data input unit via a communication link.
The data input may be a network terminal or an online input device attached to the
computer.
Application
● Banking
● Stock exchange
● Stock control

Advantages
i. Files are maintained up to date
ii. Information is readily available for current decisions
iii. File enquiries possible through the terminals (work station)

Disadvantages
i. Systems are complex to develop
52 | Page
Computer Studies Note Pack <🖒🖒enjoy computing> ©CUTE IDEAS LEARNING 2020
ii. Are costly in terms of hardware, software, storage media etc

3. Real-time processing
In this mode, the computer processes the incoming data as soon as it occurs, updates the
transaction file and gives an immediate response that would affect the events as they
happen. This is different from online in that for online processing an immediate response
may not be required.
The main purpose of a real-time processing is to provide accurate, up to date information
hence better services based on a true situation.
Application
● Air reservation
● Hotel reservation
● Chemical plant processing

Advantages
i. Information is readily available for instant decision
ii. Provides immediate information/control
iii. It is fast and reliable

Disadvantages
i. Requires expensive and complex operating system
ii. They are not easy to develop
iii. Requires front end processors to relieve the central processor

Distributed processing
This processing refers to dividing (distributing) processing tasks to two or more
computers that are located on physically separate sites but connected by data transmission
media. There may be a central computer that receives input from the remote computers
(terminals), processes the data and updates the master file.
A distributed database is one that has different tables of the same database residing on
separate computers and processed there as need arises.
Applications
● Banks where customers can be served from different branches but
information is updated at the head branch

Advantages
i. Less risk of system breakdown
ii. In case of data loss only a small portion of the data is lost
iii. Reduction of the load on the host computer hence faster processing

Disadvantages

53 | Page
Computer Studies Note Pack <🖒🖒enjoy computing> ©CUTE IDEAS LEARNING 2020
i. Expensive due to extra communication costs
ii. More sophisticated software required to maintain data integrity

Time-sharing
In this mode, many terminals are connected to the central processing unit and given
access apparently at the same time.
Each user is allocated a time slice of the CPU in sequence. The amount of time allocated
to each user is controlled by a multi-user operating system.
Application
● Bureau
● Learning institutions
● Companies

Advantages
i. Better services to the user, for the output is fast
ii. Files enquiries is possible since the files are held on-line
iii. User interaction is possible through terminals

Disadvantages
i. User has no control over the central computer
ii. Not reliable with regard to data security
iii. Response time is slow where there are many tasks

Multiprocessing
This refers to the processing of more than one tasks apparently at the same time on
different processors of the same computer.
In such systems, the computer may contain more than one independent central processing
unit which work together in a coordinated way.

4. Multitasking
In this processing more than one program are executed apparently at the same time by a
single central processing unit.
The operating system allocates each program a time slice and decides what order they
will be executed.
Advantages
i. Increases the productivity of the computer by reducing CPU idle time.
ii. Reduces the incidence of peripheral bound operations

Disadvantages
i. Requires more expensive CPUs

54 | Page
Computer Studies Note Pack <🖒🖒enjoy computing> ©CUTE IDEAS LEARNING 2020
ii. Operating system is complex and more difficult to operate

Interactive processing
In this processing, there is continuous dialogue between the user and the computers.
As the program executes, it keeps on prompting the user to provide input or respond to
prompts displayed on the screen.

Advantages of electronic processing


1. Quick processing especially where all required data is available
2. Availability of data and information digitally
3. Distance between entities that are processing data is made non-significant
4. Support for information sharing and collaboration on a wider scale

Disadvantages of electronic processing


1. Security of data can be compromised during storage or while in transit on networks if
appropriate measures are not taken
2. Lack of legal frameworks in many countries that cannot support electronic processing
activities
3. Lack of ICT skills among many knowledge workers to support electronic data
processing.

55 | Page
Computer Studies Note Pack <🖒🖒enjoy computing> ©CUTE IDEAS LEARNING 2020
3. ELEMENTARY PROGRAMMING PRINCIPLES
COMPUTER PROGRAMMING
Programmingrefers to the process of developing computer instructions(programs) to solve
a particular task.

It involves use of special characters, signs, and symbols found in a particular programming
language to create computer instructions.

A programming language is a special set of symbols that can be translated into machine
readable form by the computer when arranged in a particular sequence or order.

Description of terms used in programming


● Source program
This refers to the program code that the programmer enters in the program editor
window that is not yet translated into machine readable form.
The source program is usually created using a particular programming language like
Pascal, C++, Visual Basic, Java, e.t.c.
● Object code
This refers to the program code that is in machine readable form.
A source code that is not in machine readable form must be translated into object
code.
● Translators
Refer to language processors such as assemblers, interpreters and compilers that
convert the source program into object code.
o Assembler
This translates assembly language into machine language that the computer
can understand and execute.
o Interpreter
Translates the source program line-by-line, allowing the CPU to execute one
line before translating the next. The translated line is not stored in the
computer memory. It means that every time the program is needed for
execution, it has to be translated.
o Compiler
A compiler translates the entire source program into object code.
The object code file can be made into a full executable program by carrying
out a process known as linking which joins the object code to all the other files
that are needed for the execution of theprogram. After linking, an executable
file (.EXE) is generatedwhich is an application file. Examples of executable
files include WINWORD.EXE which is used to start Microsoft Word.

56 | Page
Computer Studies Note Pack <🖒🖒enjoy computing> ©CUTE IDEAS LEARNING 2020
Interpreters Compilers
1. Translates the source 1. Translates the entire source
program one statement at a code at once before execution
time

2. Translates the program each 2. Compiled program(object


time it is run hence slower code) can be saved on a
than compiling storage media and run as
required, hence executes
faster than interpreted
programs

3. Interpreted object code takes 3. Compiled programs require


less memory compared to more memory as the object
compiled program file are larger

LEVELS OF PROGRAMMING LANGUAGES


Programming languages can be classified into two major levels with each
level further subdivided into five generations whereby the first two
generations are for low level languages whereas the third to the fifth
generation are for high level languages:
1. Low – level languages
2. High – level languages

Low – level languages


These languages are classified as low because they can easily be
understood by the computer directly or they require little effort to
translate into computer understandable form.
Characteristics of low – level languages
o Hardware oriented and not portable- program written for one
computer cannot be installed and used on another computer.

The two types of low level languages are:

o Machine language(First generation languages)


o Assembly languages (Second generation languages)

57 | Page
Computer Studies Note Pack <🖒🖒enjoy computing> ©CUTE IDEAS LEARNING 2020
● Machine language (First generation)
Instructions are written using binary logic. Many line of code are needed
to accomplish even a simple task as adding two numbers because the data
and instructions must be expressed in binary form.
These program code are hard for human to understand but easily
understood by the computer.
Also due to the fact that different CPUs have different machine code, the
programmer has to know which processor the code is intended for.
Advantages of machine language
a. It is stable and reliable since it is closely related to the
architecture of the computer and thus it hardly crashes
b. It is faster to execute since it is already in a format that the
computer can understand; thus it requires no translation.

Disadvantages of machine language

a. It is not portable since it is designed for a specific computer


architecture
b. The process of writing the program is tedious and time
consuming
c. It is difficult to read, understand and debug the lines of codes.

Assembly language (Second generation)


Were developed in order to overcome the difficulties of understanding
and using machine language.
Programs are written as a set of symbolic operation codes called
Mnemonics. Mnemonics are basically shortened two or three letter words.
For example:
MOV AX, 15 (move 15 to register AX)
SUB AX, 10 (subtract 10 from the value in AX)
Key : AX is a data register
Advantages of assembly language
a. It is easier to code than machine language since it uses mnemonics
which are easier to remember.
b. Shorter code- one line of assembly language replaces many lines of
machine language code.
c. Faster in execution than high level languages.
d. It is stable and reliable since it is closely related to the computer
architecture hence it hardly crashes.
58 | Page
Computer Studies Note Pack <🖒🖒enjoy computing> ©CUTE IDEAS LEARNING 2020
Disadvantages of assembly language

a. It is very tedious to write a program


b. It is difficult to read, understand and debug the lines of codes
c. It is machine dependent thus not portable

High – level languages


These languages are very close to the human language (English-like) and they
can be read and understood even by people who are not experts in
programming.

They are problem-oriented and machine-independent. They concentrate on how


to solve a problem instead of the architecture of the computer.

High level languages can be classified into five categories namely:

i. Third generation languages (3GLs)


ii. Fourth generation languages (4Gls)
iii. Fifth generation languages (5Gls)
iv. Object Oriented Programming Languages (OOPs)
v. Web Scripting Languages

Third generation languages (3GLs)


These are also known as procedural or structured languages.
A procedural language makes it possible to break a program into
components called modules with each performing a particular task.
Structured language emphasizes the following:
a. Large programs can be broken down into smaller sub programs
each performing a single task.
b. Use of control structures such as sequence, selection and iteration
in problem solving.

Advantages of structured programming


● It is easier to read and modify the program
● It enables the user to debug errors in a section of the program
● It enables the user to test the program one module after another making
programming more flexible

Examples of 3GLs include:

● FORTRAN: Stands for FORmulaTRANslator.


Used in scientific, engineering and mathematical operations.
59 | Page
Computer Studies Note Pack <🖒🖒enjoy computing> ©CUTE IDEAS LEARNING 2020
● COBOL: stands for Common Business Oriented Language.
Most commonly used language in commercial or business operation
programmes such as preparing payrolls, controlling the inventory system,
e.t.c.
● PASCAL: was specifically designed as an academic language for
teaching and learning of structured programming to students.
● BASIC: stands for Beginners All-purpose Symbolic Instruction Code.
Was designed to help students to learn programming easily.
It is also used for creating business and educational applications.
● C: used for developing system software e.g. operating systems such as
UNIX
● ADA:named after the first lady programmer, Ada Lovelace and is suitable
for developing military, industrial and real-time system.

Fourth generation languages (4Gls)


These languages make programming easier than 3GLs because they
present the programmer with more programming tools such as command
buttons, forms,etc
These languages also have an application generator which works behind
the scene to generate the necessary code hence the programmer is freed
from the tedious work of writing the code.
Examples of 4GLs include SQL,Visual Basic, Delphi Pascal and Visual
COBOl.

Fifth generation languages (5Gls)


These make programming even easier and interesting because the
programmer doesn’t have to worry about how an algorithm will be
implemented to solve the problem at hand. The programmer only
specifies the problem to be solved and the conditions to be met, then the
code is automatically generated.
They are designed round the concept of solving problems by enabling the
computer to depict human like intelligence.
They are mainly used in Artificial Intelligence (AI).
Examples of 5GLs include:
● PROLOG(PROgrammingLOGic)
Used for developing expert systems.
● LISP (LISt Processing)
Used in developing Artificial Intelligence (AI) systems
● OCCAM
60 | Page
Computer Studies Note Pack <🖒🖒enjoy computing> ©CUTE IDEAS LEARNING 2020
Used for developing parallel processing systems.
● OPS5(Official Processing System)
Used for developing expert systems.
● Mercury

Object Oriented Programming Languages (OOPs)


The concept of object oriented programming is to look at a program as
having various objects interacting to make up a whole.
Terms used in oop
● An object is a component of a system that contains a set of data and
procedures that manipulate the data.
● Class is a collection of objects.
● Each object has specific data values that are unique to it called
state.
● Each object also has a set of the things it can accomplish called
functions or behavior.
● The process of combining data and behavior that operate on the
data within an object is known as encapsulation.
● attributes describe the characteristics of an object. e.g a bank can
be active, inactive or frozen
● an object belongs to a group or category called class. All objects
within a class shares common attributes and methods.
● methods define a specific task that an object can perform.
● inheritance is creating a new class for using details of an existing
class without modifying it.
● abstraction is an OOP concept that “shows” only essential
attributes and “hides” unnecessary information.
Examples of object oriented languages include:
● C++
● Java
● SmallTalk

Web Scripting Languages


They are used to develop or add features in a webpage.
Webpages are used to create websites. A webpage is a hypertext
document that is created using a mark-up language.
Examples of web scripting languages include:
● Hypertext Markup Language(HTML)
● Javascript
61 | Page
Computer Studies Note Pack <🖒🖒enjoy computing> ©CUTE IDEAS LEARNING 2020
● VBScript (Visual Basic script)
● PHP (Hypertext Pre-processor)
● XML (Extensible Mark-up Language)
● Applescript
● Perl
● Coldfusion

Advantages of high level programming languages


a) They are portable since they are machine independent
b) They are easy to understand, learn and use because they are written in
English statements
c) They are problem-oriented thus concentrate on solving a problem
compared to low level languages, which are machine-oriented.
d) Procedures or modules are re-usable. This saves on time and the cost of
development.
e) They are easy to debug.
f) Requires less time to code.
g) They provide better documentation.

Disadvantages of high level languages


a. They require a lot of memory space to run.
b. They must first be translated to machine language before execution,
which slows down their execution speed.

62 | Page
Computer Studies Note Pack <🖒🖒enjoy computing> ©CUTE IDEAS LEARNING 2020
PROGRAM DEVELOPMENT
Before developing a program, the requirements of the eventual users and its
expected functions should be fully understood.

Program development can be broken into the following stages:

1. Problem recognition
2. Problem definition
3. Program design
4. Program coding
5. Program testing and debugging
6. Implementation and maintenance

These stages can be represented as follows diagrammatically:

63 | Page
Computer Studies Note Pack <🖒🖒enjoy computing> ©CUTE IDEAS LEARNING 2020
The solid arrow shows the next step in the order of program development.

The dashed arrows show the review of one step with the previous to see whether
the specifications have been met.

NB: documentation is done at all stages of the program development


lifecycle. This is important so that the facts are recorded when they are still
fresh and in the required detail by the programmer.

1. Problem recognition
A programmer identifies problems in the environment and seeks to solve
them by writing a computer program that would provide the solution.
Problem recognition refers to the understanding and interpretation of a
particular problem.

64 | Page
Computer Studies Note Pack <🖒🖒enjoy computing> ©CUTE IDEAS LEARNING 2020
Situations that can cause a programmer to identify a problem that is
worth solving:
a. Problems or undesirablesituations that prevent an individual or
organization from achieving their purpose
b. Opportunity to improve the current program.
c. A new directive given by the management requiring a change in the
status quo.

Examples of problems include:

Problem to calculate the volume of a cylinder, the equation is given by

V=πr2rh

TASK 1:

GIVE OTHER FIVE MATHEMATICAL PROBLEMS AND THEIR


FORMULAS.

2. Problem definition
This is also referred to as problem analysis.
The programmer tries to determine or define the likely input, processing
activities and the expected output using the keywords outlined at the
problem definition stage.
The boundaries of the expected program are established and if several
methods for solving the problem are identified, the best alternative should
be chosen.
Example of problem definition for getting the area of a right angled
triangle:
i. Inputs: a. base of the triangle

b. height of the triangle

ii. Process: the formula for calculating the area of a triangle


given as ½ x base x height

65 | Page
Computer Studies Note Pack <🖒🖒enjoy computing> ©CUTE IDEAS LEARNING 2020
iii. Output: the area of the triangle

This stage ends with writing of a requirements report. This enables the
programmer come up with the design for the new program.

TASK 2:

PROBLEM INPUT PROCESSING OUTPUT


1. Area of triangle B,H ½*b*h Area

2. 3.142*r*r

3.

4.

5.

FOR EACH OF THE ABOVE PROBLEMS, WRITE THE EXPECTED


INPUTS, PROCESSING AND OUTPUT.

3. Program design
This is the actual development of the program’s processing or problem
solving logic called the algorithm.
An algorithm is a definite number of logical steps that a program follows
in order to solve a problem. The programmer comes up with the program
design after carefully studying the requirements specifications.
A program can either be made up of one large block of code(monolithic)
or can be divided into several units called modules that work together to
form the whole program.
An algorithm can either be developed using tools such as flowcharts,
Pseudocodes, decision tables or decision trees.

66 | Page
Computer Studies Note Pack <🖒🖒enjoy computing> ©CUTE IDEAS LEARNING 2020
Example of program design for getting the area of a right angled
triangle:
1. Pseudocode
START
PRINT”Enter the height and base of the
triangle”
READ BASE,HEIGHT
AREA = 0.5 x BASE x HEIGHT
PRINT AREA
STOP

2. Flowchart

67 | Page
Computer Studies Note Pack <🖒🖒enjoy computing> ©CUTE IDEAS LEARNING 2020
4. Program coding
This is the actual process of converting a design model into its equivalent
program.
This is done by creating the program using a particular programming
language.
The end product of this stage is a source program that can be translated
into machine readable for the computer to execute and solve the problem
at hand.
Example of a program to calculate area of a triangle using C and Pascal

Program in C Program in Pascal

#include<stdio.h> Program
main( ) AreaTriangle(input,output);
{ Var base, height, area: real;
double base, height, area; Begin
printf(“enter the base and height”); Writeln(‘enter the base and
scanf(base,height); height’);
Readln(base,height);
area:= 0.5 * base * height;\l
printf(“the area is%s”,&area); area:= 0.5 * base * height;
return 0; writeln(“the area is’,area);
} End.

5. Program testing and debugging


After coding the program has to be tested and the errors detected and
corrected.
Testing is the process of ensuring the program runs as intended and
performs the intended functions accurately.
Debugging refers to the process of detecting and correcting errors(bugs)
that may exist in the program.
68 | Page
Computer Studies Note Pack <🖒🖒enjoy computing> ©CUTE IDEAS LEARNING 2020
The following are some types of errors that can occur in a computer
program:
1. Syntax errors: these errors refers from improper use of language rules
such as grammatical mistakes, punctuation, improper naming of
variables and misspelling of user defined words,etc.
These errors are detectable by the translator and have to be corrected
before the program runs.
2. Logical errors: these errors are not detectable by the translator.
The program runs but gives wrong results.
3. Runtime errors: this error causes an abrupt stoppage of a running
program. An example includes an attempt to divide by zero.

Methods of error detection

They include:

1. Desk checking (Dry-run)


This involves going through the program while still on paper before
entering it in the program editor window.
This helps detect the most obvious syntax and logical errors.
2. Using debugging utilities
In the program editor window you can run the debugging utilities
during translation to detect syntax errors in order to correct them
before execution.
3. Using test data
The programmer performs a series of tests by entering sample data to
ensure that the program perform the expected functions accurately.
A good test should include the following types of test data:
a) Extreme data:
This refers to data that is of the right type but is in the
upper or lower boundary of the expected values. E.g. in
examination marks out of 100, 0 and 100 is extreme data.
b) Normal data:
Also known as valid data.
This is data of the right data type and within the required
range. E.g. in an exam 60, 40, 52 is normal data.
c) Abnormal(invalid data):

69 | Page
Computer Studies Note Pack <🖒🖒enjoy computing> ©CUTE IDEAS LEARNING 2020
Data that is of the wrong data type or outside the expected
range. E.g. in an exam letters and a score above 100 is
invalid.
6. Implementation and maintenance
Implementation
This refers to the actual delivery and installation of the new program
ready for use.
It also involves creating data files and training users on how to use the
program.

Maintenance and review


Thisinvolves debugging errors that occur when running the program , or
making any other revisions that may arise due to change of user needs or
government policies.

7. Program documentation
This is writing of formal support materials explaining how the program
can be used by users, installed by operators or modified by other
programmers.
All the stages of program developed should be documented in order to
help during future modification of the program.
Types of documentations
a. User oriented documentation
These enable the user to learn how to use the program as quickly as
possible and with little help from the program developer.
b. Operator oriented documentation
Meant for computer operators such as the technical staff. It helps
them to install and maintain the program.
c. Programmer oriented documentation
Written for skilled programmers.
It provides the necessary technician information to help in future
modification of program.

Development of algorithms
An algorithm is a limited number of logical steps that a program follows in
order to solve a problem.
70 | Page
Computer Studies Note Pack <🖒🖒enjoy computing> ©CUTE IDEAS LEARNING 2020
Algorithms can be depicted using tools such as decision tables, decision trees,
Pseudocodes or even flowcharts.

a) Pseudocodes
Refers to a set of statements written in a human readable
language(usually English-like phrases) but expressing the processing
logic of a program.

Guidelines for designing a good Pseudo code


1. Statements must be clear, short and readable
2. Pseudocode lines should be clearly outlined and indented clearly
3. The statements must not have more than one meaning.
4. The Pseudocode should show clearly the start and stop of executable
statements and the control structures.
5. The input, output and processing statements should be clearly stated
using keywords such as PRINT, READ, INPUT, etc

Examples of Pseudocodes
1. Write a pseudocode for a program to prompt the user for two numbers,
get their sum and average and display the results.
START
PRINT”enter two numbers x,y”
READ X,Y
SUM = X + Y
AVERAGE = SUM / 2
PRINT SUM, AVERAGE
STOP
2. Write a pseudocode for a program to prompt the user for the radius of a
circle then calculate the diameter and the area and display the results.
START
PRINT “Enter the radius(R)”
READ R
DIAMETER = 2 *R
AREA = 3.142 * R * R
PRINT AREA, DIAMETER
STOP
3. Write a pseudocode to prompt for the age of a person and calculate the
new age after 5 years.
START
71 | Page
Computer Studies Note Pack <🖒🖒enjoy computing> ©CUTE IDEAS LEARNING 2020
PRINT “Enter the Age”
READ AGE
NEW AGE = AGE + 5
PRINT NEW AGE
STOP
4. Write a pseudocode for a program to prompt the user for the base and
height of a triangle then calculate the area and display the results.
START
PRINT “Enter the height and base of the triangle”
READ BASE, HEIGHT
AREA = 0.5 x BASE x HEIGHT
PRINT AREA
STOP

Tasks:

Write Pseudocodes for the following programs:

a) A program to prompt the user to enter temperature in degrees centigrade


then converts it to Farenheight equivalent using the formula F=32
+(9/2)c0where C is the temperature in degrees centigrade.
b) A program that would accept the price of bread, and then calculate the
new price after adding 16% VAT, then print the new price.
c) A program to accept speed in KM/H and convert it to M/S.
d) A program to accept the radius and height of a cylinder and calculate the
volume.
e) A program to accept the home town of a student and print the result
f) A program to accept the distance in KM and time in HR and get the
speed.

72 | Page
Computer Studies Note Pack <🖒🖒enjoy computing> ©CUTE IDEAS LEARNING 2020
b) Flowcharts
A flowchart is a diagrammatic representation of a program’s algorithm.
The symbols are combined with short text clues which are a form of
shorthand understood by programmers.

Symbols used when drawing program flowcharts

73 | Page
Computer Studies Note Pack <🖒🖒enjoy computing> ©CUTE IDEAS LEARNING 2020
Guidelines for drawing a flowchart

1. There should be only one entry/starting point and one exit point of the
program algorithm.
2. Use the correct symbol at each stage in the flowchart.
3. The logical flow should be clearly shown using arrows. It is usually from
top-down, left-right except for loops and branching.

Examples
1. Draw a flowchart for a program to prompt the user for two numbers, get
their sum and average and display the results.

2. Draw a flowchartfor a program to prompt the user for the radius of a


circle then calculate the diameter and the area and display the results.

74 | Page
Computer Studies Note Pack <🖒🖒enjoy computing> ©CUTE IDEAS LEARNING 2020
3. Draw a flowchartto prompt for the age of a person and calculate the new
age after 5 years.

4. Draw a flowchartfor a program to prompt the user for the base and height
of a triangle then calculate the area and display the results.

Tasks:

Draw flowcharts for the following programs:

75 | Page
Computer Studies Note Pack <🖒🖒enjoy computing> ©CUTE IDEAS LEARNING 2020
a) A program to prompt the user to enter temperature in degrees centigrade
then converts it to Farenheight equivalent using the formula F=32
+(9/2)c0where C is the temperature in degrees centigrade.
b) A program that would accept the price of bread, and then calculate the
new price after adding 16% VAT, then print the new price.
c) A program to accept speed in KM/H and convert it to M/S.
d) A program to accept the radius and height of a cylinder and calculate the
volume.
e) A program to accept the home town of a student and print the result
f) A program to accept the distance in KM and time in HR and get the
speed.

Program control structures


These are block of statements that determine how statements are to be executed.

There are three control structures namely:

1. Sequence
2. Selection
3. Iteration
Sequence
In this control structure, the computer reads instructions from a program file
starting from the top line and proceeding downwards one by one to the end.

This enables the computer perform tasks that are arranged consequtively one
after another in the code.

Task on sequence

1. State the output of the following flowchart segment. (2 marks)

76 | Page
Computer Studies Note Pack <🖒🖒enjoy computing> ©CUTE IDEAS LEARNING 2020
2. Draw a flowchart to compute the combined resistance (R) of two resistors R1 and R2
in parallel using the formula;

R= 1

1 + 1

R1 R2 (5½
marks)

77 | Page
Computer Studies Note Pack <🖒🖒enjoy computing> ©CUTE IDEAS LEARNING 2020
Selection
Execution of statements depends on a condition(Boolean expression) that
returns a true or false.

There are four types of selection controls:

1. IF…THEN
2. IF…THEN…ELSE
3. NESTED IF
4. CASE selection

1. IF…THEN
Used if ONLY ONE option is available.

SYNTAX

PSEUDOCODE

IF<CONDITION> THEN

STATEMENTS;

END IF

FLOWCHART

78 | Page
Computer Studies Note Pack <🖒🖒enjoy computing> ©CUTE IDEAS LEARNING 2020
EXAMPLES
1. WRITE A PSEUDOCODE AND DRAW A FLOWCHART TO
PROMPT FOR THE AGE OF A PERSON, IF THE AGE IS >= 18
THE MESSAGE “ADULT” IS DISPLAYED ON THE SCREEN.

START

READ AGE

IF AGE>= 18 THEN

PRINT “ADULT”

STOP

79 | Page
Computer Studies Note Pack <🖒🖒enjoy computing> ©CUTE IDEAS LEARNING 2020
2. WRITE A PSEUDOCODE AND DRAW A FLOWCHART TO
PROMPT FOR A NUMBER, IF THE NUMBER IS BETWEEN 0
AND 100, THE MESSAGE YOU GUESSED RIGHT IS
DISPLAYED ON THE SCREEN.
START
READ NUMBER
IF NUMBER>0 AND NUMBER<100 THEN
PRINT “YOU GUESSED RIGHT”
STOP

80 | Page
Computer Studies Note Pack <🖒🖒enjoy computing> ©CUTE IDEAS LEARNING 2020
TASKS:

WRITE A PSEUDOCODE AND DRAW A FLOWCHART FOR A


PROGRAM TO:

1. PROMPT FOR MARKS OF A STUDENT, IF THE MARKS IS


GREATER THAN 50, THE MESSAGE “PASS” IS DISPLAYED.

81 | Page
Computer Studies Note Pack <🖒🖒enjoy computing> ©CUTE IDEAS LEARNING 2020
2. IF…THEN…ELSE
Used if there are ONLY TWO OPTIONS are available.

SYNTAX

PSEUDOCODE

IF<CONDITION> THEN

STATEMENTS;

ELSE

STATEMENTS;

END IF

82 | Page
Computer Studies Note Pack <🖒🖒enjoy computing> ©CUTE IDEAS LEARNING 2020
1. WRITE A PSEUDOCODE AND DRAW A FLOWCHART TO
PROMPT FOR THE AGE OF A PERSON, IF THE AGE IS >= 18
THE MESSAGE “ADULT” ELSE THE MESSAGE “YOUNG
PERSON” IS DISPLAYED ON THE SCREEN.
START
READ AGE
IF AGE>= 18 THEN
PRINT “ADULT”
ELSE

PRINT “YOUNG PERSON”

STOP

83 | Page
Computer Studies Note Pack <🖒🖒enjoy computing> ©CUTE IDEAS LEARNING 2020
TASKS:

WRITE A PSEUDOCODE AND DRAW A FLOWCHART FOR A


PROGRAM TO:

1. PROMPT FOR MARKS OF A STUDENT, IF THE MARKS IS


GREATER THAN 50, THE MESSAGE “PASS” IS DISPLAYED ELSE
THE MESSAGE “FAIL” IS DISPLAYED.
2. Kenya women finance trust KWFT pays 10% interest in shares exceeding 150,000
shillings and 4% on shares that do not meet this target. However no interest is paid
on deposits in the members (KWFT) bank account.

(a) Design a pseudo code for a program that would

(i) Prompt the user for shares and deposits of a particular member.

(ii) Calculate the interest and total savings

(iii) Display the interest and total savings

(iv) Display the interest and total savings in the screen for a particular member
of the trust

3. Mumias sugar company pays casual employees based on the number of hours worked
as follows
Less than 10 hours @ khs.100/= per hour
Up to 15 hours @ khs150/= per hour
More than 15 hours @khs200/= /per hour

(i) Write a pseudo code that will prompt the user to input the name, rate hours worked.
The pseudo code should output the name, hours worked and the wage paid for five
employees

(ii) Draw a flowchart for the pseudo code

84 | Page
Computer Studies Note Pack <🖒🖒enjoy computing> ©CUTE IDEAS LEARNING 2020
NESTED IF
Used where 2 or more options have to be considered.

SYNTAX

PSEUDOCODE

IF<CONDITION 1> THEN

STATEMENTS

ELSE IF <CONDITION 2> THEN

STATEMENTS

ELSE IF <CONDITION 3> THEN

STATEMENTS

………….

ELSE IF <CONDITION n> THEN

STATEMENTS

ELSE

STATEMENTS

END IF

END IF

END IF

END IF

85 | Page
Computer Studies Note Pack <🖒🖒enjoy computing> ©CUTE IDEAS LEARNING 2020
FLOWCHART

86 | Page
Computer Studies Note Pack <🖒🖒enjoy computing> ©CUTE IDEAS LEARNING 2020
TASKS:

WRITE A PSEUDOCODE AND DRAW A FLOWCHART FOR A


PROGRAM TO:
i. In an Olympics track event, medals are awarded only to the first three athletes as
follows:
a. Position 1: gold medal
b. Position 2: silver medal
c. Position 3: bronze medal

Write a pseudocode and draw a flowchart for the above.

ii. Write a pseudocode and draw a flowchart to compare three non-equal numeric values
A, B, C and print the largest of the three.

iii. The roots of the equation ax2 + bx + c = 0 are given by the formula

Using a pseudocode and a flow-chart write a program that will compute the roots.

If b2-4ac >0 then the program should output 2 roots, if b2-4ac =0 then one root will be
output else the message “no real roots”

iv. To maintain a strategic fit Safaricom is introducing a tariff called the mega tariff that
will lower costs to Safricom to Safaricom calls and calls to other networks. Calls to
Safaricom networks will be charged according to the time of the day as listed below:

-Between 8am to 12 noon – 6 Ksh

-Between 12 noon to 2pm-0.8 Kshs

-Between 6 to 1 am -4Kshs

-between 1 am to 8am- 1Kshs

Internal calls to other networks are charged at a fixed rate of 7 Kshs between 8am to
8pm and to while international calls are charged at a rate of 25 Kshs between 8am to
8pm and Kshs 35 for the rest of the day. All calls are charged per minute usage.

Mr. Wasswa Bbaale a business man who makes both internal and internal calls would
like to make maximum use of this of this tariff.

a) Write a pseudo code that would show him know the charges of calls with an
appropriate label when he the inputs type of call and the time where appropriate. Use
a 24 hour clock.

87 | Page
Computer Studies Note Pack <🖒🖒enjoy computing> ©CUTE IDEAS LEARNING 2020
b) Design a flowchart for the pseudo code in 16(a) above

CASE CONSTRUCT
An alternative to the Nested IF especially where there are several options to choose from.

It is preffered to the Nested IF to reduce the many lines of code.

The Boolean expression for the case selection can only be expressed using integers and
alphabetic characters only.

Generally the Boolean expression therefore should be CASE integer OF or CASE Char OF as
illustrated in the example below.

Pseudocode

CASE x OF

Label 1:statement 1

Label 2:statement 2

Label 3:statement 3

…..

Label n:statement n

Else

Statement

Endcase

Flowchart

88 | Page
Computer Studies Note Pack <🖒🖒enjoy computing> ©CUTE IDEAS LEARNING 2020
Task on case construct
In order to process examination results of students in a school, their names, index

numbers and scores in 8 subjects namely Maths, English, Kiswahili , Biology, Chemistry ,
Business Studies, Computer studies are required. The average score for each student

is then determined and a grade assigned.

Draw a flowchart to:

• Read a student's name, index number and the scores in all the subjects.

• Determine the student's average score.

• Assign a grade to the student depending on the average score as follows:

Score Grade

80 - 100 score A

60 - 79 score B

40 - 59 score C

< 40 score F

• Display the student's name, index number, average score and the grade.

START

READ NAME, INDEX, Maths, English, Kiswahili , Biology, Chemistry , Business


Studies, Computer studies

TOTAL= Maths+English+Kiswahili+Biology+Chemistry+Business Studies+Computer studies

Average=TOTAL/7

CASE Average OF

80…100: Grade = “A”

60…79: Grade = “B”

40…49: Grade = “E”

ELSE

Grade=“F”

End Case

89 | Page
Computer Studies Note Pack <🖒🖒enjoy computing> ©CUTE IDEAS LEARNING 2020
PRINT NAME,INDEX,Average,Grade

STOP

Iteration
Also known as looping or repetition.

This is designed to execute the same block of code again and again until a certain condition if
fulfilled.

There are three main looping controls:

i. WHILE loop
ii. REPEAT…UNTIL loop
iii. FOR loop

1. WHILE loop
This tests the condition before executing the code if and ONLY IF the Boolean
expression returns a true value.

Syntax

WHILE <condition> DO

<statements>

END WHILE

90 | Page
Computer Studies Note Pack <🖒🖒enjoy computing> ©CUTE IDEAS LEARNING 2020
EXAMPLE:

1. Write a pseudocode that reads temperature for each day in a week, in


degree Celsius, converts the Celsius into Fahrenheit's and then
calculate the average weekly temperatures. The program should
output the calculated average in degrees Fahrenheit's.
START

set initial_day = 1
SET Cummulative = 0
WHILE initial day < 7 DO
Input C
F=32+(9*C/5)
Initial day=initial day + 1
Cummulative = cummulative + F
END WHILE
Average weekly temperature= cummulative/7
Print Average
STOP

2. A lady deposits 2,000 shillings in a Microfinance company at an


interest rate of 20% per annum. At the end of each year, the interest
earned is added to the deposit and the new amount becomes the
deposit for that year. Write an algorithm for a program that would
track the growth of the deposits over a period of seven years.
START

deposit=2000

interest_rate=0.2

year = 1

WHILE year <= 7 DO

Interest = Deposit * interest rate

total = Deposit + interest

deposit=total

Year = Year + 1

END WHILE
91 | Page
Computer Studies Note Pack <🖒🖒enjoy computing> ©CUTE IDEAS LEARNING 2020
PRINT Deposit, Year

STOP

2. REPEAT…UNTIL..
In this structure the code is executed before testing the condition. The repeat loop stops when
the Boolean statement returns a value.

Syntax

REPEAT

<statements>

UNTIL <CONDITION>

EXAMPLE:

1. Botswana has a population of 3,000,000 but this is falling by 4% each


year. The island of Reunion has a population of 95,000 but this is
increasing by 9% each year.

a. Write a pseudocode and Draw a flowchart that predicts the


year in which the population of reunion will be greater than
that of Botswana if the trend continues.

92 | Page
Computer Studies Note Pack <🖒🖒enjoy computing> ©CUTE IDEAS LEARNING 2020
Pseudo code
Start

Bts: = 3,000,000

IR: = 95,000

Year: = 0

REPEAT

Bts = Bts - (Bts * (4 / 100))

IR = IR + (IR * (9 / 100))

Year = year + 1

(UNTIL IR > Bts)

Print year

Stop

93 | Page
Computer Studies Note Pack <🖒🖒enjoy computing> ©CUTE IDEAS LEARNING 2020
flowchart

94 | Page
Computer Studies Note Pack <🖒🖒enjoy computing> ©CUTE IDEAS LEARNING 2020
3. The FOR loop
This structure is used where execution of the chosen statements has to be repeated a
predetermined number of times.

syntax
FOR <loop variables> = <lower limit> TO <upper limit> DO

Statements

END FOR

* Format for the ‘For’ loop that counts from upper limit down to lower limit

FOR <loop variable> = <Upper limit> DOWN TO <Lower Limit> DO

Statements

END FOR

* Format for the ‘For’ loop that counts from upper limit down to lower limit

95 | Page
Computer Studies Note Pack <🖒🖒enjoy computing> ©CUTE IDEAS LEARNING 2020
EXAMPLE

WRITE A PSEUDOCODE FOR A PROGRAM TO PRINT THE FIRST 100 EVEN


NUMBERS.

START

EVEN=2

FOR I=1 TO 100 DO

PRINT EVEN

EVEN=EVEN + 2

END FOR

STOP

96 | Page
Computer Studies Note Pack <🖒🖒enjoy computing> ©CUTE IDEAS LEARNING 2020
4. SYSTEM DEVELOPMENT
A system is a set of organized components which interact in a given
environment and within a specified boundary to achieve collective goals and
objectives that are emergent.

Emergent characteristics are those that result from interaction of various


components and may not exist in the individual component.

Description of a system
A system can either be hard or soft:

a. Soft systems
This is a system whose goals keep on changing, have no specific
boundaries, and its performance is based on emotions, thus it is hard to
measure. e.g a political system in a country.
b. Hard systems
Its outcome is predictable and measurable. Has specific goals, objectives
and boundaries. E.g. an accounts management system or a hospital
management system

CLASSIFICATION OF SYSTEMS
The following are the types of systems:

a. Deterministic system
Also known as hard system. Its outcome is predictable and measurable
b. Probabilistic system
Also known as soft system or non-deterministic or probabilistic system.
This is a system whose goals keep on changing, have no specific
boundaries, and its performance is based on emotions, thus it is hard to
measure.
c. Closed system
This is one that does not exchange inputs and outputs with the
environment.
Closed systems degrade very fast and become obsolete for they don’t
define themselves to match the fast changing and advanced trends of the
world outside.
d. Open system
This is a type of system that exchanges inputs and outputs with the
environment.
e. Cybernetic systems
97 | Page
Computer Studies Note Pack <🖒🖒enjoy computing> ©CUTE IDEAS LEARNING 2020
This is a self controlling system which adapt to the environment and
regulate their own behavior by assessing the feedback.

CHARACTERISTICS OF SYSTEMS
a. Holistic thinking
In this the system is considered as a whole. A combination of various
components that make up a system which creates a complex whole,
whose overall goals are more sophisticated than those of the individual
components.
b. Made of Subsystems
A system is made of different components known as subsystems. Each
subsystem performs a specific role in the system. E.g. the education
system in Kenya is made up of Primary school system, Secondary school
system and University systems.
c. Has a boundary
This is the limit within which the system operates. For example a school
system has a fence(physical boundary) and in exams grading there are
boundaries for marks “between 0% and 100%”(non- physical).
d. Has an environment
These are the elements outside the boundary, but which influence the
system’s performance. For example, in a school system, the suppliers,
parents and the neighbouring society.
e. System entropy
Entropy means decay.
This is the deterioration of a system with time either due to improvement
of technology, new management policies or change in user requirements
or government policies.
f. Has an Objective and purpose
Each system performs a particular task or has a purpose to achieve a goal.
The objectives that a system is supposed to achieve enable system
developers to measure the performance of a system during its operation.
g. Accepts input
Inputs are data that the system accepts for processing. For example the
names of students, their date of birth are examples of inputs in a school
registration system.
h. Carries out processing
Processing includes all the activities carried out on inputs in order to
obtain outputs based on the system goals. For example in a school
98 | Page
Computer Studies Note Pack <🖒🖒enjoy computing> ©CUTE IDEAS LEARNING 2020
management system, the assigning of classes and admission numbers is
processing.
i. Gives an output
These are the products of the processing stage in a system. They are
usually required to meet the goals of a system.

j. Has a feedback
Feedback refers to the mechanism by which the outputs from a system are
returned to the system to check if they meet the required standards. If
standards are not met, processing is redone to correct the difference.
k. Has control mechanism
Control is the means by which a system corrects its output by responding
to the feedback.

99 | Page
Computer Studies Note Pack <🖒🖒enjoy computing> ©CUTE IDEAS LEARNING 2020
INFORMATION SYSTEM
An information system is an arrangement of people, data processes and
information that work together to support and improve the day-to-day
operations in a business and the decision making process.

Qualities of a good information system

1. Reliability: a good information system should be trustworthy.


2. Timely: information should be available whenever it is required.
3. Availability: it should be accessible to those who require it.
4. Relevance: it should have a bearing on matters pertaining to the
performance of the organization.
5. Usefulness: it should be in a consumable form
6. Consistency: the information should not contradict any other information
of the same kind.
7. Accuracy: the information should be correct
8. Comprehensibility: it should be understandable to the users.

Purpose of an information system


1. Accept and process data in an organization in accordance
to the organization’s policies and objectives.
2. Provide information that helps with strategic planning.
The processed information usually helps in making long
term plans for an organization.
3. Provide a means by which the performance of an
organization can be assessed.
4. To enable sharing of information.
5. Provide a good memory bank for an organization, hence
reducing the burden of tracing documents in cabinet
files.
6. Improve product delivery. With a good information
system, it is easy to monitor the channels of product
delivery and hence improve on weak areas.

100 | Page
Computer Studies Note Pack <🖒🖒enjoy computing> ©CUTE IDEAS LEARNING 2020
Reasons for developing a new information system

1. New opportunities: an opportunity that presents itself, that can enable


the organization improve its services.
2. Problems in the current system: the undesirable circumstances in the
current system that prevent the organization from meeting its goal.
3. Directives: these are new requirements imposed by the government,
management or external influences.
4. Change in technology: technology is dynamic. If a system becomes
obsolete, its efficiency can be improved by replacing or upgrading.
5. Pressure from competitors

Role of information system analyst

The system analyst is a person who is responsible for identifying an


organizations needs and problems then designs and develops an information
system to solve them.

a. Reviewing the existing system and making recommendations on how to


improve or improve an alternative system.
b. Working hand in hand with programmers to construct a computerized
system.
c. Coordinating training of the new system users and owners.

Theories of system development


The aim of theories and methods used in system development is to identify
business requirements and to develop information systems that effectively meet
them. This helps to support the day to day operations and decision making
processes in an organization.

The theories of system development include

1. The traditional approach


2. Rapid Application Development
3. The structured approach
1. The traditional approach
This approach relies mostly on the skills of individual staff members
carrying out the project.

101 | Page
Computer Studies Note Pack <🖒🖒enjoy computing> ©CUTE IDEAS LEARNING 2020
The manual system is replaced with a computerized one without change in
overall structure of the former system.
Disadvantages
● There is no formal documented methodology to be followed by all
system developers in the organization.
● It presents a chaotic scene in system development where more than
one person are involved because success depends on the heroic efforts
of an individual.
● All other projects heavily rely on a particular person for their success.
● Weaknesses of the former system are not addressed and are carried on
forward to the new system. E.g. cashiers in a banking hall given
computers to replace the manual system characterized by long queues
and poor control will still have long queues and lack of control
increases because no value was added to the former information
system.
2. Rapid Application Development (RAD)
RAD model involves development and implementation of an information
system very quickly with the continued participation of the end-user by use
of prototypes, heavy use of system development tools such as Small Team
with Advanced Tools (SWAT), Joint Application Development (JAD) and
code generation using 4GLs.
Also known as prototyping , assumes that a user knows what they want when
they see it. A prototype is a small working model of the real thing.
Disadvantages
● The working system may have oversights and weaknesses due to
quick development e.g. lack of necessary inbuilt security mechanisms.
3. The structured approach
This defines a set of stages that should be followed when developing a
system.

Reasons for system project failure

1. Inadequate user involvement: users must assume responsibility for


educating the analyst about business applications, requirements and
policies.
A project may fail if major functions were not anticipated in the design
because users didn’t make their needs known.

102 | Page
Computer Studies Note Pack <🖒🖒enjoy computing> ©CUTE IDEAS LEARNING 2020
2. Continuation of a project that should have been cancelled: Analysts
should re-evaluate the projects various phases to determine if it remains
feasible.
3. The failure of two or more portions of the new system to fit together
properly (system integration). This often results when major portions of
the systems are worked on by different groups of technical specialists
who don’t communicate well.

Solution

Use of System Development Lifecycle (SDLC) as guideline to direct and


administer the activities and to control the financial resources expended. i.e.
to impose order on the development process.

Each stage must be followed to ensure successful completion within time


and budget.

Key:

1. Problem recognition and definition


2. Information gathering
3. Requirements specification
4. System design
5. System construction (coding)
6. System implementation
7. System review and maintenance

103 | Page
Computer Studies Note Pack <🖒🖒enjoy computing> ©CUTE IDEAS LEARNING 2020
The lifecycle is divided into two major parts namely:

1. The development stage


1. Problem recognition and definition
2. Information gathering
3. Requirements specification
4. System design
5. System construction (coding)
2. The operation and support stage
6. System implementation
7. System review and maintenance

Stages of system development


1. Problem recognition and definition
Carried out by a system analyst.

In this stage the system analyst identifies and accepts the existence of aa
problem in the current system.

The system analysts seeks to find out whether the proposed project is worth
pursuing. The system analyst has to define the scope of the project and
establish the constraints, budget and schedule.

Problem definition, also called problem analysis is the process of identifying


the problem, understanding the problem and finding out any constraints that
may limit the solution. After this several alternatives are modeled and the
main question is whether the proposed solution is the right one.

A feasibility study is carried out. A feasibility study is a preliminary survey


undertaken to determine if the solution is workable, and whether it is likely
to be successful and cost effective.

Types of feasibility studies

1. Schedule feasibility: this establishes whether the development of the


proposed system will be accomplished within the available time.

104 | Page
Computer Studies Note Pack <🖒🖒enjoy computing> ©CUTE IDEAS LEARNING 2020
2. Economic feasibility: this establishes whether developing the new system
is cost effective by analyzing all the costs and benefits of the proposed
system.
3. Technical feasibility: establishes whether the technology available is
sufficient or can be upgraded for the new system. It also seeks to find out
whether the staff have relevant technical skills to develop and use the new
system.
4. Operational feasibility: this establishes the extent to which the users are
comfortable or happy with the proposed or new system.
5. Legal feasibility: this is done to determine if the proposed solution is
permitted by the existing laws of the land.
6. Social feasibility: this is done to determine if the proposed solution will
be acceptable to the users.

At the end of the feasibility study, a feasibility report is prepared. This will
either give a go ahead to the new stage of systems development or provide
appropriate advice on the next course of action.

2. Information gathering
This is also known as fact-finding.

It is aimed at obtaining detailed knowledge that is to be used to build the new


system.

The following are some of the methods used to build the new system:

a. Observation
This requires the observer to participate or watch closely as a person
performs activities in order to learn about the system.
This method gives the analyst first hand experience about the problems
and exposes him/her to the system requirements.
Advantages of observation
a. The observer gets first hand experience of what goes on
b. Technical concepts that are difficult to explain in words or writing
can be observed.
c. The data collected is more reliable
Disadvantages of observation
a. Tasks that violate standard procedures may not be carried out the
way they are normally done, when under supervision.

105 | Page
Computer Studies Note Pack <🖒🖒enjoy computing> ©CUTE IDEAS LEARNING 2020
b. Persons under study may be uncomfortable and hence make
mistakes
c. It is time consuming because the observer must be there in person.

b. Interviews
Questions are asked orally. The person conducting the interview is known
as the interviewer, the one answering the questions is the interviewee and
the list of structured questions is called an interview schedule.
Guidelines when conducting an interview
● Design short and precise questions
● Do not ask personal questions
● Request for the interview
● The interviewer must be very familiar with the questions or the
interview guide. The interviewee must also be informed about the
topic of discussion in good time to allow adequate preparation.
● Set the interview time when the interviewee is most comfortable.
● Show genuine interest in getting to know each respondent without
appearing to spy.
● Donot ask leading questions; i.e. a question that encourages or seems
to suggest the desired or expected answer.
● Avoid personal biases in your questions and perspectives.
● Be careful about body language and proxemics. Proxemics refers to
things like sitting arrangement, body closeness and how people react
when their private distance is violated.

Advantages of interviews

● They provide in depth data which is not possible to get when using a
questionnaire
● The interviewer has a chance to observe and interpret non-verbal
communication
● The interviewer can clarify and elaborate on questions.
● It is possible to win the confidence of an interviewee hence get open
and honest answers.
Disadvantages of interviews
● The whole exercise is more expensive since the interviewer has to
travel to meet the respondents.

106 | Page
Computer Studies Note Pack <🖒🖒enjoy computing> ©CUTE IDEAS LEARNING 2020
● Interviewing requires a high level of skill which most system analysts
may not have hence failing to adequately bring out the relevant
information.
● Interviewee cannot remain anonymous
● Interviewee may not fully answer questions that are personal or
sensistive.
c. Questionnaires
This is a printed paper or a form that contains a set of questions used to
gather information during the fact-finding exercise.
There are two broad categories of questions format used in questionnaires
:
1. Structured questions
Also known as closed-ended questions.
These are questions which are accompanied by a list of
alternatives from which the respondents select the answer
that best describes the situation.
Advantages of structured questions
i. They are easier to analyse because the responses
are predictable
ii. Its easy for the respondents to respond since each
question is followed by alternative answers
iii. They are economical to use in terms of time and
money

Disadvantages of structured questions


i. They are not easy to construct since the questions
and possible answers should be well thought and
precise
ii. The respondents are usually restricted to answer
questions according to the alternatives given.

2. Unstructured questions
These are known as open-ended questions. These are
questions which give the respondent freedom to respond in
their own words.
Advantages of unstructured questions

107 | Page
Computer Studies Note Pack <🖒🖒enjoy computing> ©CUTE IDEAS LEARNING 2020
i. These questions are simpler to formulate since the
researcher does not have to come up with possible
responses
ii. They give an allowance for deeper responses since
the respondents are not limited to the specific
answers they should give.
iii. These questions can help to give insight feelings of
the respondents like interests, decisions, motivations
and background.
Disadvantages of unstructured questions
i. There is a tendency to provide irrelevant information
which doesn’t answer the stipulated question.
ii. Responding to the questions is time consuming and
this puts respondents off.
iii. It is not easy to analyse the responses
iv. It is not possible to accurately estimate the space that
will be adequate for various repondents.

d. Automated methods
Points to remember
● Always test the devices in advance to ensure that they are working
● Pack the devices early enough to ensure you don’t forget any
device
● Carry out the various accessories required such as memory cards,
batteries,chargers, etc.
● The analyst should be able to use the device

Advantages

● Easy to use
● Easy to produce a back up
● Covers data which may be difficult to get through the other methods

Disadvantages

● Costly to acquire the devices and accessories.


● Devices may break down.
● Requires technical skills

e. Document review
108 | Page
Computer Studies Note Pack <🖒🖒enjoy computing> ©CUTE IDEAS LEARNING 2020
This is the study of documents existing in the system to extract
information about the system. Documents may include procedure
manuals, charts and statistical reports among others.
Advantages of document review
i. Enables gathering of historical facts that may have contributed to
the current state of the system.
ii. The system analyst doesn’t interrupted the normal running of the
current system.
iii. Enables the system analyst to study other similar systems in
existence
iv. The analyst is able to review previous solutions and
recommendations that have been made on the system.

Disadvantages of document review

i. It is time consuming
ii. The documents available may contain obsolete information; that is
outdated.

109 | Page
Computer Studies Note Pack <🖒🖒enjoy computing> ©CUTE IDEAS LEARNING 2020
3. Requirement specification
At this stage, the system analyst must come up with the
detailed requirements for the new system.
These requirements include:
a. Output specifications
These are the detailed descriptions of information obtained from
the system.
Consideration is given to the output requirements of the new
system first.
The output is usually in the form of reports either in hardcopy or
softcopy form.
Considerations when designing the output
● The target audience: e.g. top management would require a
summary of overall performance in the organization whereas
a user report may only show the transactions carried out or
the transaction at hand.
● The frequency of report generation: some reports are
required daily, others weekly, monthly or annually. However,
some are required in an ad hoc manner i.e. randomly
● Quality and format: the quality and format of information to
be generated should be put into consideration.
b. Input specifications
This refers to a detailed description of the data to be entered in the
system. The description includes data types, volumes of data,
frequency of data input and user interface.
The inputs are greatly influenced by the expected output.
The user interface is an important determinant of whether the
system will be happily accepted by the users or not. Hence, it must
be designed with a lot of care.
Guidelines to be observed when designing a user interface
● Objects placed on forms like text boxes, labels and
command buttons must be neatly aligned and balanced on
the form.
● The size of the form must not be too small for user legibility
or too big to fit on the screen
● The colour for the interface must be chosen carefully to
avoid hurting the eyes. Avoid colours that are too bright.
Characteristics of a good user interface
110 | Page
Computer Studies Note Pack <🖒🖒enjoy computing> ©CUTE IDEAS LEARNING 2020
● Has a consistent layout in the entire system
● It is user friendly
● Should prompt the user clearly
● The colours, fonts and layout should be appealing to the user
● Should have a layout that is consistent with the manual data
capture forms.
c. Software specifications
This is a detailed description of the programs that are required to
run the system.
d. File/data stores
These are the detailed descriptions of data storage, retrieval, file
structures and the number of files. The description include type and
size of storage media, type of database model, number of tables in
a database, and the structure which may include the number and
type of fields and the relation between them.
Also the attributes should be identified. An attribute is a unique
characteristic of a record for which a data value can be stored in the
system database. E.g. name, admission number are examples of
attributes.
Factors to consider when designing a file
● the key attribute or field: this is usually an attribute that is
unique for each record.
● The type of data: each field has a data type such as text,
number, date/time etc
● The length of each field. This is important because the
longer the field, the slower the system takes to process the
transactions.
● Back-up and recovery strategies: the updated copies of the
data and information files need to be stored in a different
place other than the location of the current system.
This makes sure that even if the current file gets corrupted or
crashes, the backed up data can be used to recover or
reconstruct the original file.
e. Processing specifications
These are the detailed descriptions of the processing activities that
will be carried out on data. This may include activities such as
sorting, merging, comparing, computing and formatting.

111 | Page
Computer Studies Note Pack <🖒🖒enjoy computing> ©CUTE IDEAS LEARNING 2020
f. Hardware specifications

These are the detailed specifications of the devices that will be required to run
the system. This should include the minimum specifications of input, output,
storage and processing devices.

g. Control specifications
These are the detailed descriptions of the restraints that are to be
put in place to ensure the system meets its objectives. Examples of
these controls include access level authorization and access
permissions.

112 | Page
Computer Studies Note Pack <🖒🖒enjoy computing> ©CUTE IDEAS LEARNING 2020
4. System design
This is the process of transforming a requirements specification into a
logical view of the system.
Pictorial representation tools such as flowcharts or a design specification
language such as Z are used.
A system flowchart is a tool for analyzing processes. It allows one to
break process down into individual events or activities and to display
these in shorthand form showing the sequential or logical relationships
between them.
Common flowchart sysmbols

113 | Page
Computer Studies Note Pack <🖒🖒enjoy computing> ©CUTE IDEAS LEARNING 2020
Pg 111 longhorn and pg 117 log on

114 | Page
Computer Studies Note Pack <🖒🖒enjoy computing> ©CUTE IDEAS LEARNING 2020
115 | Page
Computer Studies Note Pack <🖒🖒enjoy computing> ©CUTE IDEAS LEARNING 2020
5. System construction
It also involves coding, installation and testing of the modules and their
components such as outputs, inputs and files.
The software used in coding is determined by the software specifications.
System construction methods
● Using a high level structured language such as Pascal, COBOL, etc
● Using a 4GL such as Visual Basic
● Customizing the standard packages such as database software,
financial package

Testing the system


After construction, the system is tested by entering some test data to find
out whether its outputs are as expected

Types of test data

1. Normal data: data within the specified range.e.g. for


marks any marks entered between 0 and 100 is normal
data.
2. Extreme data: data that is at the extreme edges of the
range. E.g. for marks, 0 and 100 is extreme data
3. Abnormal data: data that is of the wrong data type or
data outside the range. E.g. for marks any number
below 0 and above 100 or a letter is abnormal data.

116 | Page
Computer Studies Note Pack <🖒🖒enjoy computing> ©CUTE IDEAS LEARNING 2020
6. System implementation
This is the process of delivering the system for use in day to day
operating environment for the users to start using it.
The activities involved at this stage include:
● Installation of the system
● File conversion
● Staff training
● Changeover strategies
a. Installation of the system
This is the process of setting up and preparing the system for
operation.
It includes loading the system into the computer and configuring it.
b. File conversion
This involves changing data from its current format to the one that
can be operated with the new system.
The data is therefore, transferred or copied from the old system into
the new system. This may include keying in data from the old
system to the new one and copying of files from one type of
storage device to another.
c. Staff training
This involves teaching the staff how to operate the system in order.
System implementation can fail if the staff are not trained properly
leading to great loss to company resources.
Training manuals should be provided to the staff during and after
the training sessions for reference.
Methods of staff training include:
- Demonstration
- Film show
- Manual reference
- Group discussion
- Visits
d. Changeover strategies

This is the switching from the old system to the new one.

System changeover strategies include:

117 | Page
Computer Studies Note Pack <🖒🖒enjoy computing> ©CUTE IDEAS LEARNING 2020
1. Direct changeover
The old system is stopped and discarded and the new system
started immediately.
It is best used in situations:
- Where the new system is completely different
from the old one
- If there has been extensive testing of the system
and the analyst has confidence in its
functionality
- If the system is not critical
Advantages
1. The benefits of the new system are immediately realized
2. The cost of implementation is low because the new system
takes over immediately

Disadvantages

1. In case of system failure, there is no fall back position thus high


risk of losing data and possible loss of business
2. Staff will be under a lot of pressure trying to implement the new
system and learn at the same time.

2. Parallel changeover
The new system and the old system are run concurrently as the
performance of the two systems are compared.
Once satisfied with the performance of the new system, the old one is
terminated.
It is best used in situations:
- In situations of critical systems
Advantages
1. In case the new system fails, the old one is available as back up
2. Staff are given adequate time to familiarize themselves with the
new system
3. The old system provides a benchmark for assessing the
performance of the new system.
4. Provides a method of training in the new system.

118 | Page
Computer Studies Note Pack <🖒🖒enjoy computing> ©CUTE IDEAS LEARNING 2020
Disadvantages

1. It is more expensive than direct changeover and pilot changeover.


This is because running two systems at the same time is not cost
effective.
2. The benefits of the new system are not realized by the entire
organization immediately.
3. The strategy usually has great administrative strains on the
organization due to the fact that staff members do most of their
tasks twice.
3. Pilot running
In this strategy, the new system is introduced in a branch or a section of
the organization. It is then tested to ascertain its effectiveness.
Once its performance is deemed satisfactory, it is then implemented in the
entire organization.
It is best used in situations:
- Where an organization has many branches that
carry out similar activities

Advantages
1. In case of system failure, only a section of the organization is affected,
thus reducing risk of data loss
2. Provides a means of live testing of the system before subjecting the entire
organization to the system.
3. It is possible to use the branch piloting the system to train all the
employees in the organization; it is therefore cheaper.
Disadvantages
1. It is more expensive than direct changeover because of running two
systems at the same time.
2. The benefits of the new systems are not realized by the entire
organization immediately.

4. Phased changeover

119 | Page
Computer Studies Note Pack <🖒🖒enjoy computing> ©CUTE IDEAS LEARNING 2020
The new system is introduced gradually, one stage at a time. The next
phase is only introduced when the performance of the previous one is
satisfactory and is already adopted.

This continues until the entire old system is replaced with the new one.

It is best used in situations:


- Where the systems are massive and complex or
critical and each section can operate
independently.

Advantages

1. If a phase that is being executed fails, the implementation process is only


partly delayed, hence, failure rate may not be devastating.
2. Enables testing of the system phase by phase, hence increasing the
effectiveness of the system.
3. It enables the organization to replace a system gradually; the entire system
can only be overhauled after the analyst gets satisfied that each implemented
phase is working well.
4. Staff are given adequate time to gradually familialize themselves with each
phase of the new system.

Disadvantages

1. It is more expensive than direct method because it requires evaluation of


each phase before moving to the next.
2. The benefits of the entire new system are not realized by the organization
immediately.

120 | Page
Computer Studies Note Pack <🖒🖒enjoy computing> ©CUTE IDEAS LEARNING 2020
7. System review and maintenance
System review: this is the constant evaluation of the system performance
to determine how best it continues to meet its objective.
System maintenance: in maintenance, modifications are carried out on
the system after implementation. These modifications are aimed at fixing
errors, making the system better in carrying out its functions and enabling
it adapt to changes.
There are three types of maintenance namely:
a. Corrective maintenance
This involves making changes on the system in order to
get rid of errors that have been identified after the system
has been implemented.
b. Adaptive maintenance
The aim of adaptive maintenance is to enable the system
to respond to changes in the operating environment and
internal organizational policies. E.g. changes in legal
requirements.
c. Perfective maintenance
This aims at improving performance of the system.
This includes adding of functions, and making it more
user-friendly, faster and secure.

Factors that necessitate systems review and maintenance

● Change in technology
● Identification of new objectives for the system
● Development of strategies to maintain a competitive edge
● Change in government legislation.

121 | Page
Computer Studies Note Pack <🖒🖒enjoy computing> ©CUTE IDEAS LEARNING 2020
System documentation
Documentation is done at every stage.
Documentation aids in the use and maintenance of the program during
its lifetime.
Types of documentation
a. User-oriented documentation
This assists the users to learn how to use the system. Contains:
1. The function of the system
2. How to launch and exit the system
3. How to perform tasks in the system
4. The minimum hardware and software requirements
5. Sample test run, data and reports
6. Error handling procedures
7. Frequently asked questions
b. Technical documentation
This assists programmers and system analysts during the
maintenance of the system. Contains:
1. Fact/information gathering reports
2. System flowchart
3. Table/file structure description
4. Program listing (code)
5. Sample data
6. Output reports
7. The function of the system
8. Programming language used
9. Format of inputs
10.Minimum hardware and software requirements
11.List of variables used and their functions
12.Validation rules
13.Troubleshooting procedures

122 | Page
Computer Studies Note Pack <🖒🖒enjoy computing> ©CUTE IDEAS LEARNING 2020
BIBLIOGRAPHY
Log On Computer Studies Bk 3

Systems Theory And Management Information Systems by N.A Saleeemi

Computer Studies Bk 3 By John Onunga

Longhorn computer studies BK 3

KCSE Revision Series Computer Studies with answers by George O. Raburu

https://www.ictlounge.com/

*************************THE END*******************

123 | Page
Computer Studies Note Pack <🖒🖒enjoy computing> ©CUTE IDEAS LEARNING 2020

You might also like