0% found this document useful (0 votes)
56 views

Form Three Notes

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

Form Three Notes

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

lOMoARcPSD|40487891

FORM Three Notes

Computer literally (Maasai Mara University)

Scan to open on Studocu

Studocu is not sponsored or endorsed by any college or university


Downloaded by Fredrick Musee ([email protected])
lOMoARcPSD|40487891

1. DATA REPRESENTATION IN A COMPUTER


Specific objectives:
By the end of the topic, the learner should be able to:
(i)Explain concepts and reasons for data representation
in a computer.
(ii) Define the terms bit, byte, nibble and word.
(iii) Explain the types of data representation in the
computer.
(iv) Perform binary arithmetic operations, convert
decimal numbers to binary and vice versa.

Introduction:
- In digital computers the user input is converted and
transmitted as electrical pulses represented in two
states: “1” and “0” before processing.
- Data stored in a computer is usually in forms of bits/
binary digits. It is only in this form of representation
and the computer micro- processor can retrieve stored
information and manipulate it.
- The computer system is made up of logic that works
only with states “ON” and “OFF’ represented by the
two distinct digits “0” and “1” respectively.

1. Digital and analog data representation:


- Digital signal (a) rises
suddenly to peak
amplitude of +1, holds for
sometimes then suddenly
drops to -1 level.
1

Downloaded by Fredrick Musee ([email protected])


lOMoARcPSD|40487891

- Analog signal rises to +1 and falls to -1 in a continuous


version (b).
- The two graphs repeat themselves at equal time
intervals. Electronic signals or wake- forms of this
nature are said to be periodic because the signal waves
repeat themselves at equal time intervals.

- Parameters describing a periodic wave :


Amplitude (A)
Frequency (f)
Periodic time (T)
Amplitude (A): the maximum value a wave can attain
e.g. 1.
Frequency (F): the number of cycles made by the wake
in one second. It is measured in hertz (Hz), which is
equivalent to 1 cycle per second.
Periodic time (T): is the time taken by a signal to
complete one cycle. It is given by the formula T=1/f ,
where f is the frequency of the wave.
- When a digital signal is to be sent over analog
telephone lines e.g. e-mail, it has to be converted to
analog signal by connecting a device called modem
to the digital computer.
- The process of converting a digital signal to analog
signal is known as modulation.
- On the receiving end, the incoming analog signal is
converted back to digital form by use of
demodulation.

Downloaded by Fredrick Musee ([email protected])


lOMoARcPSD|40487891

2. 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 entered must first be
converted into machine- readable form i.e. binary
form.
- A computer together with it’s peripheral devices
handle data in it’s electronic circuits, magnetic media
and in optical devices.
QN KCSE 2004
3. Explain why computers use binary numbers in data
representation. (2 marks)
Answer: computer’s CPU carry out arithmetic and
logical operations by binary numbers. Data is stored in
computers in binary form.

KCSE 2006
1. What is meant by?
- Analog data: they are quantities that are continuous
and infinite variety of values e.g. temperature,
pressure, flow rate, current, voltage.
- Digital data: they are input data, which uses two
discrete states e.g. ON/OFF, YES/NO, HIGH/LOW,
RIGHT/WRONG.

(i) Data representation in electronic circuits:


Electronic components such as microprocessors are made
up of millions of electronic circuits. Availability of a light

Downloaded by Fredrick Musee ([email protected])


lOMoARcPSD|40487891

voltage (ON) in these circuits is interpreted as ‘1’ while a


low voltage (OFF) is interpreted as ‘0’.

(ii) Data representation on magnetic media:


- The presence of a magnetic field in one direction on
magnetic media is interpreted as ‘1’ while the
absence of a magnetic field is interpreted as ‘0’.
- Magnetic technology is mostly used on storage
devices that are coated with special magnetic
materials such as iron oxide. 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 directions.

(iii) Data representation on optical media:


In optical devices, the presence of light is interpreted as
‘1’ while its absence is interpreted as ‘0’. Optical devices
use this technology to read or store data.
The shine surface of CD-ROM has very tiny holes called
pits and the areas that do not have pits are called land.
When a laser beam falls on the shinny surface its reflected
4

Downloaded by Fredrick Musee ([email protected])


lOMoARcPSD|40487891

and interpreted as a ‘1’. On the other hand, when the laser


beam falls on the pit or bump, there is no reflection and
this is interpreted as a ‘0’ bit.

Reasons for use of binary


It is difficult to develop devices that can understand or
process natural language directly.
Digital devices are more reliable, small in size and use less
energy as compared to analog device
1.3 bits, bytes, nibble and word
These terms are used widely in reference to computer
memory and data size.
Bits: is a binary digit which can either be a ‘0’ or ‘1’. It is
the basic unit of data or information in digital computers.
Byte: a group of 8 bits which represent a character. It is
the basic unit of measuring memory size in computers.
Nibble: it is a half byte or a group of 4 bits.
Word : It consists of one or more bytes and is the largest
amount of memory that the computer can handle. E.g. a
word can have a length of 16 bits, 32 bits, 64 bits etc.
Word length – is the number of bits in each word of a
computer.

Kcse 2005
Arrange the following data units in ascending order of size
BYTE, FILE, BIT, NIBBLE (2 marks)
Answer: BIT<NIBBLE<BYTE<FILE {marked as a
whole}

Kcse 2007
5

Downloaded by Fredrick Musee ([email protected])


lOMoARcPSD|40487891

Explain the term nibbles as used in data representation in


computers. (1 mark)
Answer:
A nibble is a group of four binary digits usually
representing numerical numbers.

1.4 Types of data representation


Computers can only process numbers, letters and special
symbols. Although they can process complex types of data
like pictures and sound, these takes a lot of memory and
processor time when coded in binary form so the need for
higher number systems.

Number system and their representation


Number systems can be classified into four major
categories:
1). Decimal number system
2). Binary number system
3). Octal number system
4). Hexadecimal number system

1. Decimal number system


Deci is a Latin word meaning ten. Consist of 10 digits
namely 0 – 9because the system has 10 digits it is also
called a base ten number system or denary number system.
The decimal number should always be written with a
subscript (base / radix) 10 e.g. x10.
The magnitude of a number can be considered using three
parameters.
1). Absolute value or positional weights
6

Downloaded by Fredrick Musee ([email protected])


lOMoARcPSD|40487891

2). Place value or positional value


3). Base value

Absolute value is the magnitude of a digit in a number i.e.


weight. Positional values are in increasing powers of the
base as we move left and decreasing powers of the base as
we move right, i.e. whether tens, hundreds or thousands.
e.g. N10 = 3 9 4 6

= 6 6 x 100
= 40 4 x 101
= 900 9 x 102
= 3000 3 x 103
3946
The base value (radical base) depends on the type of
number system that is being used, for decimal system is 10.
The weight of each position is multiplied by the
corresponding digit to obtain the value of that positional.
The values of each position are then added to obtain the
number.
In any number, the right most digit has the most value and
is called the most significant digit (MSD)

The positional weights in powers of ten can be expressed as


given below
Ones 1 = 100
Tens 10 = 101
Hundreds 100 = 102
Thousands 1000 = 103
Tens of thousands 100001 = 104 ,etc.
7

Downloaded by Fredrick Musee ([email protected])


lOMoARcPSD|40487891

Each position weight is the base of the number raised to a


specific power. E.g.
= (3 x 103) + (9 x 102) + (4 x 101) + (6 x 100)
= 3000 + 900 + 40 + 6
= 3946.

2. Binary Number System


Uses only “0s” and “1s” to represent numbers in a
computer. The advantages of binary representation is that it
is easier to design logic that has two states instead if ten
states. The positional weights of a binary number are
expressed as powers of two since two is the base of the
binary system, (X2)
The right most digit has a place value of 1 x 20 while the
left most has a place value of 1x 23 in a binary number such
as 10112.

The decimal equivalent can be worked out as follows:


3 2 1 0
1 0 1 1

N10 = (1 x 23) + (0 x 22) + (1 x 21) + (1 x 20)


N10 = 1110
i.e.
1x = 8
8
0x = 0
4
1x = 2
8

Downloaded by Fredrick Musee ([email protected])


lOMoARcPSD|40487891

2
1x = 1
1
Total 11

3. Octal Number System


Consist of eight digits running from 0 – 7. The place value
of octal numbers goes up in factors of eight from right to
left. The base of octal number system is 8 i.e. N8
e.g. 7245 will be represented as

72458 7 x = 7 x = 3584
83 512
2 x = 2 x = 128
82 64
4 x = 4 x 8 = 32
81
5x = 5x1 = 5
80
The decimal equivalent is : N10 = 3749

4. Hexadecimal number system


The highest value in a binary is 1, in decimal system 9,
octal system 7, then a hexadecimal system has 15 which is
the largest.
The hexadecimal system popularly known as Hex system is
a base sixteen number system that consists of sixteen digits
ranging from 0 – 9 and letters A – F where A is equivalent
to 10, B to 11 upto F which is equivalent to 15 in base 10

Downloaded by Fredrick Musee ([email protected])


lOMoARcPSD|40487891

system. The place value of hex numbers goes up in factors


of 16 e.g. the hexadecimal digit 946 in factors of 16 is
9 6 6
162 161 160
The equivalent between hexadecimals and decimal
numbers is shown below
Decimal (Base Hexadecimal
10) (Base 16)
0
1 1
2 2
3 3
4 4
5 5
6 6
7 7
8 8
9 9
10 A
11 B
12 C
13 D
14 E
15 F

The 16 symbols used in this system are decimal digits 0 to


9 and the alphabets A to F. a hexadecimal number is usually
denoted using 16 as a Subscript or capital letter H to the
right of the number, e.g. 94B can be written as 94B16 or
94BH
10

Downloaded by Fredrick Musee ([email protected])


lOMoARcPSD|40487891

The decimal equivalent of 94B16 can be worked out as


n10 = (9 x 162) + (4 x 161) + (11x 160)
= (9 x 256) + (4 x 16) + (11 x 1)
237910.

Reasons for use of hexadecimal notation in a computer


- Helps to manage long binary digits properly
- Helps to improve the processing speed and optimize
memory usage.

Note:
The main advantage that the octal and hexadecimal
numbers have over decimal numbers is that they can easily
be converted to and from binary numbers.

Further conversion of numbers from one number system


to another
- Conversion between binary and decimal numbers
- Converting binary numbers to decimal numbers
i). Write the place values starting from the right hand side
ii). Write each digit under its place value
iii). Multiply each digit by its corresponding place value
iv). Add up the products. The answer will be the decimal
number in base
10. e.g. 1011012 to a base 10 (or decimal) number
Solution
Place 25 24 23 22 21 20
value
Binary 1 0 1 1 0 1
11

Downloaded by Fredrick Musee ([email protected])


lOMoARcPSD|40487891

digit

N10 = (1 x 25) + (0 x 24) + (1 x 23) + (1 x 21) + (0 x 21) + (1


x 20)
N10 = 32 + 0 + 8 + 4 + 0 + 1
= 4510

Note:
Remember always to indicate the base subscript since it’s
the value that distinguishes the different number systems.
Multiply each digit by its place value

Review questions 1.2


Convert the following base two numbers into denary (base
10) numbers
1. 01012 2. 11112 3. 101011011102
4. 101111112 5. 10110012 5. 1110001112

Attempt these questions


1). What is the base for binary, Octal, Decimal and
Hexadecimal number systems?
2). What is the hexadecimal equivalent of 11 and 15?
3). What base does each of the following numbers
represent?
a). 12310 b). A1H c). 11012 d). 768
4). convert 1100.012 to decimal

b). Converting decimal numbers to binary

12

Downloaded by Fredrick Musee ([email protected])


lOMoARcPSD|40487891

There are two possible methods the long division and the
place value method.
In the long division method, divide the decimal number
repeatedly by 2 until the quotient is 0. Then write the
remainder which is either 1 or 0 to the right of quotient, and
read it in reverse order i.e. from the bottom upwards. The
series of 1’s and 0’s obtained represent the binary
equivalent of the number.
Example\convert 157 to binary.
2 157 Rem
2 78 1
2 39 0
2 19 1
2 9 1
2 4 1
2 2 0
2 1 0
2 0 1

Therefore 15710 = 100111012

Converting fractional decimal to binary


For fractional numbers, the number is divided into 2 parts:
the whole number part and the fraction part. The part
(whole) is converted to binary individually as indicated
above. The fraction part is repeatedly multiplied by two,
noting the complete . The procedure proceeds until the
fraction becomes a zero or starts ending or repeating itself.

13

Downloaded by Fredrick Musee ([email protected])


lOMoARcPSD|40487891

Note
Whatever is on the left of the period is equated to zero
when multiplied or you simply have it as a zero. The
equivalent of the fractional part is extracted from the
products by reading the respective integral digits from top
to down.

Example
Convert 76.2510 to binary
2 76 Rem
2 38 0
2 19 0
2 9 1
2 4 1
2 2 0
2 1 0
2 0 1

7610 = 10011002

To convert the fractional part

0.25 x 2 = The fractional part


0.50 has become a zero,
0.50 x 2 = hence stops.
1.00

Therefore 0.2510 = 0.102


14

Downloaded by Fredrick Musee ([email protected])


lOMoARcPSD|40487891

Combine the two parts together to get the binary


equivalent.
Therefore 76.2510 = 1001100. 102

Read on your own how to convert a decimal number to


binary using place value method from Longhorn Form 3
page 11-12, or any other textbook.

Test your knowledge by convert the following to decimal


numbers to binary.
1. 3810 2. 0.67187510 3. 95410

Review questions 1.3


Using the long division and place value methods convert
each of the following base 10 numbers to their place value.
1. 1010 2. 4310 3. 36510
4. 51210 5. 14310 6. 95410

C. Converting a binary fraction to decimal number


When a decimal number has both an integral and fractional
part is called a real number . the weight of the integral part
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.
e.g. 87.537 will be represented as follows

Place 101 100 . 10-1 10-2 10-3


value
Decimal 8 7 . 5 3 7
digit
Value 80 7 . 0.5 0.03 0.007
15

Downloaded by Fredrick Musee ([email protected])


lOMoARcPSD|40487891

For a binary is the same approach only that the weights are
based on factors of 2 e.g 110110112
Place 21 20 . 2-1 2-2 2-3 2-4 2-5
value
Binary 1 1 . 1 1 0 1 1
digit
Value in 2 1 . 0.5 0.25 0 0.062 0.0312
base ten 5 5

Work out the integral and fractional parts separately then


combine them when converting a real number from binary
to decimal.

Example:
Convert 11.0112 to a decimal number
Place value 21 20 . 2-1 2-2 2-3
Binary digit 1 1 . 0 1 1
Value in 2 1 . 0 0.25 0.12
base ten 5

Work out the integral part first


21 x 1 = 2
20 x 1 = 1
310

Work out the fractional part 0.0112

21 20 . 2-1 2-2 2-3


1 1 . 0 1 1
16

Downloaded by Fredrick Musee ([email protected])


lOMoARcPSD|40487891

2 1 . 0 0.25 0.12
5

0.5 x 0 = 0.000
0.25 x = 0.250
1
0.125 = 0.125
x1
0.37510

Therefore 11.01110 + 0.37510 = 3.37510

Review questions 1.4


1. convert the following binary numbers to their
decimal equivalents
a). 0.100112 b). 0.00102 c). 0.101012
d). 11.01102 c). 101.111102 f). 100.1102
2. Convert the following decimal numbers into their
binary equivalents.
a). 0.62510 b). 0.45010 c). 2.50010
d). 5.162510 e). 7.187510 f). 0.35010

d). Converting octal numbers to decimal and binary


numbers
i). Converting octal numbers to decimal numbers
The maximum absolute value of an octal digit is 7. The
procedure is the same as from binary to decimal, but
weights are assigned in terms of 8’s.
Example 1:
17

Downloaded by Fredrick Musee ([email protected])


lOMoARcPSD|40487891

Convert 5128 to its base 10 equivalent.


Soln:
Write each number under its place value
Place value 82 81 80
Octal digit 5 1 2

Multiply each number by its place value


N10 = (5 x 82) + (1 x 810) + (2 x 80)
= (5 x 64) + 8 + 2
N10 <=>33010.

Example 2
Convert the octal number 11118 to its base 10
equivalent.
Soln.
Place value 83 82 81 80
Octal digit 1 1 1 1
Work out
512 x 1 = 51
2
64 x 1 = 64
8x1 = 8
1x1 = 1
585
Therefore 11118 => 58510.

Review questions 1.5


Convert the following octal numbers to decimal
numbers

18

Downloaded by Fredrick Musee ([email protected])


lOMoARcPSD|40487891

1. 778 2. 648 3. 1028 4. 12008


5. 10008
6. 1738 7. 1238 8. 7778 9. 3458
10. 1668

i). Converting fractional octal numbers to decimal


numbers.
The fractional octal numbers are converted to decimal
using the same procedure as that of converting fractional
binary to decimal, but the division in by multiples of eight.
Example: Convert 142.18 to decimal
Soln.
1 4 2 . 1
2 1 0
8 8 8 . 8-1

=(1 x 82) + (4 x 81) + (2 x 80) + (1 x 8-1)


= 64 + 32 + 2 + 1/8
= 98.12510
Therefore 142.18  98.12510.

ii). Converting octal numbers to binary numbers


Each digit is represented by 3 binary digits because the
maximum octal digit, 7, can be represented with a
maximum of 3 digits. This is done by writing down the
octal number, then you write the binary equivalent below it
using three bits patterns.
E.g. convert 24578 to binary.
2 4 5 7
010 100 10 111
1
19

Downloaded by Fredrick Musee ([email protected])


lOMoARcPSD|40487891

Combine the binary equivalents of the 4 octal digits from


left to right.
Therefore 24578 = 0101001011112

iii). Converting a binary number to octal


NB: To convert Octal to binary, you use the long division
method of dividing with 2 repeatedly then add a zero on the
left if the bits are not three.

Octal Digit Binary


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

Example: Convert 5238 to binary.


Octal Digit Binary
Equivalent
5 101
2 010
3 011

Combine the three from Left to Right. Therefore 5238 


1010100112

20

Downloaded by Fredrick Musee ([email protected])


lOMoARcPSD|40487891

iv). Converting a fractional binary number to Octal


number
To convert binary to octal, arrange the bits in groups of
three staring from the Right.
Then change each group to its Octal equivalent.

Example:
Convert 0111011.0102 to octal.
First group into three bits from right to left in the integral
part, then from Left to Right in the fractional part.
222210 222210 222210 2-12-
2 -3
2
000 111 011 . 010
0 7 3 . 2

Therefore 0111011.0102 <=> 73.28.

Review questions 1.6


Convert the following octal numbers to their binary
equivalents
1. 2448 2. 2478 3. 1628 4. 5658
5. 2228
6. 33708 7. 14138 8. 13318 9. 63478 10. 466538

E). Converting hexadecimal numbers to decimal and


binary numbers
i). Converting hexadecimal numbers to decimal
numbers
The procedure is the same as from Binary to Decimal
with the weights assigned in terms of 16’s.
21

Downloaded by Fredrick Musee ([email protected])


lOMoARcPSD|40487891

NB:
If a digit is a letter e.g. ‘A’ write its decimal
equivalent.
Example:
Convert 7AE16 to decimal
Soln.
7 A E
2 1
16 16 160
(7 x 162) (10 x 161) (14 x 160)
1792 160 14
1966
Therefore 7AE16  196610

Review questions 1.7


Convert the following hexadecimal numbers into
decimal numbers
1. 3216 2. CCD16 3. EFE16 4. 11916 5.
32816
6. ABD16 7. 10AFFD16 8. DDFF3416 9.
11ABDF16 10. CDFF3116

ii).Converting hexadecimal numbers into binary


numbers
Convert each hex digit into binary individually using
groups of four bits. For the binary digits that do not
have a pattern of 4 bits, just add extra zeros to the left.

Example: Convert AC2716 to binary.

A C 2 7
22

Downloaded by Fredrick Musee ([email protected])


lOMoARcPSD|40487891

1010 1100 0010 0111

Therefore AC2716  10101100001001112

Hexadecimal Binary
equivalent
0 0000
1 0001
2 0010
3 0011
4 0100
5 0110
6 0111
7 1000
8 1001
9 1010
A (10) 1011
B (11) 1100
C(12) 1101
D (13) 1101
E (14) 1110
E (15) 1111

REVIEW QUESTIONS 1.8


Convert the following hexadecimal numbers into
binary form
1. 29416 2. 24716 3. EFD16 4. 90716 5. BAD16

23

Downloaded by Fredrick Musee ([email protected])


lOMoARcPSD|40487891

6. CBDF16 7. 585C16 8. ABCD16 9. 55C3A16


10. 33111CF16
11. Convert 1111000110111 to its hexadecimal
equivalent.

iii). Converting hexadecimal to octal


Look for binary equivalent of each digit individually.
Group the binary equivalent into 3 bits starting from
Right, then convert into octal. Or get the decimal
equivalent then convert from decimal to octal by
dividing repeatedly by 8.

Example:
Convert 91B16 into Octal.
Soln.
9 - 10012
1 - 00012
B(11) - 10112
100100011011
Group into 3 bits

222120 222120 222120 222120


100 100 0 11 011
4 4 3 3
Then convert into octal equivalent

(1 x 22+ 0x21 + 0 x 20), (1 x 22+ 0x21 + 0 x 20), (0 x 22+


1x21 + 1 x 20), (0 x 22+ 1x21 + 1 x 20),
4 4 3 3

24

Downloaded by Fredrick Musee ([email protected])


lOMoARcPSD|40487891

Therefore Octal equivalent = 44338


or get decimal equivalent
Decimal equivalent
(11x160) + (1 x 161) + (9 x 162) = 233110
8 2331 R
8 291 3
8 36 3
8 4 4
8 0 4
Therefore =
44338

Conversion from decimal to hexadecimal


Divide the digit repeatedly by 16 until the last result of the
division is 0. then write the remainder of the numbers
upwards.
Example:
Convert 52910 to hexadecimal
16 529 R
16 33 1
16 2 1
0 2

Therefore =
21116
Conversation from decimal to Octal
Divide repeatedly by 8 until the last result of the division is
0. Then write the remainder of the numbers going upwards.

Example
25

Downloaded by Fredrick Musee ([email protected])


lOMoARcPSD|40487891

Convert 5710 to octal.


Soln.
8 57 R
8 7 1
0 7
5710 = 718

Converting decimal real number to octal


To convert the fractional part in decimal real number to
octal. E.g. Convert 123.510 to octal.
Convert the integer part as above i.e. using long division

8 123 R
8 15 3
8 1 7
0 1
For the fractional part, multiply this part by 8, that is you
can only
0.50 x 8 = 4.00
For the fractional part, multiply this part by 8, that is 0.5 x
8 = 4.00.
You only use complete units and you read downwards,
123.510  173.48

Converting octal number to hexadecimal


Convert 3768 to hexadecimal.
Soln.
3 = 0112
7 = 1112
26

Downloaded by Fredrick Musee ([email protected])


lOMoARcPSD|40487891

6 = 1102
Group into 4 bits 0 ,1111, 1110 then convert into
hexadecimal as follows:
i). ( 23 x 1 + 22 x 1+ 21 x 1 + 20 + 1) = 15 (F)
ii). (23 x 1 + 22 x 1 + 21 x 1+ 0 x 20) = 14 (E)
Therefore 3768  FE16
Or
Change octal to decimal first then from decimal to hex as
follows;
3768  3 x 82 + 7 x 81 + 6 x 80 = 25410
Divide the decimal repeatedly by 16 to change to
hexadecimal.

1 254
6
1 15 R 14(E)
6
0 R 15 (F)
= FE16

27

Downloaded by Fredrick Musee ([email protected])


lOMoARcPSD|40487891

SYMBOLIC REPRESENTATION USING CODING


SCHEMES
The coding schemes are the Binary Coded Decimal (BCD),
Extended Binary Coded Decimal Interchange Code
(EBCDIC) and American Standard Code for Information
Interchange (ASCII).

(i). Binary Coded Decimal (BCD)


Is a data encoding method where each decimal digit is
represented with a 4 bit code / binary equivalent. It is used
in simple electronic devices like calculators and
microwaves because it makes it easier to process and
display individual numbers on their LCD screens.
A standard Binary Coded decimal is an enhanced format of
Binary Coded Decimal which is a data encoding method
where each alphanumeric is represented with a six-bit
binary equivalent.

Question:
Write the number 45110 in BCD notation.
Soln.
Workout each digit binary equivalent independently, where
he digits are less than 4 add 0s on the left to make 4 bits
4 = 0100
5 = 0101
28

Downloaded by Fredrick Musee ([email protected])


lOMoARcPSD|40487891

1 = 0001
45110 = 010001010001BCD

ii). Extended Binary Coded Decimal Interchange Code


(EBCDIC)
EBCDIC is pronounced as “Eb-See-Dick”. It represents
characters using 8 – bits which allows representation of
more characters 256 i.e. 28. EBCDIC is mainly used on IBM
computers. The eight bits of EBCDIC are divided in two
pieces. The first four bits are called the zone bit which
represent the category of the characters, whereas the last
four bits are called the data bits and identify the specific
character.

iii). American Standard Code for Information


Interchange (ASCII)
is a 7-bit code, which means that only 128 i.e. 27 characters
can be represented. There is an 8th bit to this coding scheme
which can provide for 256 characters. The 8th bit is added
for parity checking. E.g A can be represented as 10000012.

29

Downloaded by Fredrick Musee ([email protected])


lOMoARcPSD|40487891

BINARY ARITHMETIC OPERATIONS


There are four basic operations applied on numbers and
they are addition, subtraction, multiplication and division.

Representation of signed binary numbers (Negative


numbers)
Signed numbers (negative or positive numbers) can be
represented using three methods as follows;
(i) Ones complement
(ii) Two’s compliment
(iii) Signed magnitude(prefixing an extra sign bit to a
binary number)

Ones complement
The 1’s complement of a binary number is found by simply
changing all 1’s to 0’s and all 0’s to 1’s e.g. -2110 can be
represented in binary as a negative value as follows.

2110= 101012
Therefore -2110  010102 (by complementing each
binary digit / bit).
Therefore -2110 = 010102 (1’s complement method.)

-4510 = 1011012 (1’s Complement 010102)


- 1710 = 100012 complement = 0100102
-1710 = 100012 complement = 011102

Two’s complement

30

Downloaded by Fredrick Musee ([email protected])


lOMoARcPSD|40487891

The 2’s complement of a binary integer is formed by


finding the 1’s complement of the number and adding 1 to
it.
Advantages of 2’s complement
There is no two ways of representing a zero as in 1’s
complement and signed magnitude.
Effective addition and subtraction can be done even with
numbers that are represented with a sign bit.
Question: Using six bits, find the two’s complement of
-2310. (4 marks)
Solution:
Step Binary equivalent 2310 = 101112
1:
Step Add 0 in front of the MSB to = 0101112
2: make it six bits number
Step Find one’s complement = 101000
3
Step Add 1 to number 101000
4 +1
101001

Signed magnitude
In decimal numbers, signed numbers has a prefix “+” for a
positive number e.g +3210 and “-“ for a negative number
e.g. -3210. 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 number 0.
i.e. 1710 => 100012 (unsigned)
-1710 => to indicate it’s a negative number we add an extra
bit (1)100012
31

Downloaded by Fredrick Musee ([email protected])


lOMoARcPSD|40487891

+1710 to indicate its positive we add an extra bit (0)


100012

Binary addition
The binary addition is same as for decimal numbers only
that any complete unit of two’s is carried to be added to the
next significant digit. The five possible additions are

A B Sum carry
1. 0 + 0 = 0 0
2. 0 + 1 = 1 0
3. 1 + 0 = 1 0
4. 1 + 1 = 10 1{read as 0,
carry 1}
5. 1 + 1+1 = 11 1{read as 1,
carry 1}

Examples:
i). Find sum of 1112 + 0112
Soln.
1 1 1
+ 0 1 1
10 1 02

ii). Find the sum of 101102 + 10112 + 1112


soln:
32

Downloaded by Fredrick Musee ([email protected])


lOMoARcPSD|40487891

Add the two first numbers and then add the sum to the 3rd
number as follows
Step 1
101110
+ 1011
100001
Step 2
1000012
1112
1010002

Review questions 1.9


Work out the following binary additions
1. 10102 2. 11112 3. 10112
+ 1112 + 1112 + 11102

4. 111012 5. 10001112 6. 11012


+ 101102 100102 + 1012

7. 1111102 8. 1000112 9. 1011102


1112 101012 11112
+ 102 + 1112 + 112

Binary subtraction

33

Downloaded by Fredrick Musee ([email protected])


lOMoARcPSD|40487891

There are four possible direct subtractions in binary as


illustrated below:
1) 0 – 0 = 0
2) 12 – 0 = 1
3) 12 – 12 = 0
4) 10 2 – 12 =12{borrow 1 from the next most significant
digit to make 0 become 102, hence 102 – 12 = 12}

When subtracting binary numbers the above rules should


be understood and adhered to.
Examples:
1). Workout the following binary subtraction
11012
- 10102

Step 1-0 = 1
1
Step 10 – 1 = 1 {borrow 1 to make the
2 current value 102 (22)
from the next significant
digit)
Step 0 – 0 = 0
3
Step 1 – 1 = 0
4

34

Downloaded by Fredrick Musee ([email protected])


lOMoARcPSD|40487891

Therefore 11012 – 10102 = 112


Review questions 1.10
Work out the following subtractions
1. 110012 2. 1012 3. 110112 4. 11002
- 10102 - 1002 - 1112 -
0112

5. 1110112 6. 1000102
- 1102 - 112
6. 1000102 – 112 7. 011012 – 10112 8. 1111112 –
101011012
9. 111011012 – 1001112 10. 1000002 - 11112

Subtraction using 1’s complement


This method allows us to subtract using addition. To
subtract X (minuend) from Y (subtrahend) proceed as
follows:
Determine the 1’s complement of the minuend (X).
1). Add the 1’s complement of the minuend (x) to the
subtrahend (Y).
2). Remove the carry (overflow bit) and add it to the result.

Example
Subtract 100112 from 110012 using 1’s complement.

Step 1
Minuend => 1’s complement of 100112 = 011002

Step 2
35

Downloaded by Fredrick Musee ([email protected])


lOMoARcPSD|40487891

Add minuend 1’s complement to subtrahend 110012


11001
01100
(1) 00101
Add overflow bit to the + 1
result 001101
00110

Final
result =
001102.

Example: Using 8 bits, find ones complement of 1310.


13 = 000011012 complement 111100102

Subtracting using two’s complement (2’s)


2’s complement is done by forming the 1’s complement of
the minuend and adding 1 to it. Then you add the result to
the subtrahend. You ignore the overflow bit.

Example:
Subtract 3 from 5 in 8-bits 2’s complement.
+5 Subtrahend 00000101
+(- Minuend 00000011
3)

Step 1 Forms 1’s complement of (3) 11111100


36

Downloaded by Fredrick Musee ([email protected])


lOMoARcPSD|40487891

00000011 which is
Step 2 Add 1 to 1’s complement which 11111100
becomes +1
11111101

Step 3 Add the two numbers now i.e. add 00000101


the binary equivalent of 5 11111101
(Subtrahend) to the 2’s complement (1)00000010
of 3 (Minuend)

Step 4 Ignore the overflow bit


Therefore the result is 000000102
which is equivalent to +2.

Two’s complement table showing a bit range


Decima Binary two’s
l complement
representation
7 0111
6 0110
5 0101
4 0100
3 0011
2 0010
1 0001
0 0000
-1 1111
-2 1110
-3 1101
-4 1100
37

Downloaded by Fredrick Musee ([email protected])


lOMoARcPSD|40487891

-5 1011
-6 1010
-7 1001
-8 1000

Review questions 1.11


1. Convert the decimal number -7 to 8 – bit binary using
ones and twos complement.
2. using 8 – bit length, find the twos complement of the
following decimal numbers:
a). -3110 b). -2810 c). -510
3. using ones and twos complement perform the following
arithmetic operations
a). 1410 – 710 b). 2810 – 1210 c). 3410 – 3310
d). 10010 – 5010 e). 10210 – 6410

Revision questions
1). Explain the two types of data signals.
2). Differentiate between
a). Octal and decimal number systems
b). Binary and hexadecimal number systems
3). Convert the following binary numbers to their decimal
equivalents
a). 1011102 b). 57010 c). 4210 d). 3010
4). Convert the following decimal numbers to their
decimal equivalents.
a). 78910 b). 57010 c). 4210 d).
3010
5). Find the sum of the following binary numbers
a). 11102 + 11112 = b). 0012 + 1002 =
38

Downloaded by Fredrick Musee ([email protected])


lOMoARcPSD|40487891

c). 11012 + 10112 + 1002 = d). 10102 + 1012 =


e). 1112 + 112 =
6). Workout the following binary subtraction using direct,
ones and twos complement methods.
a). 11001 – 1101 b). 1000 – 101 c).
100011 – 111
d). 10101110 – 1000110 e). 10001000110 - 101
7). Write down the character represented by the following
codes.

a). ASCII b). EBCDIC


i). 0110000 i) 11110000
ii). 0110111 ii). 11110111

iii) 1000011 iii) 11000001


. .
iv). 1011001 iv). 01011101

8). Find the ones and twos complement of the following


decimal number in binary form.
a). -7510 b). -8010 c). -10010
9). Determine the value of X in the equations:
a). 1001102 – X2 = 0010102 b). X2 + 11012 = 7010

10).Work out the decimal equivalents of the following


binary numbers.
a). 0.100102 b). 101.112 c). 11.1012 d). 0.0012
11).Work out the binary equivalents of the following
decimal numbers.
a). 0.3510 b). 2.5010 c). 0.2010 d). 7.12510
39

Downloaded by Fredrick Musee ([email protected])


lOMoARcPSD|40487891

2. a). perform the following binary arithmetic and give your


answer in decimal notation:
i). 1010.101 + 11.011 (3
marks)
ii).1010.011 – 11.011 (3
marks)
b). Convert the following numbers into their binary
equivalents
i). 0.562510 (3 marks)
ii).0.312510
(3 marks)

c). Using four – bit twos complement, perform the


following arithmetic
1012 – 1112 (3 marks)
Kcse 2008
1.a) Describe two ways in which a computer
can represent a positive number and a
negative number.
(2 marks)
b). a particular computer stores numbers in a
single 8-bit word. How would it represent
0.312510? (3 marks)
c). What is the decimal equivalent of the
number 1.01112? (2 marks)
d). perform the decimal subtraction 1410 – 610
using

40

Downloaded by Fredrick Musee ([email protected])


lOMoARcPSD|40487891

i). regular binary


(3 marks)
ii). one’s complement
(5 marks)

Kcse 2007
1.Using six bits, find the two’s complement
of -2310. (4 marks)

Kcse 2005
17. (a) Subtract 01112 from 10012
(1 mark)
(b) Using two’s complement, subtract 7
from 4 and give the answer in decimal
notation. (4
marks)
(c) Convert:
(i) 91B16 to Octal
(3 marks)
(ii) 3768 to hexadecimal
(3 marks)
(iii)

41

Downloaded by Fredrick Musee ([email protected])


lOMoARcPSD|40487891

2.0 Data Processing


This chapter focuses on how computers manipulates the
data that it stores.

2.1 Definition of terms


Data – raw / basic facts that have little or no meaning. It
refers to the codes represented by the computer before
processing.
Information – data that has undergone processing and is
meaningful to the user when he/she need it.

Data processing
Refers to;
1) Transformation of raw data into meaningful output
(information)
2) The preparation, storage or manipulation of data /
information.
3) The collection, manipulation and distribution of data to
achieve a certain objectives.
Data processing can be done manually, mechanically or
electrically.

Data processing cycle


42

Downloaded by Fredrick Musee ([email protected])


lOMoARcPSD|40487891

Refers to;
1) Input – process – output stage that data goes through to
be transformed into information.
2) Is when data is collected, input, processed and output
manually or by means of a computer.

2.2 stages of data processing cycle


They are four namely;
a). Data collection
b). Data input
c). Processing
d). Output
Feedback sometimes may be included as a stage.
Data collection

Output Data input

Processing

a). Data collection (fact finding)


Involves looking for or getting the data needed for
processing.
Methods of data collection
Depending on the method of data collection used, the
process of data collection may involve the following:

i). Data creation


43

Downloaded by Fredrick Musee ([email protected])


lOMoARcPSD|40487891

Data can originate from source documents i.e.


clerically prepared documents. Dat a can also be prepared
in machine sensible form at the source an dread directly
using data capture devices like scanners, digital cameras
etc.
ii).Data transmission
This is the act of moving data from source to where
processing is done. The transmission can be physical or
electrical.
iii). Data preparation
Refer to conversation of data from a source to a machine
readable / sensible form. It involves transcription
(copying) and verification (checking for errors manually)
processes.
Data collected using devices that capture data in digital
form do not require transcription or conversation.
iv). Media conversation (data conversation)
Data may need to be converted from one medium to
another e.g. moving data from diskette to tape / Hard
disk for faster input
v). Input validation
Data entered has been moved from a different
deviceis now checked for errors by a computer
program before being procecessed to ascertain error
free data processing.*(subjecting data to validity and
verification checks before processing)
vi). Verification
Checking that what is on input document is exactly the
same as what is entered into the computer.
vii). Validation
44

Downloaded by Fredrick Musee ([email protected])


lOMoARcPSD|40487891

Is identification and removal of errors by the computer


through the control of the program.
viii). Sorting
Data is arranged in a given order depending on the
rocessing requirements.
ix). Control
All stages must be controlled to ensure that data is
processed, its integrity is maintained, error detection,
correction and reprocessing is possible, prevention and
detection of fraud is possible.

b). DATA INPUT.


Is the process where the collected data is converted from
human readable form to machine- readable form.

c). Processing
Transformation of input data by the cpu to a more
meaningful output.

d). Output
Is the final activity of data processing cycle which produces
the desired output (information). The information is then
distributed to the target groups or stored for future use.
Distribution (dissemination)
Is the making information available to those who need it.

2.3 DESCRIPTION OF ERRORS IN DATA


PROCESSING

45

Downloaded by Fredrick Musee ([email protected])


lOMoARcPSD|40487891

The accuracy of the data entered in the computer


determines the accuracy of the information given out hence
the saying Garbage In Garbage Out, GIGO.

Types of data processing errors.

(i) Transcription errors


These errors occurs during data entry i.e errors made in
copying data from one form to another. Data entry errors-
are runtime errors that occur if a wrong type is read into a
variable such as character instead of integer. These errors
includes:

a) Misreading errors.
They are brought about by incorrect reading of source
document by the usre and hence entering wrong values.
Example typing 2754 instead of 2154; typing wrong
characters e.g. datat instead of data. There are also
omission errors where a character has been missed onto.
These errors may be caused by bad handwriting or
confusion on the source document. Example 0 instead of
letter o.

b) Transposition errors
Are errors which occur due to a mistake made by
interchanging (incorrect arrangement) of two correct
characters or numbers during typing e.g. typing 7754
instead of 7745. Transcription errors can be eliminated
by use of data capture devices..

46

Downloaded by Fredrick Musee ([email protected])


lOMoARcPSD|40487891

ii). Computational errors


They occur when an arithmetic operation does not
produce the expected results. They include:
a). Overflow errors
Overflow errors are runtime errors (errors that occur when
the user directs the computer to perform invalid operations)
that occur as a result of attempting to store a value that is too
large for the available space. e.g. if the memory space can
accommodate an 8-bit number and the results from an
arithmetic is 9-bit then an overflow will occur.
b). Truncation errors
This results from having real numbers that make a long
fractional part which can not fit in the allocated space
memory. The computer truncates or cuts of the extra
characters from the fractional part e.g.0.854692 can be
truncated to 4-digits as 0.8546. The resulting number is not
rounded off.

c). Rounding errors.


This results from raising or lowering a digit in a real
number to he required rounded number e.g a number 3.59
can be rounded to 3.6
d). Algorithm or logical errors.
Algorithm is a set of procedural steps followed to solve a
given problem. Algorithms are used as design tools when
writing programs.
These errors occur as a result of wrong algorithm design.
The program runs but gives erroneous output.

47

Downloaded by Fredrick Musee ([email protected])


lOMoARcPSD|40487891

Other errors include;


 Missing source documents
 Errors in a program (Bugs).
 Machine hardware faults.
 Source documents on which entries are omitted,
dubious or replaced.

Talk of controls methods to ensure data integrity is


maintained.

2.4 DATA INTEGRITY


 Refers to the accuracy and completeness of data
entered in a computer or received from information
system.
 Can also mean the condition in which data is
unchanged from its source and has not been
accidentally or maliciously modified, altered or
destroyed.

Factors to determine data integrity


 Accuracy – it should be error free otherwise it is
rejected and delays may occur. If correct instructions
and data are entered, computers produce accurate
results efficiently.
 Timeliness – time value has to be adhered to. Data and
information should reach the required destination at the
right time and speed. Otherwise it becomes expensive
and at times useless.

48

Downloaded by Fredrick Musee ([email protected])


lOMoARcPSD|40487891

 Relevance – the data entered must be pertinent to the


processing needs at hand and must meet the
requirements of the processing cycle.
 Audibility – auditability referred to as verifiability. This
is the ability of users to check the accuracy and
completeness of information.

Threats to data security


Threats to data security can be minimized through the
following:
1) Using error detection and correction software when
transmitting data.
2) Design user interfaces that minimizes chances that of
invalid data entry.
3) Using devices that capture data directly from source e.g.
scanners etc.
4) Control access to data by enforcing security measures.
5) Backup data preferably on external storage media.

2.5 Data processing methods


Data can be processed using one of the following methods;
i). Mechanically
ii).Manually
iii). Electrically

i). Manual data processing


The tasks are done manually using a pen and a paper by a
person who is involved. Incoming tasks (input) are stacked
in the “in tray” and processed tasks are then put in the “out
tray”.
49

Downloaded by Fredrick Musee ([email protected])


lOMoARcPSD|40487891

ii). Mechanical data processing


Operations/tasks are done using mechanical machines
which help in automating the manual tasks. Manual
processing is cumbersome processing is cumbersome and
boring especially when processing repetitive tasks.
Examples of machines are calculators, typewriters, printing
press, etc.

iii). Electronic data processing


Data is manipulated using electronic programmable devices
such as computers to produce information. This method is
faster and more accurate than the manual or mechanical
where large volumes of data are processed. The method
involves use of computers and other electronic machines
like mobile phones, washing machines, modern digital Tvs
etc.

Factors to determine the methods of data processing


1) Size and type of business
2) Timing aspects
3) Link between application

2.6 Computer files


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.
Files can be read from or written to storage devices e.g
main memory, hard disk, magnetic tape etc.
50

Downloaded by Fredrick Musee ([email protected])


lOMoARcPSD|40487891

Elements of a computer file.


A computer file is made up of 3 elements namely:
i). Characters: A character is the smallest elements in a
logical file. The characters can be numeric or
alphabetic e.g A, B,1, 2, 3 etc that can be entered,
stored and output by a computer. A character is made
up of 7 or 8 bits depending on the coding scheme used.
ii). Fields: a field
UNCOMPLETE

KCSE questions from this topic


Kcse 2009

ELEMENTARY PROGRAMMING
PRINCIPLES
CONTENT
1. Definition of programming
2. Levels of programming languages
3. Advantages and disadvantages of
low and high level programming
languages
4. Description:
(i) assembler
51

Downloaded by Fredrick Musee ([email protected])


lOMoARcPSD|40487891

(ii) compiler
(iii) interpreter
(iv) source program
(v) object program
5. Program development (stages)
6. Program control structures
7. Definition and development and
development of algorithms, pseudocodes
and flowcharts

SPECIFIC OBJECTIVES
By the end of the topic, the learner should
be to:
(a) Define programming
(b) Describe various levels of
programming languages
(c) State the advantages and
disadvantages each level of
programming languages
(d) Define the terms: assembler,
compiler, interpreter, source program
and object program
52

Downloaded by Fredrick Musee ([email protected])


lOMoARcPSD|40487891

(e) Describe stages of program


development
(f) Describe the program control
structures
(g) Define and develop algorithm,
pseudocodes and flow charts

INTRODUCTION
A computer works by executing set of
instructions called programs. A program is a
set of instruction given to the computer to
perform various operations on the data
supplied to it; and has to be planned in an
orderly fashion.
The instructions as well as the data are
placed simultaneously in computer memory
in the form of bits (binary digits)
The function of a program is to enable the
computer to perform a specified activity.
E.g. producing payroll, updating sales ledger
balance, performing calculations etc
53

Downloaded by Fredrick Musee ([email protected])


lOMoARcPSD|40487891

Computer Program is a set of instructions


that directs a computer to perform some
processing function or combination of
functions. For the instructions to be carried
out, a computer must execute a program,
that is, the computer reads the program, and
then follows the steps encoded in the
program in a precise order until completion.
A program can be executed many different
times, with each execution yielding a
potentially different result depending upon
the options and data that the user gives the
computer.

Programming is the process of writing


logical and systematic computer programs.
Logical (in this case) means programs
making sense and they do what is expected
while systematic means well organized
programs. E.g. by use of procedures and
functions
54

Downloaded by Fredrick Musee ([email protected])


lOMoARcPSD|40487891

Procedure – sub program within a program


that can be modified independently.
When writing a program you require a
programming language i.e. set of language
instructions.

Programming
Language, in computer science, artificial
language used to write a sequence of
instructions (a computer program) that can
be run by a computer. Similar to natural
languages, such as English, programming
languages have a vocabulary, grammar, and
syntax. However, natural languages are not
suited for programming computers because
they are ambiguous, meaning that their
vocabulary and grammatical structure may
be interpreted in multiple ways. The
languages used to program computers must
have simple logical structures, and the rules
for their grammar, spelling, and punctuation
must be precise.
55

Downloaded by Fredrick Musee ([email protected])


lOMoARcPSD|40487891

The language must be understood by the


computer or else there must be a translator
of language to the computer.

Programmer, an individual who writes and


debugs computer programs—the sometimes
lengthy sequences of instructions that
determine the work performed by a
computer. Depending on the size of the
project and the work environment, a
programmer might work alone or as part of a
team, be involved in part or all of the
process from design through completion, or
write all or a portion of the program.
Syntax -a special sequence of writing
characters used in a particular programming
language.

It was John Von Neumann of Princeton


University (USA) who first came up with
56

Downloaded by Fredrick Musee ([email protected])


lOMoARcPSD|40487891

proposition to store programs in the


computer memory. Hungarian-American
mathematician John von Neumann writes
the first paper describing the design of a
general-purpose digital electronic computer.
He also contributes to the development of
the stored-program concept.
Each programming language will have its
own vocabulary and grammar. This is
commonly called RESERVED WORDS
e.g. WRITELN, READLN, PROCEDURE
etc as in PASCAL

LEVELS OF PROGRAMMING
LANGUAGES
Classified into two major classes:
1. Low-level programming languages
2. High-level programming languages

These levels are further subdivided into five


generations. The first and second
57

Downloaded by Fredrick Musee ([email protected])


lOMoARcPSD|40487891

generations consist of low level languages


while the third to fifth generations consist of
high-level language

LOW-LEVEL LANGUAGES
Low-Level Language, in computer science,
a computer programming language that is
machine-dependent and/or that offers few
control instructions and data types. Each
statement in a program written in a low-
level language usually corresponds to one
machine instruction.
They are classified as low because they can
be easily understood by the computer
directly. They require no translation since
they are in computer understandable form or
hardware oriented. There they are not
portable i.e. a program written for one
computer cannot be installed and used in
another.
Types of low level languages
58

Downloaded by Fredrick Musee ([email protected])


lOMoARcPSD|40487891

1. Machine languages (First generation


languages)
2. Assembly languages (Second
generation languages)
Machine Languages (First Generation
Language)
In this language, instructions are written
using machine code i.e. binary logic (binary
digits). This is the only language which the
computer understands, and all other
languages have to be converted to this
language for execution.

A program written in machine language


might look like this:
1100110 01100101 101110111
1001000 10010000 011001100

Machine Code, or machine language, in


computer science, low-level programming
language that can be understood directly by
a computer’s central processing unit (CPU).
Machine code consists of sequences of
59

Downloaded by Fredrick Musee ([email protected])


lOMoARcPSD|40487891

binary numbers, or bits, which are usually


represented by 1s and 0s, and which form
the basic instructions that guide the
operation of a computer. The specific set of
instructions that constitutes a machine code
depends on the make and model of the
computer’s CPU. For instance, the machine
code for the Motorola 68000 microprocessor
differs from that used in the Intel Pentium
microprocessor
Advantages of Machine Language (First
Generation Languages)
1. It is machine oriented – friendly to the machine i.e. it
does not require any translation
2. Program written in machine language is fast executed
– no time wastage in terms of translation
3. It is stable and hardly crash or break down once
written
Disadvantages of machine language (First Generation
Language)

60

Downloaded by Fredrick Musee ([email protected])


lOMoARcPSD|40487891

1. It is difficult to learn the machine code. One will have


to understand the ASCII and EBCDIC machine codes
to be able to write a program.
2. Writing programs in machine code is tedious and
time-consuming since the programmer must keep
track of each specific bit in an instruction
3. It is time consuming
4. Another difficulty with programming directly in
machine code is that errors are very hard to detect
because the program is represented by rows and
columns of 1s and 0s.

To overcome these problems, American mathematician


Grace Murray Hopper developed assembly language in
1952. Assembly language uses easy to remember terms—
such as SUB for a subtraction operation, and MPY for a
multiplication operation—to represent specific
instructions in machine code.
Assembly Language (Second Generation Language)
Assembly language makes programming much easier, but
an assembly language program must be translated into
machine code before it can be understood and run by the
computer. Special utility programs called assemblers
perform the function of translating assembly language
code into machine code. Like machine code, the specific
61

Downloaded by Fredrick Musee ([email protected])


lOMoARcPSD|40487891

set of instructions that make up an assembly language


depend on the make and model of the computer’s CPU.
Other programming languages such as Fortran, BASIC, and
C++, make programming even easier than with assembly
language and are used to write the majority of programs.
These languages, called high-level languages, are closer in
form to natural languages and allow very complicated
operations to be written in compact notation.
Assembly languages are thus specific to a given processor.
After writing an assembly language program, the
programmer must use the assembler specific to the
microprocessor to translate the assembly language into
machine code. Assembly language provides precise control
of the computer, but assembly language programs written
for one type of computer must be rewritten to operate on
another type.

Assembly Assembler Machine code


Language program

The assembly language uses abbreviations to write a


program. Such abbreviations include: ADD, SUB, DIV,
MULT etc. Assembly Language was meant to solve the
problems encountered in machine language i.e. errors, time
and difficulties in learning the program.

62

Downloaded by Fredrick Musee ([email protected])


lOMoARcPSD|40487891

Advantages of Assembly Language (Second Generation


Languages)
1. It is easier to learn and understand than machine
language because it uses abbreviations which are
easier to understand than binary digits
2. It is user friendly than machine language
3. fewer errors as compared with machine language
Disadvantages of Assembly Language (Second
Generation Languages)
1. Slow in execution because of requirement of
assembler program for translation
2. The programs are still machine dependent and hence
non portable.
3. The program cannot be executed by by the computer
hardware directly
HIGH LEVEL LANGUAGES
High-level languages were developed because of the
difficulty of programming using assembly languages. High-
level languages are easier to use than machine and
assembly languages because their commands are closer to
natural human language (English – like).
They can be read and understood by people who are not
experts in programming. In addition, these languages are

63

Downloaded by Fredrick Musee ([email protected])


lOMoARcPSD|40487891

not CPU-specific. Instead, they contain general commands


that work on different CPUs.
Like assembly languages, all high-level languages must
first be translated into machine code before they can be run
by a computer. To accomplish this, programmers use
various types of utility programs, such as compilers,
assemblers, linkers, and debuggers, which help them
translate high-level language into machine code. The
computer code used to write a program is called source
code before being translated into machine code, and object
code after it has been translated.
Characteristics of High Level Languages
1. They are problem oriented – the programmer works
with the program with little reference to the machine
2. They require a set of rules to be obeyed
3. They allow sub-routines (procedure within a program)
– i.e. allow subdividing of main program into smaller
programs for easy modification.
4. Use extensive vocabulary of words, symbols and
sentences
5. High level languages are machine independent i.e. the
programmer concentrates on problem solving during
programming rather than how a machine operates.
Classes of High Level Languages

64

Downloaded by Fredrick Musee ([email protected])


lOMoARcPSD|40487891

1. Third generation languages (3GLs)


2. Fourth generation Languages (4GLs)
3. Fifth generation Language (5GLs)
4. Object Oriented Languages (OOPs)
5. Web scripting languages
Third generation languages (3GLs)
They are also called structured or procedural languages.
This means that the program can be broken into
components called modules, each performing a particular
task. This is called structured programming.
Structured Programming, in computer science, a general
term referring to programming that produces programs with
clean flow, clear design, and a degree of modularity or
hierarchical structure. Benefits of structured programming
include ease of maintenance and ease of readability by
other programmers
Structured programming is flexible, easier to read and
modify.
Structured programming allow modularisation i.e.
dividing the main program into several procedures or
modules (self-running small programs)

Examples of third of generation languages (3GLs)


1. Pascal: Pascal programming language was designed in
1967-71 by Niklaus Wirth (Switzerland). Pascal, a
65

Downloaded by Fredrick Musee ([email protected])


lOMoARcPSD|40487891

compiled, structured language, was developed as a


tool for teaching and learning structured
programming. Acceptance and use of Pascal
exploded with Borland International's introduction in
1984 of Turbo Pascal, a high-speed, low-cost Pascal
compiler for MS-DOS systems that has sold over a
million copies in its various versions.
It is named in honour of BLAISE PASCAL (1623-
1662), a French mathematician and scientist). Even so,
Pascal appears to be losing ground to C as a standard
development language on microcomputers.

2. FORTRAN: in computer science, acronym for


FORmula TRANslation. The first high-level computer
language (developed 1954-1958 by John Backus). It
was developed for mathematicians, scientists and
engineers. The name indicates its scientific and
engineering roots; FORTRAN is still used heavily in
those fields, although the language itself has been
expanded and improved vastly over the last 35 years
to become a language that is useful in any field

3. COBOL, in computer science, acronym for COmmon


Business-Oriented Language, an English-like
programming language developed between 1959 and
1961. Developed to solve business problems. E.g.
computer based inventory control system.

4. BASIC, in computer science, acronym for Beginner's


All-purpose Symbolic Instruction Code. A high-level
66

Downloaded by Fredrick Musee ([email protected])


lOMoARcPSD|40487891

programming language developed by John Kemeny


and Thomas Kurtz at Dartmouth College in the mid-
1960s. The language has changed over the years. Early
versions are unstructured and interpreted. Later
versions are structured and often compiled. BASIC is
often taught to beginning programmers because it is
easy to use and understand and because it contains the
same major concepts as many other languages thought
to be more difficult, such as Pascal and C.

5. C (computer), in computer science, a programming


language developed by Dennis Ritchie at Bell
Laboratories in 1972; so named because its immediate
predecessor was the B programming language.
Although C is considered by many to be more a
machine-independent assembly language than a high-
level language, its close association with the UNIX
operating system, its enormous popularity, and its
standardization by the American National Standards
Institute (ANSI) has made it perhaps the closest thing
to a standard programming language in the
microcomputer/workstation marketplace. C is a
compiled language that contains a small set of built-in
functions that are machine dependent. The rest of the
C functions are machine independent and are
contained in libraries that can be accessed from C
programs. C programs are composed of one or more
functions defined by the programmer; thus C is a
structured programming language.

67

Downloaded by Fredrick Musee ([email protected])


lOMoARcPSD|40487891

6. Ada (computer language), in computer science, a


procedural programming language designed under the
direction of the U.S. Department of Defense (DOD) in
the late 1970s and intended to be the primary language
for DOD software development. Ada, named after
(Augusta) Ada Byron, Countess of Lovelace, who was
a pioneer in the field of computers, was derived from
Pascal. ADA is suitable for developing military,
industrial and real-time systems. It was named after
the first lady programmer, Ada Lovelace (1815-1852,
British mathematician)

Fourth generation languages (4GLs)


Make programming easier task than 3GLs because it
presents more programming tools to the programmer.
Examples of such tools include command buttons, forms
etc. Instead of writing lines upon lines of code, the
programmer selects graphical objects on the screen called
controls then uses them to create designs on a base form.
4GLs free the programmer from tedious work of writing
the code.

Examples of 4GLs include: Visual Basic, Delphi Pascal


and Visual COBOL

68

Downloaded by Fredrick Musee ([email protected])


lOMoARcPSD|40487891

A sample form designed using Visual Basic Programming


Language

Text box

Text box

In this case, the programmer simply picks a tool from tool


box and uses it to create objects such as command buttons,
text boxes etc on the form.

Fifth generation languages (5GLs)


They are designed around the concept of solving problems
by enabling the computer to depict human like intelligence.
They enable programmers to quickly design programs that
solve the problem at hand. In this case the programmer
only worries about what problem to be solved and what
conditions need to be met without worrying about how to
implement an algorithm to solve them. Examples are those
in artificial intelligence like: PROLOG, Mercury, LISP and
OCCAM. PROLOG – Programming in logic - for expert
69

Downloaded by Fredrick Musee ([email protected])


lOMoARcPSD|40487891

systems and artificial intelligence. Not suitable in


programming of commercial data processing applications.

.Object-Oriented Programming Languages


Object-oriented programming (OOP) languages, such as
C++ and Java, are based on traditional high-level
languages, but they enable a programmer to think in terms
of collections of cooperating objects instead of lists of
commands. Objects, such as a circle, have properties such
as the radius of the circle and the command that draws it on
the computer screen. Classes of objects can inherit features
from other classes of objects. For example, a class defining
squares can inherit features such as right angles from a
class defining rectangles. This set of programming classes
simplifies the programmer’s task, resulting in more
“reusable” computer code. Reusable code allows a
programmer to use code that has already been designed,
written, and tested. This makes the programmer’s task
easier, and it results in more reliable and efficient
programs.
The idea of OOP is to look at a program as having various
objects interacting to make up a whole. Each object has
specific data values that are unique to it (called state) and a
set of the things it can accomplish called (functions or
behaviour). The process of having data and functions that
operates on the data within an object is called
encapsulation. Several objects can then be linked together
to form a complete program.
70

Downloaded by Fredrick Musee ([email protected])


lOMoARcPSD|40487891

Examples of OOP languages: Simula, C++, Java,


SmallTalk. NB: Java is sometimes associated with
developing websites.
OOP has contributed greatly to the development of
graphical user interface operating systems and application
programs.
Web scripting languages
Hypertext Markup Language (HTML) in computer science,
the standard text-formatting language since 1989 for
documents on the interconnected computing network
known as the World Wide Web. HTML documents are text
files that contain two parts: content that is meant to be
rendered on a computer screen; and markup or tags,
encoded information that directs the text format on the
screen and is generally hidden from the user.

A tag is a special word enclosed between the less than and


greater than (><) symbols and the browser can interpret it
as a command. Other languages such as Extended HTML
(XML) have been derived directly from HTML with the
only difference being that XML allows the users to define
their tags instead of using the standard HTML tags.
Unlike other languages, HTML does not have a declaration
part and control structures hence it is not considered as true
programming language.

Some special blocks of codes known as scripts may be


inserted in HTML pages using scripting languages like
71

Downloaded by Fredrick Musee ([email protected])


lOMoARcPSD|40487891

Javascript, VBScript and Hypertext Processor (PHP) in


order to add functionality to the HTML page. A script is a
small program fragment written in a different language
other than HTML but inserted into the HTML program.

The software that permits the user to navigate the World


Wide Web and view HTML-encoded documents is called a
browser. It interprets the HTML tags in a document and
formats the content for screen display. Since HTML is an
accepted standard, anyone can build a browser without
concerning themselves with what form various documents
will assume, unlike documents produced by typical word
processors, which must be translated into a different format
if another word processing application is used. Most sites
on the World Wide Web adhere to HTML standards and,
because HTML is easy to use, the World Wide Web has
grown rapidly. HTML continues to evolve, however, so
browsers must be upgraded regularly to meet the revised
standards.
Practical Activity: Open notepad and key in the program
on page 57-58 and 59 respectively as it appears (Longhorn
secondary computer studies form 3)
Advantages of high level programming languages
(HLL)
1. They are easy to maintain and modify
2. They are user friendly – easy to learn and understand
3. Less prone to errors as compared to low level
languages

72

Downloaded by Fredrick Musee ([email protected])


lOMoARcPSD|40487891

4. They are problem oriented – not machine oriented (the


programmer is able to work with program with little
reference to the machine.

Disadvantages high level programming languages


(HLL)
1. They are slow in execution as compared to low level
languages – because of their need for translation.
2. They occupy a larger storage area than machine
language
3. Require a lot of learning on the use of program
4. Are not possible to be used in programming the
hardware direcly.

Definition of terms

1. Programming the process of developing computer


instructions to solve a particular task i.e. programs.
2. Program -a set of special instructions that enable the
computer to accomplish a particular task when
executed.
3. Programming language -A special set of symbols that
can be translated into machine readable form when
arranged in a particular sequence.
4. Syntax -a special sequence of writing characters used
in a particular programming language.

73

Downloaded by Fredrick Musee ([email protected])


lOMoARcPSD|40487891

5. Source program - a program code that is not yet


translated into machine readable form: developed
using a particular programming language.
6. Object code -The program code already translated into
machine readable form.
7. Translators -language processors that are used to
convert a source program into object code. Are of
three types :
(i)Assemblers -A language processor that converts a
source code in Assembly
language into machine language.
(ii) Interpreters -A language processor that converts
the source program, to object
code, statement by statement, line by line or word
by word.
(iii) Compilers -A language processor that translates
the entire source program into
object code.

Interpreters Compilers
1. Translates the - Translates the entire
74

Downloaded by Fredrick Musee ([email protected])


lOMoARcPSD|40487891

source program source code at once to


statement by object code, before
statement. execution.
- Compiled program can
2. Translates the be saved and run as
source program each required.
time it is run - Executes faster than
3. Slower than interpreted programs.
compiling. - Require more memory
4. Runs on a low space: Object files are
memory: since it larger and are stored.
does not store the
object code.

Factors to consider when choosing a programming


language
1. Execution time – applications that require quick
response is best programmed in machine code. High
level languages have to be translated hence their
executions are usually slow.
2. Development time – High level languages are easy to
read, understand and develop and therefore less
development time.
3. Maintenance – programs are developed to solve a
specific problem and the problems environments keep
on changing hence the programs are also changed to
meet the enhanced functional environment.
75

Downloaded by Fredrick Musee ([email protected])


lOMoARcPSD|40487891

4. Availability of programmers – the programming


language chosen should have a pool of readily
available programmers to ease e.g. maintenance
activity, reduce development time etc

Computer Languages (Summary)


Langua
Origin of Name Year Uses/Comments
ge
Augusta ADA
Derived from Pascal, used
ADA Byron (Lady 1979
primarily by the military.
Lovelace)
First structured procedural
ALGOrithmic programming language, used
ALGOL 1960
Language mainly for solving math
problems.
Interpreted language using a
A Programming large set of special symbols
APL 1961
Language and terse syntax. Used
primarily by mathematicians.
Very popular high-level
Beginners All-
programming language,
BASIC Purpose Symbolic 1965
frequently used by beginning
Instruction Code
programmers.
Compiled, structured,
Predecessor was programming language
Bell Laboratory's commonly used in many
C 1972 B 1972 workplaces because its
Programming programs are easy to transfer
Language between different types of
computers.
76

Downloaded by Fredrick Musee ([email protected])


lOMoARcPSD|40487891

C++ is used in numerous


fields, such as accounting and
Advanced version
finance systems, and
C++ of C. Developed 1985
computer-aided design.
at ATT Bell Labs.
Supports object-oriented
programming.
English-like programming
COmmon
language, emphasizes data
COBOL Business-Oriented 1959
structures. Widely used,
Language
especially in businesses.
Interpreted, structured
FOuRTH-
language, easily extended.
FORTH Generation 1970
Provides high functionality in
language (4 GL)
limited space.
Initially designed for
scientific and engineering
uses, a high-level, compiled
language now used in many
FORmula
Fortran 1954 fields. Introduced several
TRANslation
concepts such as variables,
conditional statements, and
separately compiled
subroutines.
HyperText Designed for publishing
HTML 1989
Markup Language hypertext on the Internet.
JAVA Sun 1990 Originally developed for use
Microsystems in set-top boxes, transitioned
developers drank to the World Wide Web in
a lot of coffee 1994.
when coding for
77

Downloaded by Fredrick Musee ([email protected])


lOMoARcPSD|40487891

this.
A list-oriented programming
language, mainly used to
manipulate lists of data.
Interpreted language, often
LISP LISt Processing 1960
used in research, generally
considered the 'standard'
language for Artificial
Intelligence (AI) projects.
Programming language often
used with children. Features a
Derived from
simple drawing environment
LOGO Greek logos, 1968
and several higher-level
meaning word
features from LISP. Primarily
educational.
MODULAr
Language that emphasizes
Language,
modular programming. High-
designed as
Modula- level language based on
secondary phase 1980
2 Pascal, characterized by lack
of Pascal (Niklaus
of standard functions and
Wirth devised
procedures.
both)
Compiled, structured
Blaise PASCAL, language, based on ALGOL.
mathematician Adds data types and
Pascal and inventor of 1971 structures while simplifying
first computing syntax. Like C language, it is
device a standard development
language for microcomputers.
PERL Practical 1988 It is a text-processing
78

Downloaded by Fredrick Musee ([email protected])


lOMoARcPSD|40487891

language that looks like a


Extraction and
combination of C and several
Report Language
Unix text processing utilities.
Programming language used
Programmed primarily to create
PILOT Inquiry, Language 1969 applications for computer-
Or Teaching aided instruction. Contains
very little syntax.
Designed to combine the key
features of Fortran, COBOL,
and ALGOL, a complex
programming language.
Programming
PL/1 1964 Compiled, structured
Language One
language capable of error
handling and multitasking,
used in some academic and
research environments.
Designed as a metalanguage,
Standard
it is used as an international
SGML Generalized 1986
standard for the description of
Markup Language
marked-up electronic text.
Designed to be used for
Structured Query creating complex databases
SQL 1986
Language and accessing data in a
relational database.
Sometimes called the Rapid
Applications Development
VB Visual Basic 1990
system, is used to build
applications quickly.

79

Downloaded by Fredrick Musee ([email protected])


lOMoARcPSD|40487891

Used for creating arbitrarily-


Extensible structured documents and
XML 1977
Markup Language Web pages; it is commonly
associated with the Internet.

PROGRAM DEVELOPMENT
Software designers create new programs by using special
applications programs, often called utility programs or
development programs. A programmer uses another type of
program called a text editor to write the new program in a
special notation called a programming language. With the
text editor, the programmer creates a text file, which is an
80

Downloaded by Fredrick Musee ([email protected])


lOMoARcPSD|40487891

ordered list of instructions, also called the program source


file. The individual instructions that make up the program
source file are called source code. At this point, a special
applications program translates the source code into
machine language, or object code—a format that the
operating system will recognize as a proper program and be
able to execute
Before developing a program, the requirements of the
eventual users and its expected functions should be fully
understood.
Stages of program development:
This is also called program development cycle. They are in
order:
1. Problem recognition
2. Problem definition
3. Program design
4. Program coding
5. Program testing and debugging
6. Implementation and maintenance
NB: It is important to note that although some people
consider documentation as an independent stage, it is
done at all stages of program development cycle. This is

81

Downloaded by Fredrick Musee ([email protected])


lOMoARcPSD|40487891

important so that the facts are recorded when they are still
fresh and in the required detail by the programmer.
The completion of each stage leads to the beginning of the
next. Some stages have to be continuously reviewed to
make sure that they meet the requirements. E.g. after
coding the code has to compared with design to see
whether it meets design specifications.
1. Problem recognition
This is also called problem realization or problem
identification. It is basically a problem solving exercise.
The programmer identifies problems in the environment
and seeks to solve them by writing a computer program that
would provide a solution. Problem recognition refers to the
understanding and interpretation of a particular problem. To
understand a problem you need to look at key words such
as compute, evaluate, compare etc.
The following situations can cause a programmer to
identify a problem that is worth solving:
(a)Problems or undesirable situations that prevent an
individual or organization from achieving their
purpose
(b)Opportunity to improve the current program. It can
be argued that any unexploited opportunity is a
problem.

82

Downloaded by Fredrick Musee ([email protected])


lOMoARcPSD|40487891

(c)A new directive given by the management requiring a


change
It involves asking some basic questions such as:
(a)Is there a problem? Yes/no
(b)Does the problem require a solution? And what are
the possible solutions?
(c)How will the solution help solve the existing
problem? Etc

2. Problem definition
Involves explaining how the program will solve the current
existing problem. It is also referred to as problem analysis.
It also involves explaining the kind of input to be expected,
processing activities and expected output.
Example: In a problem of calculating the area of a circle, an
investigation reveals that the parameters needed to
determine the area are:
Input: - Pie () which is constant
- The radius of the circle
Process: The formula of calculating area of a circle which
is- *r*r
Output: The area of the circle (A)
83

Downloaded by Fredrick Musee ([email protected])


lOMoARcPSD|40487891

3. Program design
This is the actual development of program’s processing or
problem solving logic called algorithm. Algorithm refers
to a definite number of steps that a program follows in
order to solve a problem. It’s the programmer who usually
comes up with algorithm after carefully analyzing the
requirements specifications. Pseudocodes and flow charts
can also be used.
It involves the identifying of the processing tasks required
to carry out the problem solution. the task must be in order
and systematic.
Many programs are not usually made up of one large block
of code i.e. they are not monolithic. Instead several units
called modules work together to form a whole. In modular
programming each module performs a specific task. This
approach makes program flexible, easier to read and correct
errors. In this stage the programmer come up with models
of the expected program.

4. Program coding
This is a process of converting the design
specification/model into actual computer instructions
(program). It involves typing the program using a particular
programming language application software e.g. Pascal,
84

Downloaded by Fredrick Musee ([email protected])


lOMoARcPSD|40487891

COBOL, BASIC etc. the end result of this stage is a source


program that can be translated into machine readable form
for the computer to execute and solve the target problem.
Each programming language has its own structured English
words and vocabulary. These words are referred to as
RESERVED WORDS. The reserved words can only be
used for a specific function. Examples of reserved words in
Pascal: BEGIN, END, CONST, THEN, AND,
PROCEDURE etc.
Example of a simple code program: using Pascal
A Program to calculate the area of a square
PROGRAM Areaofasquare (input, output);
Uses Wincrt;
Var
Side: integer;
Area: integer;
BEGIN
Writeln (‘Please Enter the side measurement of the
square’);
Readln (Side);
Area:=Side*Side;

85

Downloaded by Fredrick Musee ([email protected])


lOMoARcPSD|40487891

Writeln (‘Area of the square is--- ‘,AREA);


END.
Rules in coding a program
1. Use standard identifiers or the reserved words
2. Make programming more readable by using
meaningful names i.e give variable names
3. Use comments to explain it. Add a comment to every
module. This makes program more readable.
4. Indent your program layout. This reflect the logic
structure of the code
5. Avoid ‘tricks’ – write the program using straight
forward code which people can read readily
understand.
6. Modularize the program – split the program to smaller
programs to make it easier to understand. This will
also reduce efforts changing the program because a
change will only affect the sub program. (use
procedures)

5. Program testing and debugging


This is checking whether the program has errors and
correcting them. After coding the program has to be
tested in order to identify, detect and correct errors
86

Downloaded by Fredrick Musee ([email protected])


lOMoARcPSD|40487891

(debug). It is meant to ensure that the program


corresponds with the original specification and it works
within the intended purpose.
A bug is a computer program error. The act of finding
and correcting errors in a program is a called debugging.
Testing involves comparing the results of the program
with the actual data. Use test data to check whether the
program gives you the desired results. If not, debug. For
a program to do the best results there is need for data
validation.
Two types of errors (bugs) can be encountered during
program testing:
1. Syntax errors
2. Logical errors
Syntax errors
These are errors that emanate from improper use of
language rules e.g. grammatical errors, punctuation,
improper naming of variables and misspelling of
reserved words. Syntax errors in a program are detected
by translator programs. If there is a problem in the code,
it will produce error message. Examples of translators:
assembler, interpreter and compiler.
Syntax errors can also be due to:
Failure to put a quote (‘) as in pascal
87

Downloaded by Fredrick Musee ([email protected])


lOMoARcPSD|40487891

Logical errors
These are errors in the program logic. The program runs
but gives wrong output (results) or halts during
execution. i.e. makes program produce wrong results or
run-time error (premature end).
NB: Logical errors are not detected by translators.
Solution to logical errors is to check on the code to
rectify the logic.

Methods of error detection


A good test must detect errors in the code. Exhaustive
testing is where by all the code in the software is tested.
However, it not possible to carry exhaustive testing.
1. Desk checking (dry-run)
This is going through the program on paper before
entering it in the program editor. This will help
programmers to detect and correct most obvious
syntax errors.
2. Using debugging utilities
This involves the use of translator utilities to detect
syntax errors in order to correct them before
execution.
3. Using test data
88

Downloaded by Fredrick Musee ([email protected])


lOMoARcPSD|40487891

This involves carrying out trial runs of the new


program. The programmer enters various data
variations including data with errors to test whether
will halt. E.g. if the input required is numeric, the
programmer may enter alphabetic character to see
whether the program will halt unexpectedly.
A good program should not crash due to incorrect data
entry but should inform the user about the anomaly
and request for the entry of correct data.

4. Diagnostic procedure
If the program is made up procedures or sub-divisions,
test each procedure independently.
Other errors: run-time errors, execution errors
6. Implementation and maintenance
Implementation refers to actual delivery and
installation of the new program ready for use. New
programs will change the way things are done hence
need for review and maintenance.
Review and maintenance
This is important because of the errors that may be
encountered after implementation and exposing the
89

Downloaded by Fredrick Musee ([email protected])


lOMoARcPSD|40487891

program to extensive use. A program may not only fail


due to poor development but also due to poor use. So
proper training and support should be provided to the
users always to reduce chances of crashing the
program due to invalid data entry or misuse.
Questions
1. Name three high level languages
2. What are programming languages?
3. Define the following terms: Assembler, interpreter,
compiler
4. give two disadvantages of machine languages
5. give three advantages of HLL
6. Name two types of HLL software translators
7. What is programming?
8. Who is a programmer?
9. Write in full
OOP
HTML
10. Differentiate between source program and object
code
11. Define the term encapsulation as used in OOP
90

Downloaded by Fredrick Musee ([email protected])


lOMoARcPSD|40487891

12. List four examples of HLL and state the most


appropriate application area for each.
13. Why is an executable file unique when compared
to any other file?
14. Why did early computers work well with
interpreters?
15. Outline six stages of program development in
their order.
16. What is a program bug?
17. Explain why it is important to test a program
before implementing it.
18. Distinguish between syntax and logical errors

4.0 SYSTEM DEVELOPMENT


Objectives:
a) Describe a system
b) Define an information system
c) State the purpose of an information system
d) Identify the stages of system development
e) Develop a system using a case study
f) Write a report on the case study
91

Downloaded by Fredrick Musee ([email protected])


lOMoARcPSD|40487891

This chapter is meant to equip you with the main skills for
writing a comprehensive computer studies project.

4.1 Description of a system


Definition of a system
» A set of items linked together to carry out a given task
in order to achieve one or more objectives
» A set of parts or components that work as a unit
» A collection of personnel, equipment and methods
organized to accomplish a set of specific functions.
» Any organized assembly of resources and procedures
united and regulated by interaction or interdependence
to accomplish a set of specific functions.
» 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 – results from interaction of


various components and may not exist in the individual
component.
Once components come together, they become and
generated new goals and objectives.

A system can be described as being either soft or hard:


a). Soft systems
human activity systems are said to be soft systems because
of the three main reasons:
i. their boundaries may be fluid or keep on changing
92

Downloaded by Fredrick Musee ([email protected])


lOMoARcPSD|40487891

ii. their goals and objectives conflict because they are


based on human factors like attitudes and preferences.
iii. Its difficult to precisely define exact measures of
performance for them.
Examples:
Political systems, sales tracking and prediction system in
an organization.

b). Hard systems


These are systems whose goals and objectives are clearly
defined and the outcomes from the systems processes are
predictable and can be modeled accurately e.g. a stock
management system in a supermarket, it is possible to
know exactly the stock levels, cost and sale price and to
predict accurately the profit if all the stock is sold.
A good system incorporates both hard and soft aspects of a
system.

System classification
i). Deterministic system
Are systems whose outputs are known precisely by
their inputs e.g. a computer system.
ii). Probabilistic system
Are systems whose output can only be predicted but
not known precisely e.g. business and economic
system organizations.
93

Downloaded by Fredrick Musee ([email protected])


lOMoARcPSD|40487891

iii). Cybernetic systems


Are self controlling systems which adapt to the
environment and regulate their own behaviour by
accessing the feedback. They access their output and
adjust the inputs e.g. human beings, plants systems.

Characteristics of systems
i). Holistic thinking
A system is considered as a whole. A Greek
philosopher called Aristotle said that the whole is
more than the sum of the parts. A combination of the
various components that make up a system may be
simple in nature and process but their combination
creates a complex whole; whose overall goals are
more sophisticated than those of individual
components. Therefore a system should be considered
as a whole unit, rather than considering its parts
individually.

ii). Sub systems


A subsystem is made up of different components
(subsystems). Therefore a system does not exist in
solitude but it may be a component of a larger system.
Example: class system is part of a school system > the
Ministry of Education > the Government > the Global
System.

iii). Processor

94

Downloaded by Fredrick Musee ([email protected])


lOMoARcPSD|40487891

An element of a system that does the actual


transformation or processes data from one state to
another i.e. input to output.

iv). Boundary and environment


System boundary is a scope within which the system
components operates. The external element whose
changes in attitudes, behaviour and property affect the
systems state and are also affected respectively are
system boundary. Any entity that falls outside the
boundary but interacts with the system is the systems
environment. Such entities are called external entities
and they provide the inputs and receive the outputs
from the system. Environment provides a reason for
the existence of the system.

v). Purpose
Each system is established to perform a particular task
or 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.

vi). System entropy


Entropy means decay. Systems decay naturally over
time, hence it slowly becomes useless to the user
either due to improvement in technology, new
management or change in user requirements.

95

Downloaded by Fredrick Musee ([email protected])


lOMoARcPSD|40487891

Therefore it must be reviewed in order to improve it or


develop a new one.

vii). Inputs and outputs


A system communicates with its environments by
receiving inputs and giving outputs. E.g. a
manufacturing firm that gets raw materials (inputs)
from the environment and transforms them to finished
goods (outputs) released to the environment.
A school system which gets learners from the
environment (input), trains them to take up roles
(careers) within the environment society (output).
viii). Open and closed systems
An open system receives input from and gives output
to the environment while a closed system does not
interact with the environment. Open systems normally
adapt to the changes in the environment.

ix). Control
Is the process by which the system adapts to changes
in the environment in order to give the expected
output or to perform to the expected level. Control is
achieved through feedback. Feedback involves having
output from the process of the system being fed back
to the control mechanism, which in turn makes sure
that the output meets the set expectations.
Input System process

Control
signal Feedback
96

Downloaded by Fredrick Musee ([email protected])


lOMoARcPSD|40487891

Control

x) Interdependence
For a system to be effective and efficient, its components
or subsystems must be coordinated and linked together.

4.2 Information System


Definition of information system
 A set of procedures, whether automated or manual that
comprises people, machines and / or methods to collect,
process, store, and transmit and disseminate
information.
Collect Process store Disseminate

 Is a system that takes information in one form and


transforms it into another.
 A set of persons, procedures and technologies and other
resources that collects, transforms and disseminates
information in the system.
 Data system: System consisting of the network of all
communication channels used within an organization
 Any data processing system, either manual or
computerized; any telecommunications system whose
97

Downloaded by Fredrick Musee ([email protected])


lOMoARcPSD|40487891

primary function is to transmit and/or display data


 A system that provides for data collection, storage and
retrieval; facilitates the transformation of data into
information and the management of both data and
information. An information system comprises
hardware, software (DBMS and applications), the
database(s), people and procedures.
 The subsystem of an organization aimed at collecting,
memorizing, processing and distributing the
information that is necessary to support the ...
 Policies, processes and procedures to establish, manage
and maintain GHG information.
 An organized collection, storage, and presentation
system of data and other knowledge for decision
making, progress reporting, and for planning and
evaluation of programs. It can be either manual or
computerized, or a combination of both.
 Means a system for generating, sending, receiving,
storing or otherwise processing electronic
communications.
 A mechanism used for acquiring, filing, storing and
retrieving an organised body of knowledge.
 A collection of hardware and software components and
interconnections, as well as the information contained

98

Downloaded by Fredrick Musee ([email protected])


lOMoARcPSD|40487891

within them, and to some degree, the facilities that


contain and protect them.
 Means an interconnected set of information resources
under the same direct management control that shares
common functionality. ...
www.bricker.com/legalservices/practice/hcare/hipaa/16
4.304.asp
 This term is used to describe the user organization's
"information system", that is, what services are being
performed by the ...
www.sas70.us.com/what-is/glossary-of-terms.php
 The methods and records established to identify,
assemble, analyse, calculate, classify, record and report
the transactions and other events that affect an entity,
and to maintain accountability for assets, liabilities,
revenues and expenditures.
 Means a discrete set of information technology (IT),
data, and related resources, such as personnel,
hardware, software, and associated IT services
organized for the collection, processing, maintenance,
use, sharing, dissemination, or disposition of
information. (Source: OMB Circular A-11)
 A structured set of processes, people and equipment for
converting data into information.
Purpose of information system
i). To provide the people within an organization with
information to assist in decision making process.
ii). To provide responsive service to meet user needs
99

Downloaded by Fredrick Musee ([email protected])


lOMoARcPSD|40487891

iii). To enable sharing of information


iv). To facilitate interaction and dissemination of data
throughout the various level of organization.
v). To improve the efficiency of operations in an
organization
vi). Cost effective – the system should generate more
money than is spent on installing and running it.
vii). Enable an organization to meet objectives such as
optimum services or optimum use of resources.

Why develop a new information systems?


a) New changes in organization (directives)
Management can introduce new changes and they
have to be implemented to meet the needs of the
organization.
b) Problems in the current system
The undesirable circumstances in the current system
that prevent the organization from meeting its goals.
c) New opportunities
If an opportunity presents itself that can enable the
organizations improve its services.

Online analytical processing is whereby a computer


based information system analyse and generate reports
to be used for supporting decision making process in
an organization.

4.3 Theories of System Development


The most common theories include:
100

Downloaded by Fredrick Musee ([email protected])


lOMoARcPSD|40487891

 Traditional approach
 Rapid application development
(RAD)
 The structured approach

a). Traditional approach


This relies mostly on the skills and
experience of individual staff members
carrying out the project. There is no formal
documented methodology to be followed by
all system developers in the organization. In
this approach, the manual system is replaced
with a computerizedn one without change in
overall structure of the former system.
Hence the weaknesses of the former system
are not addressed they are forwarded to the
new system e.g. in Banking Halls where
each cashier is given a computer and queues
continues to built.

b). Rapid Application Development


(RAD)
What is Rapid Application Development?
101

Downloaded by Fredrick Musee ([email protected])


lOMoARcPSD|40487891

 “Rapid Application Development


(RAD) is a development lifecycle
designed to give much faster
development and higher-quality
results than those achieved with
the traditional lifecycle. It is
designed to take the maximum
advantage of powerful
development software that has
evolved recently.”
 “An approach to building
computer systems which
combines Computer-Assisted
Software Engineering (CASE)
tools and techniques, user-
driven prototyping, and
stringent project delivery time
limits into a potent, tested,
reliable formula for top-notch
quality and productivity. RAD
drastically raises the quality of

102

Downloaded by Fredrick Musee ([email protected])


lOMoARcPSD|40487891

finished systems while reducing


the time it takes to build them.”
 “A methodology that enables
organizations to develop
strategically important systems
faster while reducing
development costs and
maintaining quality. This is
achieved by using a series of
proven application development
techniques, within a well-
defined methodology.”
Rapid Application Development
thus enables quality products to
be developed faster, saving
valuable resources. The
magnitude of such savings is truly
RAD!

RAD model evolved from the theory that


business today heavily rely on Information
Technology (IT). Hence, the manual systems
103

Downloaded by Fredrick Musee ([email protected])


lOMoARcPSD|40487891

are fully computerized. Development and


implementation of information systems
needs to be quick enough for the
organization to maintain a competitive
advantage in the market place.
RAD makes it possible for system
developers to quickly capture user
requirements by designing system
interfaces in the presence of the user by
application of prototyping technique.
prototyping - Is a smaller working model of
a real world system. Other approaches in RAD include
small team with advanced tools (SWAT) and joint
application development (JAD).

Disadvantages of RAD
The working system may have over sights and weaknesses
due to the quick development.

c). Structured Approach


This approach defines a set of stages that should be
followed when developing a system. Each stage is well
documented and specifies the activities to be carried out by
the system analyst and his team while developing a system.

Role of Information System Analyst


104

Downloaded by Fredrick Musee ([email protected])


lOMoARcPSD|40487891

To identify organizations needs and problems then designs


and develops an information system to solve them., the
analyst does this by
- Reviewing the existing system and making
recommendations on how to improve or implements an
alternative system
- Working hand in hand with programmers to construct a
computerized system
- Coordinating training of new system users and owners

Stages of system development


There are seven (7) main stages in system development
which are;
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

This seven stages of system development are also called the


system development lifecycle. Each stage serves a role in
the problem solving process. The information lifecycle is
divided into two major parts namely;
a)The development stages which covers problem
recognition and definition, information gathering,
requirements specification, system design and system
construction (coding) i.e. stages 1 – 5.
105

Downloaded by Fredrick Musee ([email protected])


lOMoARcPSD|40487891

b) The operation and support stage which covers stages


6 – 7 i.e. system review and maintenance.

1). Problem recognition and definition


It is done during the preliminary investigation.
The problem recognition is the initial stage
where the analysts decides if the project is
worth to look into, and if its worth to start it.
In problem definition, the problem must be
thoroughly defined. A thoroughly survey of
the problem is undertaken by identifying the
problem, understanding it, and finding out if
there is a possibility of getting a solution.
Before a new system is designed a special
study is carried out to establish the cost and
benefits of a new system. This study is called
feasibility study. Feasibility study is
evaluation of a system to request to determine
whether its worth (feasible) to proceed with
the project.

Types of feasibility study

Technical feasibility

106

Downloaded by Fredrick Musee ([email protected])


lOMoARcPSD|40487891

It establishes whether the technology available is


sufficient or can be upgraded for the new
system. It also involves determining whether or
not a system can actually be constructed to solve
the problem at hand. A system request is
technically feasible if the organization has the
resources to develop or purchase, install and
operate the system.

Economic feasibility
It establishes whether the projected benefits of
the proposed system outweigh the estimated
costs involved in developing or purchasing,
installing and operating it. I.e. it involves
benefits and costs.
Schedule feasibility
It is concerned with whether the system can be put into use
within the stipulated time.
Legal feasibility e.g. government policies, laws etc
Social feasibility – acceptability of the system by the users
or organization.Add on: What are the Types of
Feasibility Studies?

107

Downloaded by Fredrick Musee ([email protected])


lOMoARcPSD|40487891

There are many different types of feasibility studies;

here is a list of some of the most common:


 Technical Feasibility - does the company have the
technological resources to undertake the project? Are
the processes and procedures conducive to project
success?
 Schedule Feasibility - It is concerned with whether
the system can be put into use within the stipulated
time. Does the company currently have the time
resources to undertake the project? Is the project
completable in the available time?
 Economic Feasibility - It establishes whether the
projected benefits of the proposed system outweigh
the estimated costs involved in developing or
purchasing, installing and operating it. I.e. it involves
benefits and costs. Given the financial resources of
the company, is the project something that can be
completed? The economic feasibility study is more
commonly called the cost/benefit analysis.
 Cultural Feasibility - what will the impact on both
local and general cultures be? What sort of
environmental implications does the feasibility study
have?
 Legal/Ethical Feasibility - what are the legal
implications of the project? What sort of ethical
considerations are there? You need to make sure that
108

Downloaded by Fredrick Musee ([email protected])


lOMoARcPSD|40487891

any project undertaken will meet all legal and ethical


requirements before the project is on the table.
 Resource Feasibility - do you have enough resources,
what resources will be required, what facilities will be
required for the project, etc.
 Operational Feasibility - this measures how well
your company will be able to solve problems and take
advantage of opportunities that are presented during
the course of the project. Establishes the extend to
which, the users are comfortable or happy with the
new proposed or new system. It will result to issues
like reduction in workforce and if so, what will happen
to the affected employees? Will the new system
require training for users? Are there any legal or
ethical issues that need to be considered?
 Marketing Feasibility - will anyone want the product
once its done? What is the target demographic?
Should there be a test run? Is there enough buzz that
can be created for the product?
 Real Estate Feasibility - what kind of land or
property will be required to undertake the project?
What is the market like? What are the zoning laws?
How will the business impact the area?
 Comprehensive Feasibility - this takes a look at the
various aspects involved in the project - marketing,
real estate, cultural, economic, etc. When undertaking
a new business venture, this is the most common type
of feasibility study performed.

109

Downloaded by Fredrick Musee ([email protected])


lOMoARcPSD|40487891

2. Information gathering (fact finding)


The system analysts gathers data about the current
system and the users needs from both internal and
external sources. Methods used to collect data:
-Studying available data (record inspection)
-Record inspection
-Interview
-Questionnaires
-Observation
-Automated methods

a). Record inspection (studying available


documentation
The analyst reads existing paperwork.
The documents describes the current
system and its procedures, so they are
referenced for they have rich source of
information for the analyst. This forms a
good starting point for the analyst to gain
an overall insight of the existing system.

b). Interview

110

Downloaded by Fredrick Musee ([email protected])


lOMoARcPSD|40487891

Interviewing is the process of obtaining


information by means of conversation
between the analyst as the interviewer
and the affected personnel as the as
interviewee. The questions are geared to
getting the information needed by the
analysts.(It is done face to face)
The two types of interviews are
structured and unstructured
Guidelines to adhere to when executing an
interview
- interviewee must be informed in good time
and the topic of discussion communicated
- avoid personal biases in your questions and
perspectives
- be careful about body language and
proxemics (proxemics – things like sitting
arrangement, body closeness and how people
react when their private distance is violated).

Advantages of interview
- The analyst gets first hand information
111

Downloaded by Fredrick Musee ([email protected])


lOMoARcPSD|40487891

- Make interviewee as part of the system


- Give adequate opportunity for interviewee
to put forward opinions
- Makes individuals to open up and bring up
ideas that may not have been thought of in a
questionnaire
- Enable the analyst to verify facts

Disadvantages of interviews
- Some interviewees give answers which are
not actually proven facts but opinions.
- The interviewee may not fully open on some
issues that may be personal / sensitive.
- Interviewee may be suspicious of the
intentions of the proposed system for fear of
being displaced by new system.

Questionnaires
A questionnaire is a document containing a
number of standard questions set to collect
information and opinions from the people who
receive and respond to it.

When to use questionnaire


112

Downloaded by Fredrick Musee ([email protected])


lOMoARcPSD|40487891

Questionnaires may be the most practicable


method of fact finding where:
- Verification of data found by other means is
required
- 100% coverage is not essential
- A large number of people are required to
furnish the data
- The people you need to gather information
from are located over a widely spread
geographical area
- There is a large number of people involved in
the system project.

Basic sections of a questionnaire


Are three;
1. heading section – describes the purpose of the
questionnaire and contains the main references
e.g. name, date, etc
2. classified section – contains data to be used for
analyzing and summarizing the total data e.g.
age, sex, job title, etc.
3. data section – contains the data being sought.

Advantages of questionnaires
- answers are filled in less tense environment

113

Downloaded by Fredrick Musee ([email protected])


lOMoARcPSD|40487891

- more sincere responses are possible because they


are filled and returned in privacy
- many people are provided with opportunity to
provide input and suggestion.
- Saves time especially where the respondents are
geographically scattered.

Disadvantages
- it’s slow
- designing questionnaires requires expertise
- if a questionnaire is misunderstood, ambiguous
replies are received
- it requires a lot of time to analyse the
questionnaires

d). Observation
it involves watching an operation closely and
participating for a period of time to see for oneself
what exactly happens about the system.
Advantages
- the analyst gets the first hand information about
the problems and exposes him/her to the system
requirements.
- Concepts that are too difficult for non-technical
staff to explain can be observed
114

Downloaded by Fredrick Musee ([email protected])


lOMoARcPSD|40487891

- It helps the analyst become acquinted with


operational personnel.
- It helps the analysts acquire knowhow needed to
assist in changes that have been recommended.
- Can correct ‘hazy’ understanding or erroneous
impressions.

Disadvantages
- costly and time consuming
- person being observed might alter behaviour
leading to wrong requirements being observed
- staff members are not comfortable when they are
being watched

e). Automated methods


Involves collecting data using devices that
automatically capture data from source. For
example video, cameras, tape recorders etc. this
method is only opted for when actual data is
required but difficult to get through interviews,
questionnaires or observation.

f). User workshops

115

Downloaded by Fredrick Musee ([email protected])


lOMoARcPSD|40487891

This method gets users to participate in the


analysis whereby attendees representing various
departments who have interest in the proposed
system.

3). Requirements specification


After gathering data on the current system, the
analyst must analyse the facts to identify problems
including their causes and effects and opportunities
for improvement. The system analyst must then come
up with the detailed requirements for the new system.

The areas that would be considered in requirements


specifications are;
i). Output specifications
ii). Input specification
iii). File / data stores
iv). Hardware and software requirements.

Output specifications
The main interest from a system is information
(output) which is given the first consideration. You
116

Downloaded by Fredrick Musee ([email protected])


lOMoARcPSD|40487891

have to determine what you want the system to


produce (output).
The output specifications entails activities like
generation of reports used to facilitate decision
making. The quality of system output will depend on
how well the management and user requirements
were identified and should easily be understoond.
The output can be in form of reports either hardcopy
or softcopy

Factors to consider when designing an output


- The target audience e.g. top management or users
- The frequency of report generation e.g daily,
weekly, monthly or annually. Others may be
required in an ad hoc manner i.e at random.
- Quality and format

Input specification
The inputs are required to produce the output. The
contents of the input are used to maintain the
master files.

Factors to consider in input specification


(Design)
-The content and volume of input
-The mode and devices of input selected
-Layout and sequence of input
117

Downloaded by Fredrick Musee ([email protected])


lOMoARcPSD|40487891

-Reduction of input errors

File / Data stores


Involves defining the files and data bases in the
information system e.g. how files will be organized,
storage devices to be used, and the volume of
database activity. The system analyst should
identify the number of files that will be needed by
the system and determine the structure of each file.
Attributes of the records in a file should also be
identified.
An attribute is a unique characteristic of a record
for which a data value can be stored in the database.
E.g. in student record, one attribute is name and the
other is student registration number.

Factors to consider when designing a


file.
- The key attribute or field attribute unique for
each record
- The type of data – data type for each field
- The length of each data field (field length)
- Backup and recovery strategies (institute
automatic information and storing it
elsewhere incase the system fails, or gets
corrupted or crashes the backed up data can
118

Downloaded by Fredrick Musee ([email protected])


lOMoARcPSD|40487891

be used to recover or reconstruct the original


file.)
- System controls (prevent unauthorized users
from accessing the system and looking at
information that they should not have access
to. By physically restricting access to the
computer systems, user groups, password etc.
and also using audit trails.
-

IV). Hardware and software requirements


Hardware & software to support the new
system should be specified.

Factors to consider in hardware & software


specifications
- economic factors e.g. cost / price
- operational factors e.g. reliability,
upgradeability, compatibility
- user friendliness
- acquisition method (software
alternatives) i.e.

119

Downloaded by Fredrick Musee ([email protected])


lOMoARcPSD|40487891

a) in-house developed: software developed


by the company’s own information
system department.
b)Off – the shelf – software purchased
and/or leased from a software developer.
Software developers are companies that
specialize in developing software
applications for sale.
c) Customization – an existing software
package that meets a large proportion of
the requirements can be customized to
meet all the specifications. This is opted
if no commercially available software
package satifies the user requirements
and the organization is not in a position
to develop in-house.
d)Outsourcing – use of an outside
company to handle the information
system functions of the organization on
their own like Ms – Office.
e) Enterprise computing – a client server
architecture that supports group,
120

Downloaded by Fredrick Musee ([email protected])


lOMoARcPSD|40487891

departmet and total company information


needs.

4). System design


The several tools for designing an
information system are;
Flowcharts
Data flow diagrams
Entity relationship models
Structured charts

A system flowchart is a tool for analyzing


processes. A system flowchart allows the
breakdown of processes. A system into
individual events of activities and displays
these in shorthand form showing the
sequential or logical relationships between
them.
The difference between a system flowchart
and a program flowchart is that system
flowchart is for the entire system while a
program flowchart is for a part or a module
in the system. Therefore several program
121

Downloaded by Fredrick Musee ([email protected])


lOMoARcPSD|40487891

flowcharts may be derived from a single


system flowchart. Algorithm design tools
like pseudocodes and program flowcharts
can be used to extract the processing logic
for each module after drawing the system
flowchart before system construction.
Common flowchart symbols (get from
internet)

Guidelines for designing a system


flowchart
1. Start by writing the title of the
flowchart.
2. Start drawing the flowchart with the
trigger event
3. Note down the successive actions
taken in their logical order until the
event or process is concluded. Use few
words to describe the actions.
4. When there are many alternatives at
the decision stage follow the most
important and continue with it. Less
important alternatives can be drawn
122

Downloaded by Fredrick Musee ([email protected])


lOMoARcPSD|40487891

elsewhere and reference made to them


by using on / or off page connectors.

5). System construction


Refers to coding, installation and testing of
the modules and their components such as
outputs, inputs and files. The purpose of
construction phase is to develop and test a
functional system that fulfils the business
and design requirements. During system
construction analysts determine the overall
design strategy and work with programmers
to complete the design, coding, testing and
documentation of all programs, modules and
macros.

6). System testing and implementation


a). Testing the system
Final testing of the entire system is done to
make sure that it works as per the
requirements specification and design
specification to ascertain it meets all
requirements specified. It involves both
123

Downloaded by Fredrick Musee ([email protected])


lOMoARcPSD|40487891

users and the developers. Its vital to draw a


test strategy to identify the fields to use, the
test data to be used in testing and the
expected results. The system is tested by
entering some test data to find out whether
its output are as expected.

Types of test data


i). Standard data: is the data that you expect
in normal working
ii). Extreme data - this is data that is on the
limits or extremes of a range e.g. in
percentage scores in a test the limits will
be 0 and 100.
iii). Abnormal data – data which is not of the
correct type.

b). system implementation


refers to the process of delivering the new
system to the users to start using it in their
day to day operation. Implementation covers
the following areas:
124

Downloaded by Fredrick Musee ([email protected])


lOMoARcPSD|40487891

- installation of hardware, alteration of


building, wiring and rewiring.
- Converting any existing data to work
with the new system
- Introduction of new measures
- Training of staff which can be on site or
off site e.g. going to college
- System changeover

System changeover
The process of putting the new information
system online and retiring the old system
(move from the old system and start using
the new).
There are four changeover methods which
are:

 Direct cutover: The direct cutover


approach causes the changeover from
the old system to the new system to
occur immediately when the new system
becomes operational. It is the least
125

Downloaded by Fredrick Musee ([email protected])


lOMoARcPSD|40487891

expensive but involves more risks than


other changeover methods.
 Parallel operation: The parallel
operation changeover method requires
that both the old and the new
information systems operate fully for a
specified period. Data is input to both
systems and output generated by the new
system is compared with the equivalent
output from the old system. When users,
management, and IT group are satisfied
that the new system operates correctly
then the old system is terminated. It is
the most costly changeover method and
involves lower risks.
 Pilot operation: The pilot
changeover method involves
implementing the complete new system
at a selected location of a company.
Direct cutover method and operating
both systems for only the pilot site. The
group that uses the new system first is
called the pilot site. By restricting the
126

Downloaded by Fredrick Musee ([email protected])


lOMoARcPSD|40487891

implementation to a pilot site reduces the


risk of system failure as compared with
is less expensive than a parallel system.
 Phased operation: The phased
operation changeover method involves
implementing the new system in stages,
or modules. We can implement each
subsystem by using any of the other
three changeover methods. In this
approach risk of errors or failures is
limited to the implemented module only
as well as it is less expensive than the
full parallel operation.

Examples of changeover strategies


i. Straight / direct changeover
- The old system is abandoned {stopped
and discarded} and the new one is
implemented immediately.
- Its encouraged only when new and old
system are totally different or where there
are no extra staff to help in running two
127

Downloaded by Fredrick Musee ([email protected])


lOMoARcPSD|40487891

systems at the same time. Its very


dangerous changeover method because
you have nothing to fall back to incase
the new system fails. The advantage is
that its quite fast and cheap to implement.

ii. Parallel changeover


- Here the old and new systems are run
side by side until it is certain that the new
one is working properly, then the old
system is phased out. This is the most
recommended system for critical systems.

Advantages
- If there are any errors in the new system,
you can make changes as you use the old
system
- Personnel become familiar with the new
system prior to actual changeover
- Has lower risks to business operation
- There is thorough testing of the new
system
Disadvantages
128

Downloaded by Fredrick Musee ([email protected])


lOMoARcPSD|40487891

- Costly to run and coordinate two systems


- Cross checking is difficult
- Requires more staff hence more training
required for additional staff.

iii. Phased changeover (method)


The new system is introduced in stages or
phases, and gradually replaces the old
system completely. It is ideal for a big
system that can easily be divided into
modules e.g. the education system changing
from old to new curriculum each year at
least one class level changes over to the new
syllabus. Another example is a school
management system, whereby
computerization can start with student
details, followed by parents database, then
the inventory system, school fees recording
etc.

Advantages
- Allow the system to be implemented
quickly
129

Downloaded by Fredrick Musee ([email protected])


lOMoARcPSD|40487891

- Less costly
- Failures of the system are limited
- Causes minimal disruption
- Avoids traumatic effect of trying to
implement all the components at once.

Disadvantages
Problems on ensuring that the first phase is
implemented and converted.

iv. Pilot running / implementation /


changeover
Here part of the business switches over to
the new system while it is being tested. If it
works properly then other departments can
also change to the new system. It can be
implemented in a company with many
dispersed locations.

7. System maintenance and review


System maintenance refers to the adjustment
and enhancement or correction of errors
after the system has been implemented.
130

Downloaded by Fredrick Musee ([email protected])


lOMoARcPSD|40487891

Errors may be detected when the system is


in use.
System review – is the formal process of
going through the specification and testing
the system after implementation to find out
whether it still meets the original
specification. It is wise to clearly tabulate
objectives that were set for the system and
how well each one of them has been
achieved.

Types of maintenance
Some of the main types of System
Maintenance are:

Adaptive Maintenance: where


improvements to the system are necessary to
adapt to changing working procedures or
legislation.

Corrective Maintenance: where ongoing


improvements are made (bug fixing) to
ensure the system still meets the original
131

Downloaded by Fredrick Musee ([email protected])


lOMoARcPSD|40487891

user requirements.

Perfective Maintenance: improving the


system so that it becomes more refined and
more efficient at processing.

Predictive Maintenance: strategic changes


made in anticipation of likely changes to
technology or working practices in the
future.
i. Perfective maintenance
This where improvements are made to the
system so that it is easier to use and
possibly other facilities are added to it.
ii. Adaptive maintenance
Changes are made owing to the expansion
of the business or changes in legislation e.g.
tax rates.

iii. Corrective maintenance


Changes are made in case of any errors that
might arise. Whenever a new system is
132

Downloaded by Fredrick Musee ([email protected])


lOMoARcPSD|40487891

developed, there are always bugs that come


up as the system is being used.

Purpose / importance of system


maintenance
- improving system efficiency
- adapting the system to its environment
- correcting errors

System documentation
System documentation is a written graphical
record of the steps taken during the system
development lifecycle. Any maintenance
work must be documented in order to update
the existing documentation.

System documentation includes;


- Report of fact finding which outlines
methods used to collect data, weakness of
the current system and recommendation
of the current system.
- Requirements specifications which
entails the output requirements, input,
133

Downloaded by Fredrick Musee ([email protected])


lOMoARcPSD|40487891

hardware and software required for the


new system
- System flowchart which shows the
overall functionality of the proposed
information system.
- Tables or file structures depending on the
approach used in system construction.
- Sample test data to test whether the new
computerized system is working as
expected.
- User manuals
A user manual is an instruction
booklet which helps the user work
with the new system with minimal
guidance. It gives instruction on
how to load and run a program. It
can also refer to a user manual for an
end user to enable him/her learn how
to use a program
Other related documentations are ;
Reference guide: is a documentation used
by one who already knows how to use a
program but needs help to understand or to
134

Downloaded by Fredrick Musee ([email protected])


lOMoARcPSD|40487891

be reminded about a particular point or


obtain a particular or obtain more detailed
information about a particular feature.
Quick reference guide: simple sheets or
cards small enough to fit into a pocket which
the user may keep ready for help with
common tasks carried out with the program.

Contents of a user manual


- Software installation procedures
- Details for starting the program
- Details for setting security password
- Details of tapes/disks required
- Clerical procedures
- Data preparation
- How to enter data (which fields, codes
used, how to enter dates)
- Details and samples of reports which may
be printed
- Backup procedures to be followed
- Recovery procedures in the event of
hardware failure
- How to load software
135

Downloaded by Fredrick Musee ([email protected])


lOMoARcPSD|40487891

- How to run software


- How to save a file, screen layouts print
formats, how to search, how to sort, how
to print.
- Hardware requirements, software
requirements, sample runs (if only not
discussed in technical documentation)
- Trouble shooting guide

A user guide or user's guide, also


commonly known as a manual, is a
technical communication document intended
to give assistance to people using a
particular system.[1] It is usually written by a
technical writer, although user guides are
written by programmers, product or project
managers, or other technical staff,
particularly in smaller companies.
User guides are most commonly associated
with electronic goods, computer hardware
and software.
136

Downloaded by Fredrick Musee ([email protected])


lOMoARcPSD|40487891

Most user guides contain both a written


guide and the associated images. In the case
of computer applications, it is usual to
include screenshots of how the program
should look, and hardware manuals often
include clear, simplified diagrams. The
language used is matched to the intended
audience, with jargon kept to a minimum or
explained thoroughly.
Technical communication is the process of
conveying technical information through
writing, speech, and other media to a
specific audience. Information is usable if
the intended audience can perform an action
or make a decision based on it (Johnson-
Sheehan 7). Technical communicators often
work collaboratively to create products
(deliverables) for various media, including
paper, video, and the Internet. Deliverables
include online help, user manuals, technical
manuals, White papers, specifications,
process and procedure manuals, industrial
137

Downloaded by Fredrick Musee ([email protected])


lOMoARcPSD|40487891

videos,reference cards, data sheets, journal


articles, patents, training, business papers
and technical reports.
Technical domains can be of any kind,
including the soft and hard sciences, high
technology including computers and
software, consumer electronics, and business
processes and practices.
Technical communication jobs include the
following:
 Technical writer
 Technical editor
 Technical illustrator
 Information architect
 Usability expert
 User interface designer
 User experience designer
 Technical trainer
 Technical translator
 API_Writer

138

Downloaded by Fredrick Musee ([email protected])


lOMoARcPSD|40487891

User Manuals
These are the easiest to read and use,
and are designed for the non-technical
reader who wants to start with "how to
switch it on" and use it. It may even
show where the “On” switch is. (Don’t
laugh – people ask!)
When designed for software packages,
these guides are designed to provide
the user all the information they need to
use the software to perform a range of
tasks. A well designed user guide can:
 reduce support calls
 help new staff perform daily tasks
 help experienced staff perform
infrequent tasks
 standardise work practises.

139

Downloaded by Fredrick Musee ([email protected])


lOMoARcPSD|40487891

Contents of a user manual


The sections of a user manual often include:
 A cover page
 A title page and copyright page
 A preface, containing details of related
documents and information on how to
navigate the user guide
 A contents page
 A guide on how to use at least the main
functions of the system
 A troubleshooting section detailing
possible errors or problems that may
occur, along with how to fix them
 A FAQ (Frequently Asked Questions)
 Where to find further help, and contact
details
 A glossary (A glossary is an alphabetical
list of terms in a particular domain of
knowledge with the definitions for those
terms) and , for larger documents, an
index (an index is a list of words or
140

Downloaded by Fredrick Musee ([email protected])


lOMoARcPSD|40487891

phrases ('headings') and associated


pointers ('locators') to where useful
material relating to that heading can be
found in a document.)
Technical terminology is the specialized
vocabulary of any field, not just technical
fields.

141

Downloaded by Fredrick Musee ([email protected])

You might also like