0% found this document useful (0 votes)
5 views171 pages

Computer Science 2020

This document provides an introduction to computers, detailing their functions, characteristics, limitations, and components including hardware and software. It explains various input and output devices, such as keyboards, mice, and printers, along with their advantages and disadvantages. Additionally, it covers storage devices and types of computer memory, emphasizing the importance of each component in the overall functioning of a computer system.

Uploaded by

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

Computer Science 2020

This document provides an introduction to computers, detailing their functions, characteristics, limitations, and components including hardware and software. It explains various input and output devices, such as keyboards, mice, and printers, along with their advantages and disadvantages. Additionally, it covers storage devices and types of computer memory, emphasizing the importance of each component in the overall functioning of a computer system.

Uploaded by

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

CHAPTER 1

INTRODUCTION TO COMPUTERS

INTRODUCTION TO COMPUTERS
 A COMPUTER is an electronic machine that can accept data through input devices
and can process the given data through CPU and can display the result through one of
the output devices.
 Computer performs both simple and complex operations, with speed and accuracy. All
computers regardless of their size, capacity, speed and cost perform 4 basic functions
which are as follows:
 Acceptance of data
 Processing of data
 Giving out processed data
 Storing data

Characteristics of Computer
 Speed The computer can process data very fast, at the rate of millions of instructions
per second.
 Accuracy Computer provides a high degree of accuracy.
 Diligence when used for a longer period of time, the computer does not get tired or
fatigued.
 Storage Capability Large volumes of data and information can be stored in the computer
and also retrieved whenever required.
 Versatility Computer is versatile / multipurpose in nature. It can perform different types
of tasks with the same ease.

Limitations of computers
 Computer can only perform tasks that it has been programmed to do.
 Computer cannot do any work without instructions from the user.
 It executes instructions as specified by the user and does not take its own decisions.

HARDWARE
 A computer system is made up of hardware and software.
o Hardware: Physical components of a computer (something you can touch)
o Software: Programs that run on the computer (you can't hold them in your hand)
o Systems software: Set of programs needed to control the hardware(Operating System)
o Applications software: Programs that allows the user to carry out a task or produce
something.

Peripheral devices consist of input and output devices.


 A peripheral is a device attached to a host computer (CPU) but not part of it, and is
more or less dependent on the host.

1
 It expands the host's capabilities, but does not form part of the core computer
architecture.

COMPUTER - INPUT DEVICES


 Are devices that are used to introduce data into the computer system
 Input devices send data and instructions into the computer for processing.
Following are few of the important input devices, which are used in Computer Systems:
 Keyboard
 Mouse
 Joystick
 Light pen
 Track Ball
 Scanner
 Graphic Tablet
 Microphone
 Magnetic Ink Card Reader (MICR)
 Optical Character Reader (OCR)
 Bar Code Reader
 Optical Mark Reader

Keyboard
 The keyboard helps in inputting the data to the computer. The layout of the keyboard is
like that of traditional typewriter.
 Keyboards are of two sizes 84 keys or 101/102 keys, but now 104 keys or 108 keys
keyboard is also available for Windows and Internet.
The keys are following
Keys Description
Typing Keys These keys include the letter keys (A-Z) and digits keys (0-9) which
generally give same layout as that of typewriters.
Numeric It is used to enter numeric data or cursor movement. Generally, it
Keypad consists of a set of 17 keys that are laid out in the same configuration
used by most adding machine and calculators.
Function Keys The twelve functions keys are present on the keyboard. These are
arranged in a row along the top of the keyboard. Each function key has
unique meaning and is used for some specific purpose.
Control keys These keys provide cursor and screen control. It includes four
directional arrow key. Control keys also include Home, End, Insert,
Delete, Page Up, Page Down, Control(Ctrl), Alternate(Alt), Escape(Esc).
Special Purpose Keyboard also contains some special purpose keys such as Enter, Shift,
Keys Caps Lock, Num Lock, Space bar, Tab, and Print Screen.

Mouse
 Mouse is most popular Pointing device. It is a very famous cursor-control device. It is a
small palm size box with a round ball at its base which senses the movement of mouse
and sends corresponding signals to CPU on pressing the buttons.
2
 Generally, it has two buttons called left and right button and scroll bar is present at the
mid. Mouse can be used to control the position of cursor on screen, but it cannot be
used to enter text into the computer.

Advantages
 Easy to use
 Not very expensive
 Moves the cursor faster than the arrow keys of keyboard.

Joystick
 Joystick is also a pointing device, which is used to move cursor position on a monitor
screen. It is a stick having a spherical ball at its both lower and upper ends. The lower
spherical ball moves in a socket. The joystick can be moved in all four directions.
 The function of joystick is similar to that of a mouse. It is mainly used in Computer
Aided Designing (CAD) and playing computer games.

Light Pen
 Light pen is a pointing device, which is similar to a pen. It is used to select a displayed
menu item or draw pictures on the monitor screen. It consists of a photocell and an
optical system placed in a small tube.
 When light pen's tip is moved over the monitor screen and pen button is pressed, its
photocell sensing element, detects the screen location and sends the corresponding
signal to the CPU.

Track Ball
 Track ball is an input device that is mostly used in notebook or laptop computer,
instead of a mouse. This is a ball, which is half inserted and by moving fingers on ball,
pointer can be moved.
 Since the whole device is not moved, a track ball requires less space than a mouse. A
track ball comes in various shapes like a ball, a button and a square.

3
Scanner
 Scanner is an input device, which works more like a photocopy machine. It is used when
some information is available on a paper and it is to be transferred to the hard disc of
the computer for further manipulation.
 Scanner captures images from the source which are then converted into the digital form
that can be stored on the disc. These images can be edited before they are printed.

Digitizer
 Digitizer is an input device, which converts analog information into a digital form.
Digitizer can convert a signal from the television camera into a series of numbers that
could be stored in a computer. They can be used by the computer to create a picture of
whatever the camera had been pointed at.
 Digitizer is also known as Tablet or Graphics Tablet because it converts graphics and
pictorial data into binary inputs. A graphic tablet as digitizer is used for doing fine
works of drawing and images manipulation applications.

Microphone
 Microphone is an input device to input sound that is then stored in digital form. The
microphone is used for various applications like adding sound to a multimedia
presentation or for mixing music.

Magnetic Ink Card Reader (MICR)


 MICR input device is generally used in banks because of a large number of cheques to
be processed everyday. The bank's code number and cheque number are printed on the
cheques with a special type of ink that contains particles of magnetic material that are
machine readable.
 This reading process is called Magnetic Ink Character Recognition (MICR). The main
advantage of MICR is that it is fast and less error prone.

4
Optical Character Reader (OCR)
 OCR is an input device used to read a printed text. OCR scans text optically character by
character, converts them into a machine readable code and stores the text on the
system memory.

Bar Code Readers


 Bar Code Reader is a device used for reading bar coded data (data in form of light and
dark lines). Bar coded data is generally used in labelling goods, numbering the books,
etc. It may be a hand-held scanner or may be embedded in a stationary scanner.
 Bar Code Reader scans a bar code image, converts it into an alphanumeric value, which
is then fed to the computer to which bar code reader is connected.

Optical Mark Reader (OMR)


 OMR is a special type of optical scanner used to recognize the type of mark made by pen
or pencil. It is used where one out of a few alternatives is to be selected and marked. It
is specially used for checking the answer sheets of examinations having multiple choice
questions.

OUTPUT DEVICES
 They output work, which has been done by the computer in a form readable to users.
 Output devices provide output to the user, which is generated after processing the input
data.
 Following are few of the important output devices, which are used in Computer
Systems:
 Monitors
 Graphic Plotter
 Printer
Monitors
 Monitor commonly called as Visual Display Unit (VDU) is the main output device of a
computer. It forms images from tiny dots, called pixels, that are arranged in a
rectangular form. The sharpness of the image depends upon the number of the pixels.
 There are two kinds of viewing screen used for monitors:
 Cathode-Ray Tube (CRT)

5
 Flat-Panel Display

Cathode-Ray Tube (CRT) Monitor


In the CRT, display is made up of small picture elements called pixels for short. The smaller
the pixels, the better the image clarity or resolution. It takes more than one illuminated
pixel to form whole character, such as the letter 'e' in the word help.
There are some disadvantages of CRT:
 Large in Size
 High power consumption

Flat-Panel Display Monitor


The flat-panel display refers to a class of video devices that have reduced volume, weight
and power requirement compared to the CRT. You can hang them on walls or wear them on
your wrists. Current uses for flat-panel displays include calculators, video games, monitors,
laptop computer, graphics display.
The flat-panel display is divided into two categories:
 Emissive Displays - The emissive displays are devices that convert electrical
energy into light. Examples are plasma panel and LED (Light-Emitting Diodes).
 Non-Emissive Displays - The Non-emissive displays use optical effects to convert
sunlight or light from some other source into graphics patterns. Example is LCD
(Liquid-Crystal Device)

Plotters
Plotters are used to produce high quality line drawings.Most plotters are vector plotters.
They move a pen using point to point data.
Color vector plotters have a rack with several pens.

Advantages:
 Can handle large paper sizes
 Ink pens are relatively inexpensive

Disadvantages
 Detailed diagrams can be slow to print
 The line thickness may be too great for some applications

Printers
 Printer is the most important output device, which is used to print information on
paper.
 There are two types of printers:
 Impact Printers
 Non-Impact Printers

Impact Printers
The printers that print the characters by striking against the ribbon and onto the paper, are
called impact printers.

6
Characteristics of Impact Printers are the following:
 Very low consumable costs
 Impact printers are very noisy
 Useful for bulk printing due to low cost
 There is physical contact with the paper to produce an image
These printers are of two types:
 Character printers
 Line printers

Character Printers:
Character Printers are printers, which print one character at a time.
These are of further two types:
 Dot Matrix Printer (DMP)
 Daisy Wheel

Dot Matrix Printer


In the market, one of the most popular printer is Dot Matrix Printer because of their ease of
printing features and economical price. Each character printed is in form of pattern of Dot's
and head consists of a Matrix of Pins of size (5*7, 7*9, 9*7 or 9*9) which comes out to form
a character that is why it is called Dot Matrix Printer.
Advantages
 Inexpensive
 Widely Used
 Other language characters can be printed
Disadvantages
 Slow Speed
 Poor Quality

Daisy Wheel
Head is lying on a wheel and Pins corresponding to characters are like petals of Daisy
(flower name) that is why it is called Daisy Wheel Printer. These printers are generally
used for word-processing in offices which require a few letters to be send here and there
with very nice quality representation.
Advantages
 More reliable than DMP's
 Better quality
 The fonts of character can be easily changed.
Disadvantages
 Slower than DMP's
 Noisy
 More expensive than DMP's

7
Line Printers
Line printers are printers, which print one line at a time.

These are of further two types:


 Drum Printer
 Chain Printer

Drum Printer
This printer is like a drum in shape so it called drum printer. The surface of drum is divided
into number of tracks. Total tracks are equal to size of paper, i.e., for a paper width of 132
characters, Drum will have 132 tracks. A character set is embossed on track. The different
character sets available in market are 48 character set, 64 and 96 characters set. One
rotation of drum prints one line. Drum Printers are fast in speed and prints between 300 to
2000 lines per minute.
Advantages
 Very high speed
Disadvantages
 Very expensive
 Characters fonts cannot be changed

Chain Printer
In this printer, chain of character sets is used so it is called Chain Printers. A standard
character set may have 48, 64, 96 characters.
Advantages
 Character fonts can easily be changed.
 Different languages can be used with the same printer.
Disadvantages
 Noisy
 Do not have the ability to print any shape of characters.

Non-impact Printers
The printers that print the characters without striking against the ribbon and onto the
paper are called Non-impact Printers. These printers print a complete page at a time, also
called as Page Printers.
8
These printers are of two types:
 Laser Printers
 Inkjet Printers
Characteristics of Non-impact Printers:
 Faster than impact printers.
 They are not noisy.
 High quality.
 Support many fonts and different character size.

Laser Printers
 These are non-impact page printers.
 Laser printers fuse powdered ink/toner onto the paper by heat and pressure.

Advantages
 Very high speed.
 Very high quality output.
 Gives good graphics quality.
 Supports many fonts and different character sizes.
Disadvantages
 Running costs are higher than those of impacts printers
 Cannot be used to produce multiple copies of a document in a single printing.

Inkjet Printers
 Inkjet printers are non-impact character printers based on a relatively new technology.
 Ink jet printers work bydirecting a fine jet of ink at the paper.

Advantages:
 Low set up cost
 Quiet
 High quality printing
 More reliable
 Full colour capacity

Disadvantages:
 Slow print speed
 Printing consumables can be expensive
 Large areas of colour can warp the paper

9
Storage Devices
CD-ROM
Advantages:
 Good storage capacity
 Modest transfer rate
 Fairly robust

Disadvantages:
 Only the manufacturer can store data
 Relatively large for the portable market

CD-R (WORM)
Allows data to be written once to the CD.

Advantages:
 Inexpensive method for data storage
 Can be read by CD-ROM drives
 Excellent for archiving

Disadvantages:
 Cannot be reused (although in some cases this may be an advantage)
 Capacity too small for entire HD backup

CD-RW
Can write data out several thousand times.

Advantages:
 Could be a replacement for a floppy disk

Disadvantages:
 Cannot be read by some older CD-ROM drives

DVD-ROM
Stores more using two layers on each side.

Advantages:
 Increased storage capacity
 Marginally faster data transfer than CD-ROM drives

Disadvantages:
 Cost of manufacture is higher (currently)

10
COMPUTER MEMORY
 A memory is just like a human brain. It is used to store data and instructions. Computer
memory is the storage space in computer where data is to be processed and
instructions required for processing are stored.
 The memory is divided into large number of small parts. Each part is called cell. Each
location or cell has a unique address, which varies from zero to memory size minus one.
 For example, if computer has 64k words, then this memory unit has 64 * 1024=65536
memory location. The address of these locations varies from 0 to 65535.
Memory is primarily of three types:
 Cache Memory
 Primary Memory/Main Memory
 Secondary Memory

Cache Memory
 Cache memory is a very high speed semiconductor memory, which can speed up CPU. It
acts as a buffer between the CPU and main memory.
 It is used to hold those parts of data and program which are most frequently used by
CPU. The parts of data and programs are transferred from disk to cache memory by
operating system, from where CPU can access them.
Advantage
 Cache memory is faster than main memory.
 It consumes less access time as compared to main memory.
 It stores the program that can be executed within a short period of time.
 It stores data for temporary use.
Disadvantage:
 Cache memory has limited capacity.
 It is very expensive.

Primary Memory (Main Memory)


 Primary memory holds only those data and instructions on which computer is currently
working. It has limited capacity and data gets lost when power is switched off.
 It is generally made up of semiconductor device. These memories are not as fast as
registers. The data and instructions required to be processed earlier reside in main
memory. It is divided into two subcategories RAM and ROM.
Characteristic of Main Memory
 These are semiconductor memories.
 It is known as main memory.
 Usually volatile memory.

11
 Data is lost in case power is switched off.
 It is working memory of the computer.
 Faster than secondary memories.
 A computer cannot run without primary memory.

Secondary Memory
 This type of memory is also known as external memory or non-volatile. It is slower than
main memory. These are used for storing Data/Information permanently.
 CPU does not directly access these memories; instead they are accessed via input-
output routines. Contents of secondary memories are first transferred to main memory
and then CPU can access it. For example, disk, CD-ROM, DVD, etc.
Characteristics of Secondary Memory
 These are magnetic and optical memories.
 It is known as backup memory.
 It is non-volatile memory.
 Data is permanently stored even if power is switched off.
 It is used for storage of the data in the computer.
 Computer may run without secondary memory.
 Slower than primary memories.

RAM
A RAM constitutes the internal memory of the CPU for storing data, program and program
result. It is read/write memory. It is called random access memory (RAM).
Since access time in RAM is independent of the address to the word that is, each storage
location inside the memory is as easy to reach as other location & takes the same amount of
time. We can reach into the memory at random & extremely fast but can also be quite
expensive.
RAM is volatile, i.e., data stored in it is lost when we switch off the computer or if there is a
power failure. Hence, a backup uninterruptible power system (UPS) is often used with
computers. RAM is small, both in terms of its physical size and in the amount of data it can
hold.
RAM is of two types:
 Static RAM (SRAM)
 Dynamic RAM (DRAM)

Static RAM (SRAM)


The word static indicates that the memory retains its contents as long as power remains
applied. However, data is lost when the power gets down due to volatile nature. SRAM
12
chips use a matrix of 6-transistors and no capacitors. Transistors do not require power to
prevent leakage, so SRAM need not have to be refreshed on a regular basis.
Because of the extra space in the matrix, SRAM uses more chips than DRAM for the same
amount of storage space, thus making the manufacturing costs higher.
Static RAM is used as cache memory needs to be very fast and small.
Characteristics of the Static RAM:
 It has long data lifetime
 There is no need to refresh
 Faster
 Used as cache memory
 Large size
 Expensive
 High power consumption

Dynamic RAM (DRAM)


DRAM, unlike SRAM, must be continually refreshed in order for it to maintain the data.
This is done by placing the memory on a refresh circuit that rewrites the data several
hundred times per second. DRAM is used for most system memory because it is cheap and
small. All DRAMs are made up of memory cells. These cells are composed of one capacitor
and one transistor.
Characteristics of the Dynamic RAM:
 It has short data lifetime
 Need to refresh continuously
 Slower as compared to SRAM
 Used as RAM
 Lesser in size
 Less expensive
 Less power consumption

ROM stands for Read Only Memory. The memory from which we can only read but cannot
write on it. This type of memory is non-volatile. The information is stored permanently in
such memories during manufacture.
A ROM stores such instructions as are required to start computer when electricity is first
turned on, this operation is referred to as bootstrap. ROM chip are not only used in the
computer but also in other electronic items like washing machine and microwave oven.

Following are the various types of ROM:

13
MROM (Masked ROM)
The very first ROMs were hard-wired devices that contained a pre-programmed set of data
or instructions. These kinds of ROMs are known as masked ROMs. It is inexpensive ROM.
PROM (Programmable Read only Memory)
PROM is read-only memory that can be modified only once by a user. The user buys a blank
PROM and enters the desired contents using a PROM programmer. Inside the PROM chip,
there are small fuses, which are burnt open during programming. It can be programmed
only once and is not erasable.
EPROM (Erasable and Programmable Read Only Memory)
The EPROM can be erased by exposing it to ultra-violet light for a duration of up to 40
minutes. Usually, an EPROM eraser achieves this function. During programming, an
electrical charge is trapped in an insulated gate region. The charge is retained for more
than ten years because the charge has no leakage path. For erasing this charge, ultra-violet
light is passed through a quartz crystal window (lid). This exposure to ultra-violet light
dissipates the charge. During normal use the quartz lid is sealed with a sticker.
EEPROM (Electrically Erasable and Programmable Read Only Memory)
The EEPROM is programmed and erased electrically. It can be erased and reprogrammed
about ten thousand times. Both erasing and programming take about 4 to 10 ms (milli
second). In EEPROM, any location can be selectively erased and programmed. EEPROMs
can be erased one byte at a time, rather than erasing the entire chip. Hence, the process of
re-programming is flexible but slow.
Advantages of ROM
 Non-volatile in nature
 These cannot be accidentally changed
 Cheaper than RAMs
 Easy to test
 More Reliable than RAMs
 These are static and do not require refreshing
 Its contents are always known and can be verified

Comparison of RAM and ROM


ROM RAM
Has permanent storage Has temporary storage
Occupies less capacity Occupies the largest capacity
Not volatile Volatile (lose its content when there is a
power cut)
Cannot be altered Allows changes to be made

Cache memory
 Is a high speed memory mainly used to complement the RAM.
 Cache memory is faster than RAM and it stores frequently used pages.
 The cache memory is between the RAM and the CPU and the CPU searches for data or
programs in the cache first, if it’s not found, the CPU then searches in the RAM.

14
 The CPU uses certain algorithms to determine which data should be stored in the cache,
which will help the CPU to predict the next instruction to be executed and hence making
processing faster.

Virtual Memory
 It helps the computers RAM to be freed up with inactive applications to make way for
loading current applications being used.
 It works merely by checking for data stored in RAM not being used recently and have it
stored in the computer’s hard disk, thereby freeing useful space in RAM for loading
other applications.

Secondary Storage
 Due to the fact that the primary storage is limited, in order to store massive programs
and data, the secondary storage is needed to supplement it
 Used when there is insufficient primary memory. Examples of secondary storage are
CDs, DVDs, memory sticks, memory cards etc

PRIMARY SECONDARY
Less storage capacity Extensive storage capacity
Volatile in nature Not volatile
Access speed is fast Access speed is slow
Expensive to purchase Cheaper to purchase
Usually not portable Portable (that is it can be carried from one
place to another)

PROCESSOR COMPONENTS
Central Processing Unit (CPU) or the processor is also often called the brain of computer.
CPU consists of Arithmetic Logic Unit (ALU) and Control Unit (CU) and registers.

ALU
 It performs the arithmetic and logic operations on the data that is made available to it.
 It’s responsible for all mathematical operations.
 The arithmetic part is responsible for addition, subtraction, division and subtraction
while the logic part is responsible for comparison.

CU
 Is responsible for supervising the operations of the processor.
15
 CU controls and coordinates the activity of the other units of computer.
 Fetch, decode and execute jobs, thus retrieving instructions from memory and
executing them accordingly.

Registers
 Are temporary storage areas for holding data, and instructions?
 This is a storage location inside the processor.
 Registers in CU keep current instructions and the operands of instruction.
 There are also ALU registers that store data items that are to be added, subtracted,
multiplied, divided or compared.
 CPU uses the registers to store the data, or instructions during processing.
 Registers are very high-speed storage areas located inside the CPU.
 After CPU gets the data and instructions from the cache or RAM, the data and
instructions are moved to the registers for processing. Registers are manipulated
directly by the control unit of CPU during instruction execution. That is why registers
are often referred to as the CPU’s working memory.
 Since CPU uses registers for the processing of data, the number of registers in a CPU and
the size of each register affect the power and speed of a CPU.
 The more the number of registers (ten to hundreds) and bigger the size of each register
(8 bits to 64 bits), the better it is.

Structure of Processor
Abb. Full Meaning Purpose and other details
ALU Arithmetic Logic Unit Carries out arithmetic and logic operations
CU Control Unit Decodes instructions and sends signals to
other units/registers/peripherals
IAS Immediate Access Store Main Memory - stores data and
instructions
Acc Accumulator Special register; storage for one word of
data. While in register data can be
modified
SCR Sequence Control Holds address of next instruction to be
(PC) Register (Program fetched
Counter)
MAR Memory Address Holds address of memory location to be
Register read from/written to
MBR Memory Buffer Register Contains word read from/written to
MDR Memory Data Register memory
CIR Current Instruction Current instruction is held while it is being
Register decoded
SR Status Register Holds state of accumulator etc. Bits used to
record state of CPU e.g. -ve, carry,
overflow, BCD, interrupt disabled

16
CHAPTER 2

SOFTWARE

SOFTWARE
 This is a general term used to describe all the programs that run on a computer. A
computer system consists of hardware and software. The computer hardware cannot
perform any task on its own. It needs to be instructed about the tasks to be performed.
 Software is a set of programs that instructs the computer how tasks are to be
performed.
 Software tells the computer how the tasks are to be performed and hardware carries
out these tasks.

The hierarchy of software


An instruction is a step or statement to do a single task. Then program is a set of
instructions to do a given task. Finally software is a series of programs that run on a
computer.
Instructions

Programs

Software

Types of Software
Software can be broadly classified in two categories:
 System Software, and
 Application Software.

APPLICATION SOFTWARE
 Is the software that a user uses for completing a specific task i.e. it is user oriented
 Designed to carry out some tasks for the user that is primarily independent of
computers such as writing a letter

17
 A set of programs that are written for a specific purpose and provide the required
functionality is called software package.
 Application software is written for different kinds of applications—graphics, word
processors, media players, database applications, telecommunication, accounting
purposes etc.
 Application software run under System Software, and are made to do a specific task i.e.
(Word Processing etc), which have indirect access to the hardware (i.e. Behind System
Software).
 Examples are Web browsers, word processing software, spreadsheet software,
database software, presentation graphics software. Opera (Web Browser), Microsoft
Word (Word Processing), Microsoft Excel (Spreadsheet software), MySQL (Database
Software), Microsoft PowerPoint (Presentation Software), iTunes (Music / Sound
Software), VLC Media Player (Audio / Video Software ), World of Warcraft (Game
Software), Adobe Photoshop (Graphics Software).

General purpose or off-the-shelf package


 Pre-written software that provides approximate solutions to a range of different
problems.
 Many such packages can be tailored so that they can be adopted to fit a specific solution.
For example, word processors, spread sheets, database management systems,
presentation designers, etc.
 Also known as the generic software (or off the shelf)

Advantages
 They are generally cheaper to buy than bespoke packages which are to develop.
 They are available almost immediately.
 Any system bugs should have been discovered by other users and eliminated.
 These are written by software specialists and of a high quality.
 Good packages are likely to come with good training programs and well documentation.
 New updated versions of the software are likely to be available on a regular basis.
 The package can be used by large number of organizations.
 There are likely to be a number of people with expertise in the relevant package that
are already employed by the organization or who can be recruited, training is likely to
be readily available.
 The computer user doesn't need to employ his own specialist staff to develop, write,
and test the programs. It will save time and money.
 In-house tailored made development is only feasible for large organizations with their
MIS department.

Disadvantages
 The computer user gets a standardized solution to a data processing task.
 The standard solution may not fit precisely the needs of the organization.
 The users may need to compromise what they want with what is available.
 The organization is dependent upon an outside supplier for the maintenance, updating
updating and providing assistance in the event of problems of the software.

18
 Changing are not possible.

Types of Application Software:


WORD PROCESSING PACKAGE
Is used to create, view, edit, store and print text material.

Advantages
 Error detection and correction before producing a hardcopy.
 Automatic word wrap - any word that extends beyond the right margin is automatically
moved to the next line.
 Formatting and enhancing document presentation.
 Flexibility
 Inclusion of graphs within a document.
 Production of multiple copies.
 Mail Merging
 Electronic Filing.
 Electronic Transmission – emailing.

SPREADSHEETS
This is an electronic computer application which is used for budgeting, summaries of
accounts, stock level analysis and forecast planning.

Advantages of using Electronic Spreadsheets


 Automatic Updating of Formula
It is easy to replicate formulas based on cell reference.
Changing any of the values will automatically update all the other hundreds of
numbers that depend on it.
 Editing Function
Blocks of text can be selected, moved, copied and deleted.
 Comprehensive Range of Functions
Most spreadsheets come with in-built functions for almost every mathematical,
statistical and logical computation.
 Viewing of figures in charts and graphs
Allows you to select data and then create graph based on that data.

Difference between a Workbook and a Worksheet


o A spreadsheet is made up of numbered rows and lettered columns.
o Each grid position is called a cell and can contain text, numbers or formula.
o Files created in Microsoft Excel are called Workbooks
o Inside workbooks are worksheets also known as spreadsheets?
o A worksheet is the primary document used to store and work with data .
o It consists of cells organized into rows and columns.

19
 Database Software: Allows users to store and retrieve vast amount of data. Example:
MS Access, MySQL, Oracle etc.
 Presentation Graphic Software: Allows users to create visual presentation. Example:
MS Power Point
 Multimedia Software: Allows users to create image, audio, video etc. Example: Real
Player, Media Player etc.

Applications are programs that you as the user use to perform specific tasks.
Word Processing. Enables users to create,
Microsoft Word 2010, Corel Word
edit, format and edit textual documents such as
Perfect, Lotus
letters
Spreadsheet. Enables users to manipulate a
Microsoft Excel 2010, Lotus 1-2-3,
table of data usually making numerical and
Corel Quattro Pro
business calculations and projections
Database. Enables the user to create and
Microsoft Access 2010, Microsoft
maintain a database in which data is organized
Visual FoxPro, Lotus Approach
for ease of use and manipulation
Presentation Graphics. Enables users to
create images for group presentations, self- Microsoft PowerPoint 2010, Lotus
running slide shows and for other situations Freelance Graphics, Corel
that require the presentation of organized, Presentations
visual information
Web Browsers. Enables users to view web
pages and allows for communication on the Microsoft Internet Explorer, FireFox
Internet
Photo-Editing. Enables users to edit, crop,
Adobe Photoshop, PhotoImpact,
manipulate photos that were scanned in or
Microsoft PictureIt
imported from a digital camera

Custom Made/Special Purpose Software:


 Custom made software is also called special purpose/ tailor made / bespoke software,
 Is computer programs written to meet the processing needs of an individual or an
organization.
 They are produced in-house or commissioned from an outside software company.
Examples are payroll, inventory, accounts, sales, production, marketing, etc.

Advantages
 The software is designed to meet what the user wants
 The software can be designed to run on specific hardware
 The system can be integrated with other applications within the organization.
 The system can be modified to fit changing needs.
 You will receive much better support and can in many cases talk directly to the
developers concerned

20
 The use of professionally developed bespoke software applications can give you a
significant business advantage over your competition

Disadvantages
 Development takes a long time.
 Delays the implementation of the system.
 Costly to develop and test.
 Greater probability of bugs.
 May be poorly documented..
 It can be difficult to get support for bespoke software, unless the developers themselves
offer support services.

NB System software: controls the operations of the computer (computer oriented) and
application software perform user required functions (user oriented)

SYSTEM SOFTWARE
 The set of programs needed to control and monitor the operation of the hardware (and
applications software) of a computer.
 System software is a collection of programs which control the overall function of the
computer.
 Software is program that acts as an interface between the user and the computer
 Is a set of computer programs that manage the hardware and software resources of a
computer so that they can work together harmoniously?
 System software is required for the working of computer itself.
 The user of computer does not need to be aware about the functioning of system
software, while using the computer
 System Software has direct control and access to computer hardware, and memory
locations i.e. it is computer oriented
 Examples Unix, Linux, Windows, DOS and Windows NT

Utility software
Is system software designed to help analyze, configure, optimize or maintain a
computer?Performance monitoring programs can also be classified as utility software –
this is software that is used to monitor disk, memory and processor use. Utility programs
are generally fairly small. Each type has a specific job to do. Below are some descriptions of
utilities:

Anti-virus applications
 Protect your computer from the damage that can be caused by viruses and similar
programs.
 Virus scanning software iscriticalto use, due to the number of computer viruses (small
computer programs created to disrupt and destroy computer files and/or operating
system software).

21
 Virus scanning software needs to be updated on a regular basis (usually monthly).
Updates insure that your virus scanning software will protect you from the most recent
viruses.

File Compression utilities


 Make files smaller for storage (or sending over the Internet) and then return them to
normal size.

Disk cleaners
 Can find files that are unnecessary to computer operation, or take up considerable
amounts of space.
 Disk cleaner helps the user to decide what to delete when their hard disk is full.

Disk compression utilities


 Can transparently compress/uncompress the contents of a disk, increasing the capacity
of the disk.
Disk defragmenters
 Reorganize the data stored on disks so that it is more efficiently arranged. Can detect
computer files whose contents are broken across several locations on the hard disk, and
move the fragments to one location to increase efficiency.
 Disk Defragmenter software assists you to keep reorganizing your disk drives. After
files are saved, deleted and resaved again, the disk can become fragmented --- available
space is in small blocks located throughout the disk.
 Disk defragmenters gather those free spots and put them together to enable you to
continue to save your data in the most efficient manner.

Disk partitions
 Can divide an individual drive into multiple logical drives, each with its own file system
which can be mounted by the operating system and treated as an individual drive.

Registry cleaners
 Clean and optimize the Windows registry by removing old registry keys that are no
longer in use.

Hardware represents the physical and tangible components of the computer, i.e., the
components that can be seen and touched.
Examples of Hardware are following:
 Input devices -- keyboard, mouse, etc.
 Output devices -- printer, monitor, etc.
 Secondary storage devices -- Hard disk, CD, DVD, etc.
 Internal components -- CPU, motherboard, RAM, etc.

22
Relationship between Hardware and Software
 Mutually dependent. Both of them must work together to make computer produce a
useful output.
 Software cannot be utilized without supporting hardware.
 Hardware without set of programs to operate upon cannot be utilized and is useless.
 To get a particular job done on the computer, relevant software should be loaded
into the hardware.
 Hardware is a onetime expense.
 Software development is very expensive and is a continuing expense.
 Different softwares can be loaded on hardware to run different jobs.
 Software acts as an interface between the user and the hardware.
 If hardware is the 'heart' of a computer system, then software is its 'soul'. Both are
complimentary to each other.

Software is a set of programs, which are designed to perform a well-defined function. A


program is a sequence of instructions written to solve a particular problem.
There are two types of softwares:
 System Software
 Application Software

System Software
The system software is a collection of programs designed to operate, control and extend
the processing capabilities of the computer itself. System software are generally prepared
by computer manufacturers.
These softwares comprise of programs written in low level languages which interact with
the hardware at a very basic level. System software serves as the interface between
hardware and the end users.
Some examples of system software are Operating System, Compilers, Interpreter,
Assemblers, etc.

23
Features of System Software are the following:
 Close to system (computer oriented).
 Fast in speed.
 Difficult to design.
 Difficult to understand.
 Less interactive.
 Smaller in size.
 Difficult to manipulate.
 Generally written in low-level language.

Application Software
Application softwares are the softwares that are designed to satisfy a particular need of a
particular environment. All softwares prepared by us in the computer lab can come under
the category of Application Software.
Application software may consist of a single program, such as a Microsoft's notepad for
writing and editing simple text. It may also consist of a collection of programs, often called
a software package, which work together to accomplish a task, such as a spreadsheet
package.
Examples of Application softwares are the following:
 Payroll Software
 Student Record Software
 Inventory Management Software
 Income Tax Software
 Railways Reservation Software
 Microsoft Office Suite Software
 Microsoft Word
 Microsoft Excel
 Microsoft Powerpoint

Features of Application Software are the following:


 It is close to user (user oriented).
 It is easy to design.

24
 More interactive.
 Slow in speed.
 Generally written in high-level language.
 Easy to understand.
 Easy to manipulate and use.
 Bigger in size and requires large storage space.

OPERATING SYSTEM
 Is a part of system software
 The operating system is an integrated set of programs that is used to control and
manage the resources and overall operations of a computer.
 The Operating System is the software that controls the operation of the hardware and
hides its complexities from the user.
 Is a program which monitors, controls and maintains the computer.
 Intermediates between the user of computer and the computer hardware. For example,
the user gives a command and the OS translates the command into a form that the
machine can understand and execute.
 It hosts the several applications that run on a computer and handles the operations of
computer hardware.
 OS acts as an interface between the application programs and the machine hardware.
 Examples Windows, Linux, UNIX and Mac OS

Objectives of Operating System


 To make the computer system convenient and easy to use, OS hides the working of the
hardware from the user and makes it convenient for the user to use the machine.
 To use the computer hardware in an efficient way, by handling the details of the
operations of the hardware.

Functions of OS
Operating system is large and complex software consisting of several components. Each
component of the operating system has its own set of defined inputs and outputs. Different
components of OS perform specific tasks to provide the overall functionality of the
operating system . Main functions of the operating system are as follows:

 Memory Management
 It keeps track of primary memory, i.e., what parts of it are in use by whom, what
parts are not in use, etc.
 Allocates the memory when the process or program requests it.
 Processor Management
 Allocates the processor (CPU) to a process.
 De-allocate processor when processor is no longer required.
 Device Management
 Keeps tracks of all devices. This is also called I/O controller.
 Decides which process gets the device when and for how much time.
 File Management

25
 Allocates the resources.
 Deallocates the resource.
 Decides who gets the resources.
 Security
 By means of passwords & similar other techniques, preventing unauthorized access
to programs & data.
 Job accounting
 Keeping track of time & resources used by various jobs and/or users.
 Control over system performance
 Recording delays between requests for a service & from the system.
 Error handling
 An operating system responds to errors. When an error occurs, operating system
must take appropriate actions.
 The operating system should be able to ‘freeze’ the program that causes an error
and display a message to the end user.
 User InterfaceorCommand Interpreter— Operating system provides:
 The user interface via which the user interacts with the applications and the
hardware.
 Communication management:
 The OS ensure communication between computers linked together in a LAN or WAN
 Interprets commands for downloading and uploading

Types of OS
OS are classified into different types depending on their capability of processing:
1. Single User OS
 Provides a platform for only one user at a time.
 No user accounts are required since it support one user.
 Single operating system designed to manage one task at a time, for example, if the
user is editing a document, then a document cannot be printed on the printer
simultaneously.
 MS-DOS is an example of single user OS.
2. Multitasking OS
 Allows execution of more than one task or process concurrently. Thus they can
perform multiple tasks simultaneously
 The processor time is divided amongst different tasks. This division of time is also
called time sharing.
 The processor switches rapidly between processes. For example, the user can listen
to music on the computer while writing an article using word processor software.
 The user can switch between the applications and also transfer data between them
 Windows 95 and all later versions of Windows are examples of multitasking OS.
3. MultiuserOS
 Support two or more users simultaneously.
 Is used in computer networks that allow same data and applications to be accessed
by multiple users at the same time.

26
 Provides regulated access for a number of users by maintaining a database of known
users. The users can also communicate with each other.
 Linux, UNIX, and Windows 7 are examples of multiuser OS.
4. Batch OS
 In a batch OS a job runs from beginning to end without intervention from the user
 The running of batch jobs is normally controlled by a program written in Job Control
Language (JCL)
 Is software which replicates identical jobs over and over again?
 A batch operating system keeps itself eventful; it does this by taking jobs from a
batch queue, instead of waiting for people to submit jobs.
 Batch processing is typically used for: • processing OMR forms such as those that
contain answers to a multiple-choice exam; • payroll; • utility billing.
5. Networking OS
 Also referred to as the Dialoguer,
 A network operating system (NOS) is one that is able to share its resources (such as
hard disk or printer) and use the resources of others.
 Is the software that runs on a server and enables the server to manage data, users,
groups, security, applications, and other networking functions?
 The network operating system is designed to allow access to shared files and
printers among multiple computers in a network, typically a local area network
(LAN), a private network or to other networks.
 The most popular network operating systems are MicrosoftWindows Server 2003,
MicrosoftWindows Server 2008, UNIX, Linux, Mac OS X, Novell NetWare, and BSD.

6. Real Time OS
 Are designed to respond to an event within a predetermined time.
 Data input to the computer is processed immediately
 Processing is done within a time constraint.
 Deal with events which happen at unpredictable moments in time;
 Deal with multiple events that occur simultaneously;
 Support application programs which are non-sequential in nature

 Examples of real-time operating systems: • Airline flight reservation; • Missile

guidance; • Temperature/pressure control; • Process control.

Operating System Comparison


 An OS is a fundamental component of a computer system that manages activities and
resources on the machine.
 There are essentially four operating systems commonly used today: DOS, Linux,
Windows and Mac OS X.

LINUX

 Majority of Linux variants are available for free

27
 Linux variants and versions are extremely reliable and can often run for months and
years without needing to be rebooted.
 Linux is a cross-platform operating system. It runs on many computer models.
 Linux is a very secure operating system.
 Linux is a complete operating system that is stable
 Difficult to use than windows
 Linux is one of the best operating systems in terms of networking.
 Many of the Linux variants are open source and enable users to customize or modify the
code.
 Linux is a multi-tasking system. It means that a single user can run multiple
concurrently.
 Multi-User: can support 2 or more users at the same time

WINDOWS

 Windows is more expensive than Linux


 Windows is easier to use than Linux.
 Less reliable than Linux
 Windows has a much larger support for hardware devices
 Windows is insecure since it is vulnerable to viruses and other attacks.
 Majority of Windows programs are not open source.
 Microsoft Windows includes its own help section, has vast amount of available online
documentation and help
 Windows is a multitasking operating system. A user can execute multiple tasks at the
same time.
 Multiprocessing: multiple programs are executed on different processors at the same
time.
 Windows is a multi-user operating system as it allows multiple users to use the same
computer at the same time.
 Plug and Play: windows automatically detect and configure new devices when they are
connected to the computer.

Mobile Operating System


Symbian
 Is a mobile operating system designed for smart phones and currently maintained by
Accenture.
 Runs exclusively on ARM processors.
 It was the most popular Smartphone OS on a worldwide until the end of 2010, when it
was overtaken by Android, although in some developing nations, Symbian is still the
biggest.

28
Features of Symbian
 Symbian source code is not an open source and its licensed
 Multitasking since it allows use of more than one application at a time
 It has a high Java support, thus, giving an ultimate/crucial gaming experience to users.
Symbian smoothly displays games without any buffering like in most online games.
 In contrast, this OS does not work well when it comes to downloading games, although
it is more preferred for online gaming.
 The Symbian OS, on the other hand, does not have an integrated network accelerator for
clearer video calling.
 Symbian-powered smart phones, such as the Nokia N8, have been reported to attain
certain glitches when opening large web files.
 The Symbian browser, on the other hand, could only download one file at a time
 Symbian based handsets offers good multimedia features.

Android Software
 Android is the version of Google's mobile operating system
 Android software runs on tablet computers and smart phones

Features of Android
 It can support multiple users without the need for logging out.
 It has smart keyboard with gesture typing.
 Its multitasking
 Wireless display of images and videos on big-screen HDTV sets.(High Definition
Television Sets)
 Instant processor acceleration when users touch the screen.
 Wireless image and video sharing among multiple units in close proximity.
 Automatic resizing and relocation of screen widgets for optimum display readability.
 Enhanced screen magnification functions.
 Support continuous information updates (news, weather, travel data, etc.) through
Google.
 Voice-activated Web search with support for more than 30 languages.
 Photo sphere camera for creating navigable panoramic images encompassing all
directions in 3D space.
 Android has a wide array of features, Optimized graphic, Accelerometer, Compass, GPS,
and several applications like maps, calendar, email client, contacts, and Java
programming. It also supports videos, still images, common audio files, and other
complicated formats.
 Android have a very poor support for Web games, making it quite unusable for online
playing
 Android is easy to use and has a non-complex interface.
 Android-powered handsets have support for wireless Internet

User Interfaces
 Is a way in which human and computer communicate

29
 The type of user interface that is used on a computer system is determined by the
operating system. For example most programs that run on computers using a Microsoft
Windows operating system have a graphical user interface.

The users can interact with the computer using the following interfaces:
 Command Line Interface (CLI)
 Graphical User Interface (GUI)
 Job Control Language

Command line interface


 Allow the user to interact directly with the computer system by typing in commands
(instructions) using a keyboard.
 MS-DOS and Linux shell are examples of command line mode of interfaces

Advantages
 Quicker since it does not use as much CPU processing time as others
 Greater variety of commands
 Use less memory
 A low resolution, cheaper monitor can be used with this type of interface
 Very flexible with the use of “switches” (options)
 More useful error messages

Disadvantages
 Not user friendly
 Difficult for beginner
 Requires the user to learn “complex” commands or language
 Commands have to be typed precisely. If there is a spelling error the command will fail

Command Line Interface Applications


*Ideal for visually impaired users!!!

WIMP /Graphical user interface


 User interacts with system using windows, icons, menus and a pointer to control the
operating system.
 Selection is achieved by moving a pointer with a mouse and clicking a mouse button
 “Windows 7” and “Mac OS 10” are examples of graphical mode of interface

Advantages
 easier for novices to use since its more intuitive
 only valid options are available
 consistency of layout and command representation in applications
 comprehensive on-line help available
 You get the benefits of WYSIWYG. This stands for What You See Is What You Get.

30
 This interface can also open multiple sessions in multiple windows and put them next
to each other on the computer screen

Disadvantages
 They need significantly more memory (RAM) to run than other interface types
 requires more powerful processor and better graphics display
 slower when executing a command because much more interpretation takes place
 can be irritating for simple tasks because greater number of operations are required

Job control language


 User has no direct interaction with the computer system.
 User prepares a series of instructions off-line using JCL to describe to the system the
requirements of the task.
 After execution, results are made available via an off-line medium e.g. line printer paper
 JCL specifies:
o who owns the job
o job priority
o maximum processor time to allow job
o maximum lines to be printed
o names of files to be used
o resources to be used e.g. magnetic tape, compiler/interpreter
what to do if program fails

31
CHAPTER 3

APPLICATION OF COMPUTERS AND THEIR SOCIAL AND ECONOMIC IMPLICATIONS

APPLICATION OF COMPUTERS
Business
Computer is used in business organisation for:
 Payroll Calculations
 Budgeting
 Sales Analysis
 Financial forecasting
 Managing employees database
 Maintenance of stocks, etc.

Banking
Banks provide following facilities:
 Bank on-line accounting facility, which includes current balances, deposits,
overdrafts, interest charges, shares and trustee records.
 ATM machines are making it even easier for customers to withdraw money and deal
with banks.
 Electronic funds transfer (EFT)the process by which money is transferred from
one bank account to another, by computer
 Electronic funds transfer at the point of sale (EFTPOS). The process by which
money is transferred at the checkout from a customer’s bank account to the shop’s
bank account, by computer

Insurance
Insurance companies are keeping all records up-to-date with the help of computers. The
Insurance Companies, Finance houses and Stock broking firms are widely using computers
for their concerns. Insurance Companies are maintaining a database of all clients with
information showing:
 how to continue with policies
 starting date of the policies
 next due installment of a policy
 maturity date
 interests due
 survival benefits
 bonus

Education
The computer has provided a lot of facilities in the Education System.
 The uses of computer provide a tool in the Education system known as CBE
(Computer Based Education).
 CBE involves Control, Delivery and Evaluation of learning.

32
 The computer education is very familiar and rapidly increasing the graph of
computer students.
 There are number of methods in which educational institutions can use computer to
educate the students.
 It is used to prepare a database about student performance and analyses are carried
out.
 Computer-assisted learning (CAL) The process of using computers to learn at a self-
paced rate from presentations, oft en with computer-based assessment questions
and feedback of results.
 Computer-based learning The use of computers for interactive learning activities,
including computer assisted learning and computer-based training.
 Computer-based training (CBT) Similar to computer assisted learning, but usually
for training in work skills rather than academic learning.

Marketing
In Marketing uses of computer are following:
 Advertising: With computers, advertising professionals create art and graphics,
write and revise copy, and print and disseminate adverts with the goal of selling
more products.
 At Home Shopping: Home shopping has been made possible through use of
computerized catalogues that provide access to product information and permit
direct entry of orders to be filled by the customers.
 E-commerceThe use of the Internet for commercial activities such as Internet
banking and shopping.

E-commerce can be divided into:


o E-tailing or "virtual storefronts" on Web sites with online catalogues, sometimes
gathered into a "virtual mall"
o The gathering and use of demographic data through Web contacts
o Electronic Data Interchange (EDI), the business-to-business exchange of data
o E-mail and fax and their use as media for reaching prospects and established
customers (for example, with newsletters)
o Business-to-business buying and selling
o The security of business transactions

Health Care
The computers are being used in hospitals to keep the record of patients and medicines. It
is also used in scanning and diagnosing different diseases. ECG, EEG, Ultrasounds and CT
Scans, etc., are also done by computerized machines.
Some of major fields of health care in which computers are used:
 Diagnostic System: Computers are used to collect data and identify cause of illness.
 Lab-diagnostic System: All tests can be done and reports are prepared by
computer.

33
 Patient Monitoring System: These are used to check patient's signs for
abnormality such as in Cardiac Arrest, ECG, etc.
 Pharmacy Information System: Computer checks Drug-Labels, Expiry dates,
harmful drug side effects, etc.
 Nowadays, computers are also used in performing surgery.

Engineering Design
Computers are widely used in engineering purposes. One of major areas is CAD (Computer
aided design). CAD provides creation, edition, and modification of image. Some fields are:
 Structural Engineering: computers are used for stress and strain analysis required
for design of Ships, Buildings, Budgets, Airplanes, etc.
 Industrial Engineering: Computers deal with design, implementation and
improvement of Integrated systems of people, materials and equipment’s.
 Architectural Engineering: Computers help in planning towns, designing
buildings, determining a range of buildings on a site using both 2D and 3D drawings.
 Computer-aided design (CAD) The process of using a computer to design an item.
 Computer-aided engineering (CAE) The process of using computer simulation to
check the design of a structure before construction or manufacture.
 Computer-aided manufacture (CAM) The process of using a computer to control
the automatic manufacture of an item.

Military
Computers are largely used in defense. Modern tanks, missiles, weapons, etc., employ
computerized control systems. Some military areas where a computer has been used are:
 Missile Control
 Military Communication
 Military operation and planning

Communication
Communication means to convey a message, an idea, a picture or speech that is received
and understood clearly and correctly by the person for whom it is meant. Some main areas
in this category are:
 E-mail
 Chatting
 Usenet
 FTP
 Telnet
 Video-conferencing

Government Applications
Computers play an important role in government applications. Some major fields in this
category are:
 Budgets
 Sales tax department

34
 Income tax department
 Male/Female ratio
 Computerization of voters lists
 Computerization of Driving Licensing system
 Computerization of PAN card
 Weather Forecasting.

EFFECTS ON PEOPLE AND ORGANISATIONS BROUGHT BY COMPUTERS

Some social effects on people are:


 People work in good working environments.
 People are productive, able to do more work in less time.
 People lose their jobs because of robots and computers.
 Cashless society - people can buy goods and services through credit cards and mobile
phones.
 Children are addicted to playing computer games.
 Loss of privacy - governments and businesses can track people's activities on the
internet.
 Technology gap - the poor, illiterate and old people have little opportunity to use
technology.
 People are too dependent on technology for almost all things.
 People live a fast-pace or hectic life; they have to learn and process more information;
some work at odd hours.
 People work from home.

Some economic effects on organisations are:

 High productivity - factories are able to produce more goods in less time.
 De-skilling - organizations use computers and software to do skilled work, no longer
 Relying on experts.
 Companies save money by out-sourcing jobs or re-siting operations to other countries.

Some negative effects of computers are:

 People lose their jobs because of robots and computers.


 People live a fast-pace and stressful life; they have to retrain regularly; they work odd
hours.
 People lose their privacy; governments can track people's activities on the internet.
 Children are addicted to computer games.
 Poor and illiterate people are unable to benefit from technology.

Advantages of using Computers


 Computers reduce or eliminate jobs that are repetitive e.g. retyping a document to
correct spelling mistakes.
 With the use of a computer work can be completed faster, more easily and more
accurately.
35
 They also produce more professional output by use of word processing and graphics.
 Allow faster retrieval of information that would take a long time, or be impossible with
manual searching.

Disadvantages of using computers


 Unemployment – jobs eliminated due to changes in technology.
 No guarantee of security as more and more people are learning skills required to
program, penetrate and manipulate computer systems.

Robotics
- A robot is a reprogrammable, multifunctional computer controlled device designed to
perform multiple tasks in industries, replacing human beings; e.g. for spray painting,
welding, fixing parts of a car, etc.
- Robotics refers to the science of developing and the use of computer controlled devices to
replace human beings in manufacturing.
- Robots can contain embedded processors or be linked to a computer system.
- They are pre-programmed to do a specific task or “taught” to remember instructions from
a human operator carrying out the task manually e.g. teaching a robot to spray a car with
paint.
- Robots rely on processors and sensors. The sensors gather information so that the robot
knows it is the right time to do the task (e.g. is a car in position to be sprayed, is there an
obstruction to prevent the robot doing its task, etc.)
- They are capable of doing some pseudo-intelligent tasks (e.g. different sized cars to be
painted)
o Robots are mostly used (suitable) in the following areas:
 In very dangerous areas for human beings to work, e.g. fire fighting, nuclear
power stations, underground mining, chemical, nuclear factories, deep in the ocean,
in space, etc.
 In areas where heavy items are to be lifted, e.g. for loading containers in ships, in
production lines, etc.
 In areas where the degree of accuracy is of utmost importance, e.g.
manufacturing of computer chips. Thus producing standardised goods.
 Where work is repeatedly executed and boring, like traffic control at road
junctions

Features (Parts) of a Robot


Robots have the following features (parts/characteristics):
- Actuator (Manipulator): - A moving part which resembles a moving arm used for lifting
and fitting items.
- Transducer: They convert analogue signals to voltage signals.
- Sensors: capture information and data from the environment in analogue form
- Analogue-Digital Converter(ADC):Convert analogues signals to digital signals
- Microprocessor: Processes data collected from sensors

36
- Power supply: - Usually electricity through compressors or stepper motors.
- Controlling Computers: - Connected through an interface to give instructions to the
robot.
- Have some form of interface (connection points to power supply, human interface, etc.)

Advantages of Using Robots


- Reduces labour costs as less people will be employed.
- High quality work is produced, which is also of high standard and consistent.
- Reduces cost (price) of goods due to reduced labour costs.
- Increases production volumes of goods since more goods are produced in a very short
period of time.
- Ensures high degree of accuracy when producing goods.
- Robots can operate in the dark thereby saving electricity costs.
- Robots do not take breaks and holidays as they do not get tired.
- Robots can work 24 hours a day; they can work non-stop; they don’t need a break
- Robots reduce accidents at traffic lights.
- Robots improve traffic flow.
- Robots can work in dangerous conditions.
- Create employment as the robots need to be serviced and installed.
- Eliminates human errors involved in the production process.
- Removes the need to do boring, very repetitive tasks leaving humans free to do the more
skilled work such as quality control.

Disadvantages of Using Robots


- Leads to unemployment as humans are replaced by robots
- Electricity expenses are very high.
- they can find it difficult to deal with “unusual” circumstances e.g. a door is missing from a
car waiting on the paint spraying line
- leads to de-skilling since many tasks are taken over by robots

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

Expert Systems
These are computer systems developed to mimic human reasoning and work at the level of
an expert in a particular field, e.g. in medical diagnosis. Expert systems are used in the
following fields:
oil or minerals prospecting, diagnosing a person’s illness, Diagnostics (e.g. finding faults in
a car engine, etc.), tax and financial calculations, complex “thinking” tasks such as chess,
weather forecasting, criminology/forensic science, career choices, etc

37
Components (Elements) of an Expert System

- Knowledge Base: a representation of facts (data) in a particular field (e.g. diseases,


symptoms, treatments, etc. as in medical diagnosis)
- Inference procedure (engine): contains reasoning methods used to arrive at a
conclusion using information in the knowledge base. It contains interrogation
technique/questions and answers.
- User interfaces: these enable people to form queries, provide information, and interact
with the system.
- Explanation facilities (system): enable the systems to explain or justify their
conclusions, and they also enable developers to check on the operation of the system
themselves.
- Rule Base: This is found in the Working Store. It contains inference rules and the
inference engine uses these to draw its conclusions.
The system uses a rule base and an inference engine together to simulate human reasoning
when analysing a problem and arriving at a conclusion. To simulate human processes it is
necessary to have a vast amount of information stored in the knowledge base and the
reasoning set out as a set of rules in the rule base.

Advantages of Expert Systems


- Provides consistent answers
- Fast identification of solutions to problems by quickly analysing data.
- They produce reliable and accurate results if well programed.
- There is no need for an expert to be present since they can act as a prompt to an expert.
- They can deal with complex situations much faster than humans.
- They could be used in hazardous areas (e.g. Oil prospecting).
- They do not forget as humans do.
- Many copies can be made at a low cost.
- Knowledge of several experts is combined.
- Save costs on wages and salaries for staff.
- Conclusions are based on logic, no emotions involved.
- Can explain its reasoning method

Disadvantages of Expert Systems


- They lack creativity/does not reason.
- They are unable to learn outside the system.
- They lack sensory experience.
- They take time and are difficult to develop.
- They need to be constantly updated to keep pace with recent developments in the field
they are applied.
- This may be difficult and time consuming to use.
- Data is entered by humans who may make mistakes in doing so. This can lead to incorrect
decisions being made
- lacks common sense in some of the decision making processes

38
- cannot adapt to changing environments unless the knowledge base is continually updated
- errors in knowledge base can lead to incorrect decisions.
- expensive system to develop and set up in the first place
- needs considerable training to ensure system used correctly by operators
- leads to deskilling and unemployment.
- They are usually dedicated to one domain area (for just one task)

Global Positioning Satellites (GPS)


GPS - A navigational system involving satellites and computers that can determine the
latitude and longitude (position) of a receiver on earth by computing the time difference
for signals from different satellites to reach the receiver.

- GPS systems are used to determine the exact location of a car, airplane, ship or any form
of transport which travels from one place to another.
- In vehicles these systems are called Satellite Navigation Systems (sat nav).
- Satellites in outer space transmit signals to the Earth.
- Computers in vehicles (e.g. car, airplane or ship) receive and interpret these signals.
-Positioning depends on very accurate timing – atomic clocks are used because of their
accuracy to within a fraction of a second per day.
- Each satellite transmits data indicating its position and time.
- The computer in the vehicle calculates its location based on the information from at least
three satellites as shown below:

39
- In motor vehicles the system is called satellite navigation (sat nav).
- The on board computer contains pre-stored road maps.
- The vehicle’s exact location, based on satellite positioning, can be shown on the map; the
driver can then be given verbal directions e.g. “turn left into Josiah Tongogara Road” OR a
screen output showing the vehicle moving on the map

Advantages
- It is far safer since a driver of a vehicle doesn’t have to consult maps whilst driving.
- it also removes error (e.g. going the wrong way down a one-way street).
- Sat nav systems can also give additional information such as position of speed cameras,
estimate time of arrival, etc.
- GPS can monitor a vehicle’s position if it has broken down or has been stolen (vehicle
tracking system).
- In airplanes GPS can pinpoint its exact location in case of an accident which enables
search teams to quickly respond to the incident.

Disadvantages
- maps may not up to date therefore instructed to turn into a road which no longer exists
- road closures due to accidents or road works may cause problems to a sat nav system
- signal loss can cause problems with GPS systems
- potential interferences from external sources (major problem on aircraft)
- incorrect start and end point entered into system can cause problems

Data Logging
The automatic collection of data from source at set intervals, over a period of time, for use
at a later stage, using sensors. A device that automatically collects data from source at set
intervals for use at a later stage is called a data logger.

Features of Data Loggers:


 They contain processor inside them.
 Have Interface: Devices that act as connection point between data loggers and the
computer.
 They have own storage facility: For storage of data collected from sensors

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

 They can be connected to small keyboards or other special reading devices.
 They are connected to an Analogue to Digital Converter (ADC), which converts data
signals in continuously varying form (analogue) collected by sensors into discrete
(digital) values that can be accepted by the computer.

41
Performing the data logging process
This can be illustrated by the diagram below:

- Connect sensor to the interface box


- Connect interface to the computer
- Load data logging software (if not loaded already)
- Enter time interval (e.g. 30 seconds)
- Specify total reading time
- Display results as a list on the screen
- Produce graphs for analysis of data. Other graphs can be plotted automatically
- Save data on disk for use at a later date
- Export data to other applications like spreadsheet

Benefits of computerized data logging


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

Automated Systems
- These are control systems that are dedicated to one particular task and lack the ability to
collect and analyze data as in digital cameras.
- They do not allow for or act on user interaction, e.g. washing machines, cameras, watches.
- Most control systems have embedded computers systems inside them.

42
NB: Embedded Computers: –
- Refers to use of microprocessors in non-computer equipment like in cameras, washing
machines, watches, etc. They do not have mouse, monitor and keyboards.
- These are normally dedicated for a specific task they are designed for. Embedded
computers are also found in household items like camera, microwave, washing machine,
video recorder, fridge, sewing machine, air conditioning, electronic toys, rice cooker dish
washer, Televisions, alarms, clock, radio, DVD players, etc.

43
CHAPTER 4
Data types and Representation
Data types
A data type is a method of interpreting a pattern of bits.

Built in data types


 Intrinsic data types are the data types that are defined within a particular programming
language.
 There are many different data types and are used to make the storage and processing of
data easier and more efficient.
 Different databases and programming systems have their own set of intrinsic data
types, but the main ones are:
o Integer;
o Real;
o Boolean;
o String;
o Character;

Integer
 An integer is a positive or negative number that does not contain a fractional part.
 Integers are held in pure binary for processing and storage. Note that some
programming languages differentiate between short and long integers (more bytes
being used to store long integers).
 In REAL basic an integer uses 4 bytes of memory – this allows it to take a whole number
value between ± 2, 147, 483, 648.

Real
 A real is a number that contains a decimal point.
 In many systems, real numbers are referred to as singles and doubles, depending upon
the number of bytes in which they are stored.
 In REAL basic, a single uses 4 bytes of memory and can have a value between –
1.175494 e-38 and 3.402823 e+38; a double uses 8 bytes of memory and can have a
value between 2.2250738585072013 e-308 and 1.7976931348623157 e+308.

Boolean
 A boolean is a data-type that can store one of only two values – usually these values are
True or False.
 Booleans are stored in one byte – True being stored as 11111111 and False as
00000000.
 Many of the properties of objects (windows, text-boxes, buttons etc.) in REAL basic
have Boolean values – e.g. the visibility of an object will be set to either True (visible) or
false (Hidden). These values are often set using check-boxes.

String
 A string is a series of alphanumeric characters enclosed in quotation marks.

44
 A string is sometimes just referred to as ‘text’. Any type of alphabetic or numeric data
can be stored as a string: “Harare City”, “3/10/03” and “36.85” are all examples of
strings.
 Each character within a string will be stored in one byte using its ASCII code; modern
systems might store each character in two bytes using its Unicode.
 The maximum length of a string is limited only by the available memory.

Notes:
• If dates or numbers are stored as strings then they will not be sorted correctly; they will
be sorted according to the ASCII codes of the characters – “23” will be placed before “9”;
• Telephone numbers must be stored as strings or the leading zero will be lost.

Character
 A character is any letter, number, punctuation mark or space, which takes up a single
unit of storage (usually a byte).

Benefits of defined data-types


Whether intrinsic or user-defined, the use of data-types within a programming language:
o enable the compiler to reserve the correct amount of memory for the data – e.g. 4 bytes
for an integer;
o trap errors that a programmer has made and errors that a user of a program can make –
a variable defined as an integer cannot be given a fractional value;
o restrict the values that can be given to the data – a Boolean cannot be given the value
“maybe”;
o restrict the operations that can be performed on the data – a string cannot be divided
by 10.

MEMORY UNITS
 It is the amount of data that can be stored in the storage unit.
 The storage capacities are expressed in terms of Bytes.
Following are the main memory storage units:

Unit Description
Bit (Binary A binary digit is logical 0 & 1 representing a passive or an active state of
Digit) a component in an electric circuit.
Nibble A group of 4 bits is called nibble.
A group of 8 bits is called byte. A byte is the smallest unit, which can
Byte
represent a data item or a character.
A computer word like a byte, is a group of fixed number of bits processed
as a unit which varies from computer to computer but is fixed for each
computer.
Word
The length of a computer word is called word-size or word length and it
may be as small as 8 bits or may be as long as 96 bits.
A computer stores the information in the form of the computer words.

45
Higher storage units
Unit Description
1 KB = 1024
Kilobyte (KB)
Bytes
Megabyte (MB) 1 MB = 1024 KB
Gigabyte (GB) 1 GB = 1024 MB
Terabyte (TB) 1 TB = 1024 GB
PetaByte (PB) 1 PB = 1024 TB

FUNDAMENTALS OF DATA REPRESENTATION: BINARY NUMBER SYSTEM


As a computer programmer or an IT professional, you should understand the following
number systems, which are frequently used in computers.

Number System & Description


1 Binary Number System Base 2. Digits used: 0, 1
2 Octal Number System Base 8. Digits used: 0 to 7
3 Decimal Number System Base 10. Digits used: 0 to 9
Hexa Decimal Number System Base 16. Digits used: 0 to 9,
4
Letters used: A- F

Binary Number System


Characteristics
 Uses two digits, 0 and 1.
 Also called base 2 number system.
 Each position in a binary number represents a 0 power of the base (2). Example, 20.
 Last position in a binary number represents a x power of the base (2). Example, 2x
where x represents the last position - 1.

Example
Binary Number: 101012
Calculating Decimal Equivalent:
Binary
Step Decimal Number
Number
1 101012 ((1 x 24) + (0 x 23) + (1 x 22) + (0 x 21) + (1 x 20))10
2 101012 (16 + 0 + 4 + 0 + 1)10
3 101012 2110
Note: 101012is normally written as 10101.

Octal Number System


Characteristics
 Uses eight digits: 0, 1, 2, 3, 4, 5, 6, 7.
 Also called base 8 number system.
 Each position in a octal number represents a 0 power of the base (8). Example, 80.

46
 Last position in a octal number represents a x power of the base (8). Example, 8x
where x represents the last position - 1.

Example
Octal Number: 125708
Calculating Decimal Equivalent:
Step Octal Number Decimal Number
((1 x 84) + (2 x 83) + (5 x 82) + (7 x 81) +
1 125708
(0 x 80))10
2 125708 (4096 + 1024 + 320 + 56 + 0)10
3 125708 549610
Note: 125708is normally written as 12570.

Hexadecimal Number System


Characteristics
 Uses 10 digits and 6 letters: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F.
 Letters represent numbers starting from 10. A = 10. B = 11, C = 12, D = 13, E = 14, F
= 15.
 Also called base 16 number system.
 Each position in a hexadecimal number represents a 0 power of the base (16).
Example, 160.
 Last position in a hexadecimal number represents a x power of the base (16).
Example, 16x where x represents the last position - 1.

Hexadecimal numerals are widely used by computer system designers and programmers,
as they provide a more human-friendly representation of binary-coded values. Each
hexadecimal digit represents four binary digits, also known as a nibble, which is half a
byte.

Uses of hexadecimal
There are several uses for hexadecimals in computing:
1. HTML / CSS Colour Codes
Hexadecimal numbers are often used to represent colours within HTML or CSS.
The 6 digit hex colour code should be considered in three parts.
 First two digits represents the amount of red in the colour (max FF, or 255)
 The next two digits represent the amount of green in the colour (max FF, or
255)
 The final two digits represent the amount of blue in the colour (max FF, or
255)
2. MAC Addresses
A Media Access Control (MAC) address is a number which uniquely identifies a
device on the internet.
The MAC address relates to the network interface card (NIC) inside of the device.
e.g. D5-BE-E9-8D-44-9C

47
Expressing MAC addresses in hexadecimal format makes them easier to read and
work with.
3. Assembly Code and Memory Dumps

Hexadecimals are beneficial (over binary) because:


 They are easier and faster to work with, taking up less screen space
 Mistakes are less likely and easier to trace / debug
 Remember, a big benefit of hexadecimals is that they are easy to convert to binary, if
needed.
 In the examples above, all values are still physically stored as binary, so no storage
space is saved by using hex.

Example
Hexadecimal Number: 19FDE16
Calculating Decimal Equivalent:
Hexadecimal
Step Decimal Number
Number
((1 x 164) + (9 x 163) + (F x 162) + (D x
1 19FDE16
161) + (E x 160))10
((1 x 164) + (9 x 163) + (15 x 162) + (13 x
2 19FDE16
161) + (14 x 160))10
3 19FDE16 (65536+ 36864 + 3840 + 208 + 14)10
4 19FDE16 10646210
Note: 19FDE16 is normally written as 19FDE.

Hexadecimal Binary Octal Denary


0 0000 000 0
1 0001 001 1
2 0010 010 2
3 0011 011 3
4 0100 100 4
5 0101 101 5
6 0110 110 6
7 0111 111 7
8 1000 8
9 1001 9
A 1010 10
B 1011 11
C 1100 12
D 1101 13
E 1110 14
F 1111 15

48
Conversion of binary to decimal (base 2 to base 10)
Example: convert (1000100)2 to decimal
= 64 + 0 + 0+ 0 + 4 + 0 + 0
= (68)10

Conversion of decimal to binary (base 10 to base 2)


Example: convert (68)10 to binary
68/¸2 = 34 remainder is 0
34/ 2 = 17 remainder is 0
17 / 2 = 8 remainder is 1
8 / 2 = 4 remainder is 0
4 / 2 = 2 remainder is 0
2 / 2 = 1 remainder is 0
1 / 2 = 0 remainder is 1
Answer = 1 0 0 0 1 0 0
Note: the answer is read from bottom (MSB) to top (LSB) as 10001002

Converting from Binary to Hexadecimal


Step 1 0111 0101
Divide the binary number into groups of four digits
starting at the LSB.
Step 2 7 5
Write down the hexadecimal equivalent for each
group of digits.
011101012 = 7516

Conversion of binary to octal and hex


Conversion of binary numbers to octal and hex simply requires grouping bits in the binary
numbers into groups of three bits for conversion to octal and into groups of four bits for
conversion to hex.
Groups are formed beginning with the LSB and progressing to the MSB.
Thus, 11 100 1112 = 3478
11 100 010 101 010 010 0012 = 30252218
1110 01112 = E716

1 1000 1010 1000 01112 = 18A8716

Conversion of decimal to hex (base 10 to base 16)


Example: convert (4768)10 to hex.
= 4768 / 16 = 298 remainder 0
= 298 / 16 = 18 remainder 10 (A)
= 18 / 16 = 1 remainder 2
= 1 / 16 = 0 remainder 1
Answer: 1 2 A 0
Note: the answer is read from bottom to top, same as with the binary case.

49
Octal Numbers (Base 8)
In the octal number system there are only eight different symbols.

Converting Binary to Octal


Step 1 111 101
Divide the binary number into groups of three digits
starting at the LSB.
Step 2 7 5
Write down the hexadecimal equivalent for each
group of digits.
111 1012 = 758
Converting Octal To Denary
To perform this operation we use the same method as for converting a binary number to
decimal. However the column headings are in powers of eight, not two.

Binary Coded Decimal


This variation of binary allows denary digits to be encoded separately.
E.g. 271910is represented by:
2 7 1 9
0010 0111 0001 1001
271910 = 0010 0111 0001 1001BCD

Advantages
 Easy to convert binary to BCD.
 No error due to round off.

Disadvantages
 Occupies more memory.
 Can be harder to perform arithmetic operations.
Conversion of octal to decimal (base 8 to base 10)
Example: convert (632)8 to decimal
= (6 x 82) + (3 x 81) + (2 x 80)
= (6 x 64) + (3 x 8) + (2 x 1)
= 384 + 24 + 2
= (410)10

Conversion of decimal to octal (base 10 to base 8)


Example: convert (177)10 to octal
177 / 8 = 22 remainder is 1
22 / 8 = 2 remainder is 6
2 / 8 = 0 remainder is 2
Answer = 2 6 18

50
Adding Binary Numbers
 The digits of the two numbers being added are added together in pairs starting from the
right hand side with the least significant bit. The following rules apply when adding two
binary digits together:
 0+0=0
 0+1=1
 1+0=1
 1 + 1 = 0 (and carry over 1 to the next column to the left)

For example:
Add the binary numbers 1010 (ten) and 0110 (six) together
1010
0110 +
-----
10000 (sixteen)

An overflow may occur if the sum of the two original numbers exceeds the size available to
store the number. The above 4-bit numbers produce a sum which has 5 bits. If the numbers
were being stored in 4-bit bytes, an overflow error would occur.

Subtracting Binary Numbers


To subtract two binary numbers, the following method can be used. Note that the
complement of a binary number is the value gained after changing all the 1s to 0s and vice
versa.

In the case of A-B:


 Check that A is larger than B
 Take the complement of B
 Add A and the complement of B
 Remove the leading digit of the result
 Add 1 to the result

For example:
Take away the binary number 0110 (six) from 1100 (twelve)

1100 larger then 0110? YES


Complement of 0110: 1001
1100 + 1001 = 10101
Remove leading digit: 0101
Add 1 to the result: 0110 (six)

51
 Overflow - when a number is too large for the exponent to be expressed (positive
exponent)
 Underflow - when a number is too near zero for the exponent to be expressed (negative
exponent)

Exercise: Hexadecimal
Convert the following Hex numbers into decimal/denary:
A1

Answer :
16 1
A 1
16 * 10 + 1 * 1 = 16110

FF
Answer :
16 1
F F
16 * 15 + 1 * 15 = 25510

0D
Answer :
16 1
0 D
16 * 0 + 1 * 13 = 1310

37
Answer :
16 1
3 7
16 * 3 + 1 * 7 = 5510

Why would we use the Hexadecimal system?


Answer:
Hexadecimal is used for humans, it is easier to understand and write

Name a use of the hexadecimal system


Answer:
Hexadecimal is used for error message codes and memory addresses

Convert the following Hexadecimal values into Denary:


1216
Answer :
52
1 2 (Hex)
0001 0010(Binary)

128 64 32 16 8 4 2 1
0 0 0 1 0 0 1 0 = 16+2 = 18 (decimal)

A516
Answer :
A 5 (Hex)
1010 0101 (Binary)

128 64 32 16 8 4 2 1
1 0 1 0 0 1 0 1 = 128+32+4+1 = 165 (decimal)

7F16
Answer :
7 F (Hex)
0111 1111 (Binary)

128 64 32 16 8 4 2 1
0 1 1 1 1 1 1 1 = 64+32+8+4+2+1 = 127 (decimal)

1016
Answer :
1 0 (Hex)
0001 0000 (Binary)

128 64 32 16 8 4 2 1
0 0 0 1 0 0 0 0 = 16(decimal)

Convert the following Binary numbers into hex:


101011012
Answer :
1010 1101 (Binary)
A D (Hex)

1101112
Answer :
0011 0111 (Binary)
3 7 (Hex)

101011112
Answer :
1010 1111 (Binary)
A F (Hex)

53
1110101000012
Answer :
1110 1010 0001 (Binary)
E A 1 (Hex)

NB:To convert from denary to hexadecimal, it is recommended to just convert the number
to binary first. In summary, we can use the following rule: Hexadecimal <-> Binary <->
Denary

Convert the following decimal numbers into hex:


8710
Answer:
87(decimal)
0101 0111 (Binary)
5 7 (Hex)

1210
Answer:
12(decimal)
0000 1100 (Binary)
0 C (Hex)

11710
Answer:
117(decimal)
0111 0101 (Binary)
7 5 (Hex)
Why might you use Hexadecimal?
Answer:
So that it makes things such as error messages and memory address easier for humans
understand and remember
Give two uses of hexadecimal?
Answer:
 Error message codes
 Memory address locations

54
CHAPTER 5
NETWORKING AND NETWORK TOPOLOGIES

COMPUTER NETWORK
 A computer network is an interconnection of two or more computers that are able to
exchange information.
 The computers may be connected via any data communication link, like copper wires,
optical fibers, communication satellites, or radio links.
 The computers in a network may be located in a room, building, city, country, or
anywhere in the world.

TYPES OF NETWORKS
Computer network is broadly classified into three types:
o Local Area Network (LAN),
o Metropolitan Area Network (MAN),
o Wide Area Network (WAN).
A network consists of two or more computers that are linked in order to share resources
(such as printers and CDs), exchange files, or allow electronic communications.

PERSONAL AREA NETWORK


 A Personal Area Network or simply PAN, is smallest network which is very personal to
a user.
 This may include Bluetooth enabled devices or infra-red enabled devices. PAN has
connectivity range up to 10 meters.
 PAN may include wireless computer keyboard and mouse, Bluetooth enabled
headphones, wireless printers and TV remotes for example.

Piconet is an example Bluetooth enabled Personal Area Network which may contain up to 8
devices connected together in a master-slave fashion.

LOCAL AREA NETWORK (LAN)


 It is privately owned communication systems that cover a small area, say a building or a
complex of buildings.
 Length is about 10 meters to few kilometers and operates at a high speed like 10 MBPS
to 1000 MBPS.
 It has very low error rate.

55
Types of Local Area Networks:
o Client-Server Networks
o Peer-to-peer Networks

Client-Server Networks
 A client-server arrangement involves a server, which is a computer that controls the
network.
 The clients are all the other computers, which are connected to the server in the
network.
 It allow central computer to be used for administrative tasks such as network
management.

Peer-to-Peer networks
 The word peer denotes one who is equal in standing with another.
 A peer-to-peer LAN is one in which all microcomputers on the network communicate
directly with one another without relying on a server.
 Peer-2-peer networks are less expensive than client/server computing but slow under
heavy use.
 They are appropriate for networking in small group.

Advantages of LANs:
 Hardware such as printers can be shared so individual workstations do not need their
own printer.
 All the users’ work can be stored in a central place (the dedicated file server) so a user
can access their work through any computer on the network.
 Software can be shared; software packages are stored on the server and downloaded to
workstations as requested.
 Data can be shared because database files stored in the server are available to users
around the network; data from CD-ROMs can also be shared across the network.
 Central back-up can take place automatically at regular intervals.
 Messages can be sent to people working at other computers on the network which can
save time and paper.
 There is control over users’ access rights to programs and data.

Disadvantages of LANs:
 Printing can be slow. Where a lot of workstations are served by only one or two
printers, long print queues may develop.
 A virus can spread more easily. If a virus gets into one computer, it is likely to spread
quickly across the network because it will get into the central backing store.
 As data is shared there is a greater need for security. Users of the network have to have
authentication techniques such as user ids and passwords.
 If the server fails, all the workstations are affected.

56
 The cost of installing the equipment is greater. Cabling can be expensive to buy and to
install.
 Damage to cables can isolate computers. Some sections of the network can become
isolated and will not be able to communicate with the rest of the network.

METROPOLITAN AREA NETWORK (MAN)


 It is public or privately owned communication system that typically covers a complete
city.
 Speed is about 10 MBPS and follows DQDB (Distributed Queue Double Bus) standard.
 Its reliability is moderate.
 Cable television connection in a city is a good example for MAN

Advantages
 The data transfer is high at 1000 mbps.
 The expense is relatively economical in metropolitan network.
 Rapid transfer and sharing of files
 Easy upgrade of programs at a relatively lower cost
 Security of programs and other important information
 Centralized software management,
 Easy share of resources,
 email,
 Flexible access and workgroup computing

Disadvantages
 complex technology and installation
 Fiber optical cable, adaptors and concentrators are costly

WIDE AREA NETWORK (WAN)


 It covers a large geographical area and usually owned by a state.
 Data transfer rate is low (few KBPS to 10 MBPS)
 Error rate is much higher.

Types of Wide Area Networks:


o Value Added Networks (VAN)
o Internet

Value Added Network (VAN)


 A Value Added Network (VAN) is a semipublic network that provides additional
services beyond the simple communication of information from one place to another.
 A VAN operates at a greater speed than public network, and offer high security.

57
Internet
 Is a network of networks
 There is no single authority that controls the net overally.

Disadvantages of WANs:
 Again these are similar to those of LAN's except that issues such as security become
even more important as potential hackers could break into a computer system from
anywhere in the world.
 Encryption to secure data such as financial transactions is necessary because it is even
easier to intercept data.

Difference between LAN and WAN:


o A LAN is restricted to a limited geographical coverage of a few kilometres, but WAN
spans greater distance and may operate nationwide or even worldwide.
o Data communication speed is much higher in LAN than in WAN.
o Fewer data transmission error occurs in case of a LAN as compared to WAN. This
mainly because in case of a LAN, the distance covered by the data is small compared to
WAN.

Advantages of Installing a Network


 Speed. Networks provide a very rapid method for sharing and transferring files.
 Security. Also, passwords can be established for specific directories to restrict access to
authorized users.
 Centralized Software Management. One of the greatest benefits of installing a
network is the fact that all of the software can be loaded on one computer (the file
server).
 Resource Sharing. Sharing resources is another advantage of networks.
 Electronic Mail. E-mail aids in personal and professional communication for all
personnel
 Flexible Access. College networks allow students to access their files from computers
throughout the school.
 Workgroup Computing. Collaborative software allows many users to work on a
document or project concurrently.

Disadvantages of Installing a School Network


 Expensive to Install. Although a network will generally save money over time, the
initial costs of installation can be too expensive.
 Requires Administrative Time. Proper maintenance of a network requires
considerable time and expertise.
 File Server May Fail. When the files server "goes down," the entire network may come
to a halt. When this happens, the entire organisation may lose access to necessary
programs and files.

58
 Cables May Break. Some of the configurations are designed to minimize the
inconvenience of a broken cable; with other configurations, one broken cable can stop
the entire network.
 Must Monitor Security Issues.

Network Protocols
A protocol is a set of rules that governs how communication between two devices will
occur. Such devices might be computers themselves, between modems.
A network communication protocol: a standard method for transmitting data from one
computer to another across a network. Some of the protocols that we are going to look at
are:
i. TCP/IP (Transmission Control Protocol Internet Protocol)
TCP: It ensures that data is transmitted accurately
IP: It ensures that data is transmitted to its correct address (IP address). Every device on
the internet has its IP address. It also ensures that packets are rearranged to the original
message on arrival of their destination.

ii. HTTP (HyperText Transfer Protocol)


This is a protocol that defines the process of identifying, requesting and transferring
multimedia web pages over the internet. It is used for transferring data across the internet,
usually between servers and computers on the internet. It is based on the client –server
relationship. It uses TCP/IP to transmit data and messages

iii. FTP (File Transfer Protocol)


it is a protocol used to transfer data from one computer to another. It is often used to
download software from the internet, and it uses the TCP/IP protocol in doing this.
However, FTP has no security to data as the data is not encrypted prior to its transmission.

iv. TELNET
This is a network protocol that allows a computer user to gain access to another computer
and use its software and data, usually on a LAN and on the Internet. It allows users to
access data stored on servers from their terminals. Telnet allows computers to connect to
each other and allows sharing of data and files. Telnet has security problems especially on
the internet.

v. VoIP (Voice Over Internet Protocol)


It is a method of using the internet to make ordinary voice telephone calls. Thus it is a way
of having phone conversations using the internet as a way of communication. By VoIP,
international and long distance calls are of the same price as local calls and sometimes are
for free. However, the system does not offer emergency calls. An example of VoIP is Skype.

59
Transmission control

Open Systems Interconnection (OSI) Model


 Term “open” denotes the ability to connect any two systems which conform to the
reference model and associated standards.
 The OSI model describe show information or data makes its way from application
programmes(such as spreadsheets) through a network medium(such as wire) to
another application programme located on another network.
 The OSI reference model divides the problem of moving information between
computers over a network medium into SEVEN smaller and more manageable
problems.
 This separation into smaller more manageable functions is known as layering.

OSI Reference Model: 7 Layers

PHYSICAL LAYER
 Provides physical interface for transmission of information.
 Defines rules by which bits are passed from one system to another on a physical
communication medium.
 Covers all‐mechanical, electrical, functional and procedural ‐aspects for physical
communication.
 Such characteristics as voltage levels, timing of voltage changes, physical data rates,
maximum transmission distances, physical connectors, and other similar attributes
are defined by physical layer specifications.
DATA LINK LAYER
 Data link layer attempts to provide reliable communication over the physical layer
interface.
 Breaks the outgoing data into frames and reassemble the received frames.
 Create and detect frame boundaries.
60
 Handle errors by implementing an acknowledgement and retransmission scheme.
 Implement flow control.
 Supports points‐to‐point as well as broadcast communication.
 Supports simplex, half‐duplex or full‐duplex communication.
 The data link layer provides reliable transit of data across a physical link by using
the Media Access Control (MAC) addresses.
 The data link layer uses the MAC address to define a hardware or data link address
in order for multiple stations to share the same medium and still uniquely identify
each other.
 Concerned with network topology, network access, error notification, ordered
delivery of frames, and flow control.
 Examples :- Ethernet, Frame Relay, FDDI.
NETWORKLAYER
 Implements routing of frames (packets) through the network.
 Defines the most optimum path the packet should take from the source to the
destination
 Defines logical addressing so that any end point can be identified.
 Handles congestion in the network.
 Facilitates interconnection between heterogeneous networks (Internetworking).
 The network layer also defines how to fragment a packet into smaller packets to
accommodate different media.
TRANSPORT LAYER
 The transport layer regulates information flow to ensure end-to-end connectivity
between host applications reliably and accurately.
 The transport layer segments data from the sending host's system and reassembles
the data into a data stream on the receiving host's system
 Purpose of this layer is to provide are liable mechanism for the exchange of data
between two processes in different computers.
 Ensures that the data units are delivered error free.
 Ensures that data units are delivered in sequence.
 Ensures that there is no loss or duplication of data units.
 Provides connectionless or connection oriented service.
 Provides for the connection management.
 Multiplex multiple connections over a single channel.
SESSION LAYER
 Session layer provides mechanism for controlling the dialogue between the two end
systems. It define show to start, control and end conversations (called sessions)
between applications.
 This layer requests for a logical connection to be established on an end‐user’s
request.
 Any necessary log‐on or password validation is also handled by this layer.
 Session layer is also responsible for terminating the connection.
 This layer provides services like dialogue discipline which can be full duplex or half
duplex.

61
 This includes the control and management of multiple bi-directional messages using
dialogue control.
 It also synchronizes dialogue between two hosts' presentation layers and manages
their data exchange.
 Session layer can also provide check‐pointing mechanism such that if a failure of
some sort occurs between checkpoints, all data can be retransmitted from the last
checkpoint.
PRESENTATION LAYER
 Presentation layer defines the format in which the data is to be exchanged between
the two communicating entities.
 The presentation layer ensures that the information that the application layer of one
system sends out is readable by the application layer of another system.
 If necessary, the presentation layer translates between multiple data formats by
using a common format.
 Also handles data compression and data encryption (cryptography).
APPLICATION LAYER
 Application layer interacts with application programs and is the highest level of OSI
model.
 Application layer contains management functions to support distributed
applications.
 Examples of application layer are applications such as file transfer, electronic mail,
remote login etc.
 It differs from the other layers in that it does not provide services to any other OSI
layer, but rather, only to applications outside the OSI model.
 Examples of such applications are spreadsheet programs, word processing
programs, and bank terminal programs.
 The application layer establishes the availability of intended communication
partners, synchronizes and establishes agreement on procedures for error recovery
and control of data integrity.

A message begins at the top application layer and moves down the OSI layers to the
bottom physical layer.

TCP/IP MODEL
Transmission Control Protocol/Internet Protocol
 The Internet protocol suite is the networking model and a set of communications
protocols used for the Internet and similar networks.
 TCP takes care of the communication between your application software (i.e. your
browser) and your network software.
 TCP is responsible for breaking data down into IP packets before they are sent, and
for assembling the packets when they arrive.
 TCP/IP provides end-to-end connectivity specifying how data should be formatted,
addressed, transmitted, routed and received at the destination.
 IP is responsible for sending the packets to the correct destination.

62
APPLICATION LAYER
 Application layer protocols define the rules when implementing specific network
applications.
 The application layer contains all protocols for specific data communications
services on a process-to-process level. For example, the Hypertext Transfer Protocol
(HTTP) specifies the web browser communication with a web server.
 TCP/IP application layer is equivalent to the combined OSI Session, Presentation
and Application layers.
 It contains all the higher level protocols. The data unit created at this layer is called
a message.
 It relies on the underlying layers to provide accurate and efficient data delivery.
 Typical protocols are:
 FTP – File Transfer Protocol: For file transfer
 Telnet – Remote terminal protocol: For remote login on any other computer on the
network
 SMTP – Simple Mail Transfer Protocol: For mail transfer
 HTTP – Hypertext Transfer Protocol: For Web browsing

TRANSPORT LAYER
 Transport Layer protocols define the rules of dividing a chunk of data into segments
and then reassemble segments into the original chunk.
 Handles all error detection and recovery.
 It uses checksums, acknowledgements and timeouts to control transmissions and
end to end verification.
 The transport layer handles host-to-host communication.
 Unlike the OSI model, TCP/IP treats reliability as an end-to-end problem.
 Typical protocols are:
• TCP – Transmission Control Protocol: Provide functions such as reordering
and data resend.
• UDP – User Datagram Protocol: Use when the message to be sent fit exactly
into a datagram and Use also when a more simplified data format is required.
• SCTP - Stream Control Transmission Protocol: The Stream Control
Transmission Protocol (SCTP) provides support for newer applications such
as voice over the Internet.
NETWORK LAYER/INTERNET LAYER
 Network layer protocols define the rules of how to find the routes for a packet to the
destination
 It only gives best effort delivery. Packets can be delayed, corrupted, lost, duplicated,
out-of order.
 The internet layer (IP) connects independent networks, thus establishing
internetworking.
 IP – Internet Protocol: Provide packet delivery
• ARP – Address Resolution Protocol: Define the procedures of network
address / MAC address translation i.e The Address Resolution Protocol (ARP)
is used to associate a logical address with a physical address. ARP is used to
find the physical address of the node when its Internet address is known.
63
• RARP – Reverse Address Resolution Protocol: The Reverse Address
Resolution Protocol (RARP) allows a host to discover its Internet address
when it knows only its physical address.
• ICMP – Internet Control Message Protocol: The Internet Control Message
Protocol (ICMP) is a mechanism used by hosts and gateways to send
notification of datagram problems back to the sender.
• IGMP – Internet Control Message Protocol: The Internet Group Message
Protocol (IGMP) is used to facilitate the simultaneous transmission of a
message to a group of recipients.
PHYSICAL AND DATA LINK LAYER
 At the physical and data link layers, TCP-IP does not define any specific protocol.
 Rather, it supports all the standard protocols.
 The link layer contains communication technologies for a single network segment
(link) of a local area network.

NETWORK TOPOLOGIES
 Refers to the way in which computers and other networked devices are interconnected

or arranged.
 The following are types of network topologies:

o Bus
o Star
o Ring
o Mesh
o Hybrid
Bus Topology
 It is also known as a linear bus because computers are attached or connected to a single
linear cable called a trunk or backbone.
 Computers on the bus network communicate by sending packets of data to each other.

64
 A computer will send a packet of data to all computers on the network (broadcast).
Each computer listens and examines every packet on the wire to determine if the packet
is intended for it, and accepts only packets addressed to it.
 The bus topology is a passive topology because computers on the network are not
actively involved in the movement of data. The number of computers on the network
affects network performance. Performance degrades as more computers are added to
the bus network.
 An Ethernet bus (the most common type of local area network) can have a maximum
length of 185 metres and a maximum of 30 nodes. Note that there must be ‘terminators’
at either end of the cable – preventing the signals being reflected back down the cable.

Backbone/trunk

Terminator Terminator

Advantages
 It uses the least amount of cable and is easy to expand without disrupting the network.
 It is relatively simple, inexpensive and reliable.
 Failure of one node does not bring the whole network down.

Disadvantages
 The whole network goes down if the main cable fails at any point.
 Network performance degrades under a heavy load (maximum computers on an
Ethernet bus is 30)
 It is difficult to troubleshoot and isolate problems.
 Vulnerable to data collision e.g Ethernet

Star Topology
 A star topology is one in which each node is connected directly to a central hub using its
own, dedicated cable.
 All communications between workstations go through a central device, which can be a
hub, switch or repeater.
 It is now the most common topology used within LANs and many WANs
 Cabling faults are easy to locate because the hubs usually use Light Emitting Diodes
(LED) to indicate working connections;
 There is greater security of transmissions if a ‘switch’ is used as the hub

65
 The network requires more cables because each computer requires a cable segment to
connect to the central device.
 If a computer fails or the cable segment that connects the computer to the hub is
broken, only that link is affected the rest of the network continues to function normally.

Advantages
 If one cable fails, the other stations are not affected
 Simple to isolate faults
 Consistence performance even when the network is being heavily used
 Reliable, market proven system
 No problems with ‘collisions’ of data since each station has its own cable to the server
 Easy to add new stations without disrupting the network

Disadvantages
 May be costly to install because of the length of cables required.
 When the hub or central terminal fails the whole system will be disrupted

Ring Topology
 A ring network is one in which the nodes are linked in a closed loop and the data is
transmitted in a single direction around the loop.
 There are Repeaters at each node to ‘boost’ the data signals as they pass around the
ring.
 The use of repeaters allows a ring network to cover larger distances than other types of
local area network, and if using optical fibre cable, ring networks can span a distance of
up to 100 kilometres
 Computers on the ring network use a signal called a token to carry the data from one
computer to the other.
 The access method used by the computers to put data on the communication medium is
called token passing.
 Unlike the bus topology, the ring is an active topology. Each computer on the ring acts
as a repeater to regenerate/boost the signal and pass it to the next computer until it
reaches the destination computer.
 The receiving computer strips the data from the token and returns the token to the
sending computer with an acknowledgement.

66
 After verification, the token is released for use by any other computer requiring data
transfer.
 While the token is in use by one computer, other computers on the ring cannot
transmit, because only the computer with the token can transmit data.
 This ensures that there are no collisions and hence no times spend waiting for
computers to resend data after a collision.

Advantages
 There is no dependence on the central computer or file server
 Each node controls transmission to and from itself
 Transmission of messages around the ring is relatively simple and avoids ‘collisions’
because the transmission is in only one direction
 Very high data transmissions are possible

Disadvantages
 Extending an existing ring can be difficult because of the rewiring required.
 Not very secure because data travels all the way around the ring and so there are plenty
of opportunities for messages to be intercepted.
 If one computer fails, the whole network goes down.
Example of ring topology is token ring

Mesh Topology
 Apart from the three primary topologies, we also have the mesh topology.
 Each computer has a point-to-point connection to every other computer on the
network.
 Use a significantly larger amount of network cabling than the other network topologies,
which makes it more expensive.
 Every computer has multiple possible connection paths/routes to the other computers
on the network as a result; a single cable break will not stop network communications
between any two computers.

67
The total number of connections required can be calculated using the following formula:
Number of connections = n*(n-1)/2
Where n is the number of stations.

Hybrid Topology
 A hybrid topology is a combination of any two or more network topologies in such a
way that the resulting network does not have one of the standard forms.
 A hybrid topology is always produced when two different basic network topologies are
connected.
 Hybrid networks use a combination of any two or more topologies in such a way that
the resulting network does not exhibit/show one of the standard topologies (e.g., bus,
star, ring, etc.).
 Two common examples for Hybrid network are: star ring network and star bus network
 A Star ring network consists of two or more star topologies connected using a multi-
station access unit (MAU) as a centralized hub.
 A Star Bus network consists of two or more star topologies connected using a bus trunk
(the bus trunk serves as the network's backbone).

Network Devices, Uses and Characteristics


Switches
 Intelligent device which sends data to particular port
 A switch receives a frame and regenerates each bit of the frame onto the appropriate
destination port
 Used to segment a network into multiple collision domains
 Provides dedicated bandwidth on each port
 Reduces collision on a LAN, each port on the switch creates a separate collision domain
 Can also be used to interconnect segments of different speeds
 Often used in a star or tree topology
 Usually configured with 8, 12, or 24 RJ-45 ports
 Sold with specialized software for port management
 Most common switching methods are:
o Cut-through: Directly forward what the switch gets.
o Store and forward: receive the full frame before
retransmitting it.
 OSI: Switches are on the data link layer that’s why they deal with frames instead of bits
and filter them based on MAC addresses.
 Able to filter data on a network

Bridge
 A bridge is a device that allows you to segment a large network into two smaller, more
efficient networks.
 A bridge monitors the information traffic on both sides of the network so that it can
pass packets of information to the correct location.
68
 A bridge monitors the information traffic on both sides of the network so that it can
pass packets of information to the correct location.
 Most bridges can "listen" to the network and automatically figure out the address of
each computer on both sides of the bridge.
 The bridge can inspect each message and, if necessary, broadcast it on the other side of
the network.
 The bridge manages the traffic to maintain optimum performance on both sides of the
network.
 It keeps information flowing on both sides of the network, but it does not allow
unnecessary traffic through.
 used to extend networks by maintaining signals and traffic
 In a comparison with switches, they are slower because they use software to perform
switching. They do not control broadcast domains and usually come with less number
of ports.
 Bridges can be used to connect different types of cabling, or physical topologies but
must be used between networks with the same protocol.
 OSI: Bridges are on the data link layer so in principle they are capable to do what
switches do like data filtering and separating the collision domain, but they are less
advanced.

Routers
 Are used to interconnect networks that use different technologies
 Have the ability to break broadcast domains and collision domains
 A router translates information from one network to another; it is similar to a super
intelligent bridge.
 They can have both LAN and WAN interfaces. Routers are used to connect different
LANs or a LAN with a WAN (e.g. the internet).
 Routers can direct signal traffic efficiently
 Can route messages between any two protocols
 Routers control both collision domains and broadcast domains. . If the packet’s
destination is on a different network, a router is used to pass it the right way, so
without routers the internet could not functions.
 Connects all computers from a LAN to internet using same IP.
 OSI: Routers work on the network layer so they can filter data based on IP addresses.
 They have routing tables to store network addresses and forward packets to the right
port.

Hubs
 Receives a signal, regenerates it, and sends the signal over all ports
 The ports use a shared bandwidth approach and often have reduced performance in the
LAN due to collisions and recovery
 A hub is a very simple (or dumb) device, once it gets bits of data sent from computer A
to B, it does not check the destination, instead, it forwards that signal to all other
computers (B, C, D…) within the network. B will then pick it up while other nodes
discard it. This amplifies that the traffic is shared.

69
 There are mainly two types of hubs:
o Passive: The signal is forwarded as it is (so it doesn’t need power supply).
o Active: The signal is amplified, so they work as repeaters. In fact they have been
called multiport repeaters. (use power supply)
 Hubs can be connected to other hubs using an uplink port to extend the network.
 OSI Model: Hubs work on the physical layer (lowest layer). That’s the reason they can’t
deal with addressing or data filtering.

Gateways
 Gateway is a generic term used to represent devices that connect two dissimilar
networks. Acts as translator.
 Are very intelligent devices which connect and translate data between networks with
different protocols or architecture, so their work is much more complex than a normal
router? For instance, allowing communication between TCP/IP clients and AppleTalk.
 OSI: Gateways operate at the network layer and above, but most of them at the
application layer.

THE INTERNET
Internet stands for INTERnational NETwork and it is a global (world-wide) connection of
computer networks for information sharing. On the internet, one is able to access data
stored on a server in any part of the world as long as it is connected to the internet itself.

Web page: an HTML document or page on the internet that contains information about an
organisation.
Website:-a collection of HTML documents at the same domain, often with a common name
and maintained and provide information of a single organisation and is found on the
internet. It is an HTML page/pages on the internet that contains information about an
organisation
Hyperlink: - an area of a web page, usually text or image, that contains a links to another
web page. It is usually underlined or has a different colour to show that it can link the user
to another site.
Home page: A web page that loads first (by default) when one logs on to the internet. It
then provides links to other sites on the internet. It is also a web page that appears first
when you log on to a website.
URL: Uniform Resource Locator: This is a unique address that identifies a website/page
on the internet, e.g. http://www.econet.co.zw. This only identifies one (unique) web page
for Econet Wireless which is found in Zimbabwe (.zw). Thus a URL is a unique address for
each web page. A typical URL looks like:
http://www.google.co.zw/computing/student.html.
This address has some a number of parts:
- http:// - protocol
- www. - host computer
- google.co.zw – Domain name and country
- computing – folder
- student. – Document name

70
- .html – document type (HTML type of document in this case)

Search Engines: These are programs used to search data, information and other websites
from the internet, e.g. Google, Yahoo, etc. however, it requires good skill from the user to
efficiently use search engines in searching data from the internet.

Hardware Requirements for an Internet Connection


- Modem (Modulator DEModulator):- a device that converts analogue data to digital
form and vice versa, often for internet connection using a telephone line. Alternatively one
may acquire a GPRS (general packet radio service) modem.
- Communication link: Acts as a transmission media for data, e.g. telephone line, satellite
transmission, etc.
- Network cards for each computer:- a device that identifies computers to the network, has
an interface where network cables are plugged on the computer

Software Requirements for an Internet Connection


These are: Communication Software, web browser and Network operating system
(a) Communication Software like TCP/IP – Transmission Control Protocol Internet
Protocol. Allows devices to connect to the internet even if they have different manufacturer
standards by use of pre-set rules or international standards.
(b) Web Browser: refers to software used for opening web pages on the internet, for
example Microsoft Internet Explorer, Netscape Navigator, Mozilla Firefox, Opera, etc.
(c) Network operating system: manages the network and offers security to internet
users.

Advantages of the Internet as a Source of Information


- Can be accessed from anywhere in the world.
- Information on the internet is up-to-date.
- Multimedia can be used.
- Huge amounts of information can be accessed; e.g., magazines, encyclopaedia,
dictionaries, newspapers, textbooks, etc.
- Search engines are available to assist in finding information.
- Using emails you can access experts from all over the world on certain subjects.

Disadvantages of the Internet as a Source of Information


- Equipment and connections needed are very expensive (computers, modems (ISDN
adapters) ISP, telephone).
- One needs knowledge to perform searches effectively.
- Problem of hackers.
- Breaches of copyrights are very common.
- Rampant spread of rumours on the internet.
- Spread of pornography to young people.
- Leads to loss of privacy.
- Some people become internet addicted and tend to interact with computers more than
with human beings.
71
- Credit card fraud is rampant.
- Cultural erosion and replacement of local culture by a global culture

72
CHAPTER 6

COMPUTER/INTERNET CRIME AND SECURITY

Security is concerned with protection of data from unauthorised access and from
deliberate or accidental loss.

ON- LINE CRIMES

Phishing and Pharming


Pharming
- Pharming is an attack by hacking. It intercepts a browser request and redirects it to another website
on which the attacker attempts to steal authentication credentials or debit or credit card details, as in a
phishing attack. It can be discouraged by changing the password on a router (especially a wireless
router) so that the hacker cannot redirect the DNS information.
-Pharming uses computer software, such as crimeware, malware or spyware, to collect
personal information from your computer and deliver it back to fraudsters.

When the consumer enters his or her personal log-in information, the criminals capture
this sensitive information and may use it for a variety of violations, including accessing
your accounts and making online purchases.
Since little or no participation on your part is necessary, and the redirect happens behind
the scenes, pharming is extremely difficult to detect.

- Spam is unwanted email, often advertising products or services. It can be prevented by using an
anti-spam filter, which is oft en provided automatically by an ISP.

Phishing
- Phishing is a way of fooling someone into handing over the security details for their bank
account. The phisher sends an email that looks as if it comes from the recipient’s bank and
contains a link to a website controlled by the phisher. It can be prevented by not clicking on
the link and instead going to the bank’s website directly.

Phishing attacks use both social engineering and technical subterfuge to steal consumers'
personal identity data and financial account credentials. Many phishing scams come
through emails with warnings such as "IMPORTANT: Account Verification" or
"Unauthorized Account Access". Sites such as PayPal and other popular purchase sites are
hijacked and these counterfeit websites are used to steal your information.

Social-engineering schemes use these 'spoofed' e-mails to lead consumers to counterfeit


websites designed to trick recipients into divulging financial data such as credit card
numbers, account usernames, passwords and social security numbers.

73
Sniffing:
-A program or device that captures vital information from the network traffic specific to a
particular network. Sniffing is a data interception technology
The objective of sniffing is to steal:
 Passwords (from email, the web, SMB, ftp, SQL, or telnet).
 Email text.
 Files in transfer (email files, ftp files, or SMB).
 There are other goals for sniffing like network maintenance.

Types of Sniffing:

There are two types of sniffing:


Passive sniffing: Sniffing through a Hub.
Active sniffing: Sniffing through a Switch.

Passive Sniffing:
 It is called passive because it is difficult to detect.
 “Passive sniffing” means sniffing through a hub.
 Attacker simply connects the laptop to the hub and starts sniffing.

Active Sniffing:
 Sniffing through a switch.
 Difficult to sniff.
 Can easily be detected.

Techniques for active sniffing:


 ARP (Address Resolution protocol) spoofing.
 MAC flooding.

SECURITY MEASURES
 Restriction of physical access to network media ensures that a packet sniffer cannot
be installed.

 The best way to be secured against sniffing is to use Encryption.

 Run ARPWATCH and notice if the MAC address of certain machines has changed
(Example: router’s MAC address).
 Run network tools like HP Open-View and IBM Tivoli network health check tools to
monitor the network for strange packets.

74
Spoofing
Spoofing, is a fraudulent or malicious practice in which communication is sent from an
unknown source disguised as a source known to the receiver.
Spoofing is most popular in communication mechanisms that lack a high level of security.

Spoofing attack Examples


a) Content Spoofing- Content spoofing is a hacking technique used to lure a user to
interact on a website that looks legitimate, but is actually a perfect copy of it.
Content spoofing is also common with email alerts, account notifications and so on.

b) Email Spoofing -Email spoofing is a fraudulent email activity hiding email origins.
The act of e-mail spoofing occurs when imposters are able to deliver emails by
altering emails' sender information. Simple Mail Transfer Protocol (SMTP) does not
provide any type of authentication process for persons sending emails.

c) Spoof Website - A spoof website is a site that uses dishonest designs to trick users
into thinking that it represents some other uninvolved party. Spoof websites
commonly imitate the sites of banks and other official businesses or government
agencies, often in order to fraudulently collect sensitive financial or personal
information from users.

d) IP Spoofing -IP spoofing refers to connection hijacking through a fake Internet


Protocol (IP) address. IP spoofing is the action of masking a computer IP address so
that it looks like it is authentic.

SECURITY MEASURES AGAINST SPOOFING

a) Filtering at the Router


b) Encryption and Authentication - Implementing encryption and authentication will
also reduce spoofing threats.
c) Eliminate all host-based authentication measures, which are sometimes
common for machines on the same subnet.
d) Upper layers - some upper layer protocols provide their own defense against IP
spoofing attacks.

75
Security Problem Solutions / safeguards
Hacking
- Use of passwords and (usernames) ids to prevent illegal access to
files.
- Locking the computer itself or locking the computer room.
- Encryption stops the information from being read even if access
has been gained to a file but won’t stop hacking!!
- Installing firewalls

Viruses
- Use ant-virus software like AVG, Avast, Esat NOD32, etc,
- Use firewalls to prevent viruses from entering a computer.
- Do not open emails/attachments from “unknown” sources;
- Only load software from disks/CDs which are originals

Corruption/Loss of Data due to the following ways:


- viruses Prevention of viruses is as given above
- hackers
- Prevention of hackers is as given above

- accidental damage to
data - Accidental damage to data can be prevented by: keeping back-
up files or use the Grandfather-Father-Son (GFS) method;
- use of passwords and ids can also help by restricting access in
the first place

- hardware faults
- protection against hardware faults could be through keeping
back-ups or use Grandfather-Father-Son;
- use of UPS (Uninterruptible Power Supply), in case of power
loss
- Running parallel systems also help

- software faults
- Software faults can be solved by keeping back-up files or

- incorrect computer
operation - Can also be solved by using Grandfather-Father-Son would help
- Incorrect computer operation can be solved by: backing up files
would guard against problems caused by incorrect shutting down
of the system

76
Hacking: Obtaining unauthorised access to protected and secure computer systems or
network, usually using intelligent methods like cracking the password.
Hacker: A person who gains unauthorised access to protected and secure computer
systems or network, usually using intelligent methods like cracking the password
Virus: A computer virus is a program which replicates itself, damages or corrupts files and
memory of the computer, for example, the Love Bug virus which attacked computers in
2000.
Anti-Virus: These are programs that detect and remove (clean) computer viruses and
reduce the risk of computers being attacked by viruses, e.g. Norton Antivirus, MacAfee,
Avira, Avast, AVG, etc.
Encryption: data encryption is the scrambling of data before sending, for security reasons,
so that it is not readable unless it is decrypted using. However, some government do not
allow encryption in their countries for security reasons against terrorism.

UPS: Uninterruptible Power Supply (A device with rechargeable batteries that provide
continuous supply of electricity to computers for a given period of time if there is power
cut.

Password: A password is a secret group of alphanumeric characters used to protect a


document or file from unauthorised access
PIN: Personal Identification Number- a secret number used by individual account holders
to access bank account and get service at the ATM, phone, Point of Sale terminal (POS)
using debit cards, etc.
Firewall: Hardware and associated software used to protect networked private computer
systems from unauthorised access by preventing outside data/users from entering the
system while at the same time preventing internal data from leaving the system.

Services Provided by the Internet


1. Electronic Mail (E-Mail): A form of communication in which written/typed messages
are send electronically over networked computers. In-order to send and receive e-mails,
the following is needed.
(a) An internet connection
(b) An E-mail Address for both the sender and receiver:

2. Teleconferencing: A method of conducting discussion with several people in different


locations using the telephone.
3. Video conferencing: Conducting meetings with several people in different locations and
seeing each other on the screen of networked computers. Video images and audio are
seen/heard in real time on large monitors/through speakers. Delegates do not need to
leave their homes or work places or conference rooms.
4. View data (videotext) systems: These are interactive systems on which users view
data when they access specialized databases like Prestel. The requirements include:
 the telephone line or cable TV,
 specialized keyboard and
 A Television set.

77
5. Teletext: It is a broadcast service that comes as a television transmission. It is cheaper
than the internet service. However, it is non-interactive.
6. Facsimile (Fax): A method whereby output from a scanned document is send over
telephone line and reproduce on a fax machine on the receiving end. Fax method has the
following advantages:
 It is very cheap to send messages.
 It is very easy to use.
 It is a very fast method of sending messages.

Advantages of e-mails as compared to ordinary mails


 It is very fast in sending messages (can be delivered promptly while ordinary mails
can take days to reach their destination).
 It is very cheap to send e-mails since there is no need for envelopes, stamps, paper
and pen, which are needed in conventional mail.
 They are reliable since e-mails rarely get lost.
 E-mails are time independent as they can be send any time of the day other than
conventional mails which can be send during the normal working hours.
 E-mails allow multiple addressing, that is, one e-mail message can be send to several
recipients simultaneously without having to retype it.
 E-mails can be saved for future use or reference.
 E-mails are more convenient to use as there is no need to travel to the post office or
to shops to buy stamps and envelopes.
 In e-mails, attachments in form of reports, scanned documents, pictures and
curriculum vitae can easily be attached to the e-mail.
 there are no language problems (systems can translate messages sent)
 - it is possible to read emails whenever you want – there are no issues of time
differences as would be the case with video conferencing. If some delegates lived in
the USA and the others lived in India, for example, the time difference is 10 to 14
hours which could be a problem)

Disadvantages of e-mail
 Not everyone has equipment to send e-mails.
 Junk mail (spam) is a problem.
 You waste a lot of time looking through mails that are just adverts.
 E-mails are not as secure as traditional mails.
 The system relies on people checking their mails regularly.
 Old people feel left out as they consider themselves too old to learn.
 Equipment used to send and receive e-mails is very expensive as compared to
traditional methods.

Advantages of tele and video conferencing


 It cuts transport cost incurred in travelling to the venue of the meeting.
 Reduces costs involving paying hotel bills and meals for the delegates.
 Saves time spend in travelling to the venue of the meeting.
 It becomes safer for employees since no travelling is done (no travelling accidents).

78
 There is no need for delegates to leave home/office.
 It becomes easier for several delegates to take part simultaneously.
 communication links are now much faster therefore images, sound quality etc. are
now far better
 safety reasons (increase in world-wide terrorist activity, frequent travelling, etc. are
all risks to company employees if they have to travel to meetings)
 improvements to the work/general environment (employees can work from home,
 Less travel means less stress to employees but also means less pollution, disabled
employees are no longer disadvantaged, etc.
 more economical to have short notice meetings

Disadvantages of video and tele-conferencing


 Communication expenses are very high.
 Hardware and software requirements are expensive.
 People will lack personal contact and will socialize less.
 The hardware and software needed to run video conferencing is very sophisticated
and expensive.
 Confidential documents may need to be seen in their original form, which may be
difficult in this situation
 There is no direct eye contact, which plays a large role in group discussions.
 The quality of video or audio may be low, depending on the bandwidth.
 There may be interruptions due to breakdowns in transmission
 Power cuts may prevent the conference from continuing.

Tele-commuting (Tele-working)
Tele and video conferencing as well as networking bring about tele-commuting (tele-
working). Tele-commuting is carrying out work without leaving home.

Benefits of telecommuting
- Easier to concentrate on work in a quiet environment than in a noisy office.
- It saves time spent in travelling to the work place thereby increasing productivity.
- It cut costs involved in travelling to work place.
- The employer saves costs of office space and overheads like water and electricity.
- People can be recruited from a wide geographical area.
- People with disabilities like the handicapped can be employed.
- People in different locations can work as a team.

Disadvantages of tele-commuting
- Workforce not in office is difficult to control.
- Workers would not understand corporate goals and will not be loyal to the organisation.
- Employees feel isolated and miss the environment of an office full of colleagues.
- People may find it difficult to work in teams.
- It is difficult to separate work from home duties while at home.
- Unions find it difficult to mobilize workers for demonstrations and strike.

79
7. File Transfer : allows users to transfer files from host computers on the internet to their
personal computers.
8. News groups: a global electronic bulletin board system in which users exchange
information on different topics.
9. Entertainment: the internet provides an option for users to download and listen to
music, newspapers, radio stations, etc.
10. Internet Shopping: (Internet buying, electronic commerce, online shopping): The
internet provides a facility for customers to purchase products from the internet without
visiting shops. Credit cards are used in internet buying.

Intranet
- Intranet stands for INTernal Restricted Access NETwork.
- Intranet refers to a restricted private organisation’s network that uses the same protocols
as internet for the benefits of such an organisation.
- An intranet is a computer network based on internet technology that is designed to meet
the internal needs for sharing information within a single organisation/company
-Intranet only gives local information relevant to the company/organisation
- It is possible to block access to certain sites using the intranet, e.g Facebook.
- it is not always necessary to have external modems when using intranets
- information for use on intranets is stored on local servers

Differences between internet and Intranet


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

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


organisation. It is an extension of the intranet giving authorized outsiders controlled access
to the intranet.

80
CHAPTER 7
DATA TRANSMISSION, TRANSMISSION MODES, TRANSMISSION MEDIA

Transmission Media
 It refers to the path that is used by data from one point to another, it can be either
physical wires or wireless (air).
 The data is sent from one computer to another over a transmission medium.
 The transmission media can be grouped into guided media, and unguided media.

Guided media,
 This refers to a specific physical path, through a wire or a cable.
 Copper wire and optical fibers are the most commonly used guided media.
 Copper wire transmits data as electric signals.
 Copper wires offer low resistance to current signal, facilitating signals to travel longer
distances.
 The guided types of transmission media are mostly cables. It's called "guided" because
the signal passing through it can only go in one direction: from the source to the
receiver.
 There are several subtypes, such as coaxial, which is most commonly associated with
cable products. Twisted-pair cables, such as those in phone lines and Ethernet cables
are a second subtype.
 Fiber optics is another example of guided transmission media, but these use light pulses
instead of electrical signals, which make them faster.
 The most common type of cable used in data communications is copper.
 There are different types of copper cable but they all share the feature of transmitting
data as an electrical signal. This gives rise to one of the weaknesses of this type of
media, which is that sending an electronic signal causes heat that is absorbed by the
media as the signal travels thus causing signal loss, i.e. attenuation.
 The faster the data transfer rate over copper cable the greater the possibility of signal
loss and interference.

Two main categories of copper cable:


o Coaxial
o Twisted pair

Coaxial Cable
In early networks coaxial cable was the cable of choice because it was relatively
inexpensive, reliable and robust. It consists of:
o A central conductor
o An insulator
o A braided metallic shielding
o An outer jacket

81
 The core of a coaxial cable carries the electronic signals
 The braided metallic shielding is used to protect the signal from external noise and
crosstalk that could cause interference and possibly corrupt the data.
 Due to this protection, coaxial cable is more resistant to interference and attenuation
than twisted pair cabling.

There are two types of coaxial cable:


o Thinnet cable (10Base2)
o Thicknet cable (10Base5)

Advantages
 It provides better immunity than twisted pair.
 This cable is able to transmit data at higher rates.
 Sufficient frequency range to support multiple channels, which allows for much greater
throughput.

Disadvantages
 High installation cost
 High maintenance cost.
 The thicker the cable, the more difficult to work with.

Twisted Pair Cable


 Twisted pair cable is the most common type of cable used in computer networks.
 It is reliable, flexible and cost effective.
 The twisting of the pairs of copper cable is one method used to protect the cable's
signals from interference and crosstalk. This type of protection is known as
cancellation.

There are two main categories of twisted pair cable:


 Unshielded Twisted Pair (UTP) Cable
 Shielded Twisted Pair (STP) Cable

82
Unshielded Twisted Pair (UTP) Cable

 A common implementation of UTP is 100BaseT, which allows for a maximum cable


length segment of 100 metres.
 There are different categories of UTP cable and one differentiation factor is the number
of twists per metre of cable.
 The more twists the higher quality the cable, i.e. there are less twists per foot in Cat3
compared to Cat5 UTP cable.
 Cat5 UTP cable is a popular choice for network cable because it meets the European
standard for allowing data transfer speeds of 100Mbps.

100BaseT stands for:


o Data Transmission Rate of 100Mbps, i.e. 100
o Uses baseband transmission, i.e. Base
o The media is twisted pair, i.e. the T.

 In unshielded twisted pair cabling, the twisted pair cable is not shielded.
 This telephone wiring is usually unshielded twisted pair cable. The main disadvantage
associated with this is low noise immunity. During a telephone conversation, noise and
interference from other electronic equipment takes the form of static and is rarely loud
enough to disrupt the call. But that same line can scramble a data transmission and
require the sending device to retransmit. An excessive number of such retransmissions
will reduce network efficiency.

Advantages
 Inexpensive
 Easy to install
 Can accommodate up to 1000 devices.
 Handled a data flow of up to approximately one megabit per second (Mbps) over
several hundred feet

Disadvantages
 Easy to tap
 Susceptibility/vulnerability to signal distortion errors
 Provide relatively low transmission rates over long distances.

Fiber Optic Cable

 Consists of glass or plastic fibres that carry data in the form of light signals. Unlike
copper cable there is no electricity, but it uses pulses of light.

83
 The cable cannot be tapped to detect signals.
 Fibre-optic cable is perfect for high speed, high quality data transmission, although it
suffers from a form of attenuation
 The reliability, security and distances covered by fibre optic cable make it the natural
choice as backbone cabling within buildings and between buildings.

 The glass or plastic used in fibre-optic cable is manufactured to be pure and without
any imperfections/faults/defects so that the light signal can travel without
hindrance/impediments over long distances, e.g km.

How it works?
 The fibres or threads are extremely thin strands; about as thick as human hair, coated
with two layers of highly reflective plastic that creates an internal mirror around the
strand.
 The outer sheath works as mirror causing an internal reflection that light cannot escape
from and is thus guided along bouncing off at shallow angles. This principle is known as
total internal reflection.
 At both ends of the fibre link there are photodiodes which must be in exact alignment in
order to prevent signal reflection. The means of placing the signal on the fibre can be
carried out by Light Emitting Diode (LED) or an Injection Laser Diode (ILD).

Advantages
 Immune to noise, electromagnetic interference and radio frequency interference. Thus
optical fiber systems are not affected by external noise.
 It can cover greater distances more reliably than wire (high bandwidth and capacity)
 It can handle greater speeds, e.g. 1000Mbps and upwards
 It cannot be compromised by signal tapping
 Lower signal attenuation (loss)
 Less restrictive in harsh environments
 The error rate for the data transmitted across fiber optic cable is very low.

Disadvantages
 It is not as robust/strong as wire
 It is more expensive to buy
 Fibers fragility/delicateness makes it more difficult to handle.
 It is more expensive to install
 It has to be installed by specialists

84
 The lack of standardization/consistency in the industry has also limited the acceptance
of fiber optics.

Unguided Media
 They are called unguided because it's possible to interrupt, or even walk through the
signal, in most cases without disrupting it.
 A wireless router broadcasts a constant radio signal over the air to your receiver. A
satellite does the same thing using microwaves. There are also laser-based transmitters,
which work like fiber optics, but without any physical cabling.

Unguided media relates to data transmission through the air and is commonly referred to
as wireless. The transmission and reception of data is carried out using antenna.
There are two main ways that antenna work:
 Directional (in a beam)
 Omni directional (all around)

Wireless media do not use an electrical or optical conductor. In most cases the earth’s
atmosphere is the physical path for the data.
The common types of wireless media that transmit data use electro-magnetic waves and are:
• Radio waves – the distances that can be covered by radio waves are dependent upon the
frequency, but can be hundreds of miles.

• Microwaves – these are transmitted at much higher frequencies than radio waves and
will provide better performance. Satellite dishes are often used with microwave
transmission where communication can be directly between two systems within the same
geographical area or it can make use of a satellite in geosynchronous orbit 50 000 km
above the earth.

• Infrared – this uses ‘invisible’ infrared light to transmit the data. Most household remote
controls (used with televisions and videos, etc.) use infrared transmissions. Infrared
transmissions are either ‘point-to-point’ or they can be reflected off walls and ceilings; they
cannot travel more than a few metres and they cannot pass through walls.

Bluetooth is one of the latest radio technologies that enables devices such as computers,
mobile phones, hands-free kits and other peripherals to be connected without cables up to
30 feet away. Like many modern wireless devices (including portable phones and wireless
computers) it uses waves with a frequency of 2.4 GHz.

Radio Transmission
 Radio transmission works with or without line of sight.
 If line of sight is possible then transmission can take place between sending antenna
and receiving antenna.

85
 The placement of antenna has to take into account the curvature of the Earth with
antenna being built taller accordingly. This will also allow for greater transmission
distances.
 If line of sight cannot be implemented then signals can be broadcast to the upper layers
or the atmosphere or space and then transmitted back to Earth.

Bluetooth
 Bluetooth is a wireless protocol for exchanging data over short distances from fixed and
mobile devices, creating personal area networks.
 There are two important parameters of Bluetooth devices - class and supported
profiles.
 "Class" signifies the distance at which a Bluetooth connection is possible. Most mobile
devices are Class 2, which means they have a range of up to 10 m. Class 1 devices are
rare and have a range of up to 100 feet.
 A "profile" is a type of Bluetooth connection. The most common are the Headset (HSP)
and Handsfree (HFP) profiles that enable the device to connect to a wireless headset or
handsfree.
 Created by telecom vendor Ericsson in 1994, it was originally conceived as a wireless
alternative to RS-232 data cables.
 It can connect several devices, overcoming problems of synchronization.
 Used for connecting mobile phones to other devices without cables.
 Bluetooth specification is for a complete system from physical layer to application layer.
 The basic unit of a Bluetooth system is a piconet, which consists of a master Node and
up to seven active slave nodes within a distance of 10 meters.

Wireless Fidelity (Wi-Fi)


 Short for "Wireless Fidelity." Wi-Fi refers to wirelessnetworking technology that allows
computers and other devices to communicate over a wireless signal.
 It describes all network components that are based on one of the 802.11 standards
 Wi-Fi is the standard way computers connect to wireless networks. Nearly all
computers now have built-in Wi-Fi cards that allow users to search for and connect to
wireless routers.

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

86
- PDAs (personal digital assistants).

Advantages of wireless communication


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

Disadvantages of Wireless Technology


- Wireless LAN speeds are slower than Net access at work due to narrow bandwidth.
- Anyone within the Wireless LAN nodes range with an appropriate device can use your
Wireless LAN and broad band link.
- Anyone who walks past your house or WLAN linked into a corporate system can access
sensitive information like credit card details.
- 3G phones are not compatible with 2G phones.
- Signals can be blocked, distorted or will be weak.
- Can lead to health problems from microwaves
- the range can be very limited, e.g. using Bluetooth.
- possible interference from nearby electronic devices
- security issues (i.e. tapping illegally into WiFi networks) is very common
- access speed/transfer rate is often slower using wireless systems

Worldwide Interoperability for Microwave Access (WIMAX)


 Is an IP based, wireless broadband access technology that provides performance similar
to Wi-Fi networks with large coverage and QOS (quality of service) of cellular networks.
 WiMAX is a wireless digital communications system, also known as IEEE 802.16, which
is intended for wireless "metropolitan area networks".
 WiMAX can provide broadband wireless access (BWA) up to 30 miles (50 km) for fixed
stations, and 3 - 10 miles (5 - 15 km) for mobile stations.

87
 In contrast, the WiFi/802.11 wireless local area network standard is limited in most
cases to only 100 - 300 feet (30 - 100m).
 With WiMAX, WiFi-like data rates are easily supported, but the issue of interference is
lessened.
 WiMAX operates on both licensed and non-licensed frequencies, providing a regulated
environment and viable economic model for wireless carriers.
 The primary advantages of the WiMAX standard are to enable the adoption of advanced
radio features in a uniform fashion and reduce costs for all of the radios made by
companies, who are part of the WiMAX Forum™ - a standards body formed to ensure
interoperability via testing.

What is the difference between Wifi and WiMax ?


 WiMAX is a long range system, covering many kilometers, that uses licensed or
unlicensed spectrum to deliver a point-to-point connection to the Internet from an ISP
to an end user.
 Wi-Fi is a shorter range system, typically hundreds of meters, that uses unlicensed
spectrum to provide access to a network, typically covering only the network operator’s
own property.
 Typically Wi-Fi is used by an end user to access their own network, which may or may
not be connected to the Internet.

Factors to Consider when choosing Transmission Media:


 Capacity: determining how much amount of information you need to communicate and
the speed with which you need to communicate that information will determine which
communications media you require.
 Reliability: addresses the guarantee of perfect service of your network.
 Cost: Communication media with greater capacity and reliability are more expensive.
 Distance: Knowing the extent of geographic distance that your network must cover will
also help you determine the most appropriate communication media. Some
communications media such as wire pair and microwave systems, only work well over
small distances, where as optical fiber, microwave, and satellite communications media
work well over great distances.
 Mobility: Finally, you need to consider the mobility of network users. Many
organizations today are equipping telecommuters with cellular phones so that they can
work anywhere without contact to an actual phone line.

Data Communication
Data communication is the transmission of electronic data over some media. The media
may be cables, microwaves.

88
Elements of Data Communication
Four basic elements are needed for any communication system.
 Sender. The computer or device that is used for sending data is called sender, source
or transmitter. In modern digital communication system, the source is usually a
computer.
 Medium. The means through which data is sent from one location to another is called
transmission medium. If the receiver and transmitter are within a building, a wire
connects them. If they are located at different locations, they may be connected by
telephone lines, fiber optics or microwaves.
 Receiver. The device or computer that receives the data is called receiver. The
receiver can be a computer, printer or a fax machine.
 Protocols. These are rules under which data transmission takes place between sender
and receiver. The devices follow some communication protocols to communicate and
exchange data.

Data Transmission
Data may be transferred from one device to another by means of some communication
media. The electromagnetic or light waves that transfer data from one device to another
device in encoded form are called signals. Data transmissions across the network can occur
in two forms i.e.:
 Analog signal.
 Digital signal.

Analog Signal:
 The transfer of data in the form of electrical signals or continuous waves is called
analog signal or analog data transmission. An analog signal is measured in volts and
its frequency is in hertz (Hz).

Advantages of Analog Signaling


 Allows multiple transmissions across the cable.
 Suffers less from attenuation.

Disadvantages of Analog Signaling


 Suffers from EMI.
 Can only be transmitted in one direction without sophisticated equipment.

Digital Signal:
 The transfer of data in the form of digits is called digital signal or digital data
transmission. Digital signals consist of binary digits 0 & 1. Electrical pulses are used
to represent binary digits. Data transmission between computers is in the form of
digital signals.

Advantages of Digital Signaling


 Equipment is cheaper and simpler than analog equipment.
 Signals can be transmitted on a cable bidirectional.
 Digital signals suffer less from EMI.

89
Disadvantages Digital Signaling
 Only one signal can be sent at a time.
 Digital signals suffer from attenuation.

Techniques of Data Communication


There are two possible techniques of sending data from the sender to receiver, i.e.:-
Parallel transmission.
Serial transmission.

Parallel Transmission.
 In parallel transmission each bit of character / data has a separate channel and all
bits of a character are transmitted simultaneously. Here the transmission is parallel
character by character.

Serial Transmission.
 In serial transmission, the data is sent as one bit at a time having a signal channel for
all the bits, i.e.:

Types of Serial Transmission

Asynchronous Serial Transmission


 Data is transmitted one bit at a time with start and stop bits at the beginning and the
end of each character. In this type of transmission, there is no fixed time
relationship with one character.

Advantages of Asynchronous Serial Transmission


 This type of transmission is very simple.
 This type of transmission is cheaper.

Disadvantages of Asynchronous Serial Transmission


 This type of transmission is slow.

Synchronous Transmission
 In this method a clock signal is used and the sending as well as the receiving devices
are synchronized with this clock signals. It doesn’t use start and stop bits but the
characters are sent in character groups called block

Advantages of Synchronous Transmission


 It is very fast as compared to Asynchronous Series Transmission.

Disadvantage of Synchronous Transmission


 It uses more expensive and complex equipment.

90
Modes of Data Communication
 The manner in which data is transmitted from one location to another location is called
data transmission mode.
 There are three ways or modes for transmitting data from one location to another.
These are:
(1) Simplex.
(2) Half duplex.
(3) Full duplex.

Simplex Mode
 In simplex mode, data is transmitted in only one direction.
 A terminal can only send data and cannot receive it or it can only receive data but
cannot send it. Simplex mode is usually used for a remote device that is meant only to
receive data.
 It is not possible to confirm successful transmission of data in simplex mode.
 This mode is not widely used. Speaker, radio and television broadcasting are examples
of simplex transmission, on which the signal is send from the transmission to your TV
antenna. There is no return signal.

Advantages of Simplex
 Cheapest communication method.

Disadvantage of Simplex
 Only allows for communication in one direction.

Half Duplex.
 In half duplex mode, data can be transmitted in both directions but only in one direction
at a time.
 During any transmission, one is the transmitter and the other is receiver. So each time
for sending or receiving data, direction of data communication is reversed, this slow
down data transmission rate.
 In half duplex modes, transmission of data can be confirmed.
 Wireless communication and Internet browsing are examples of half duplex.

91
Advantages of Half Duplex
 Costs less than full duplex.
 Enables for two way communications.

Disadvantages of Half Duplex


 Costs more than simplex.
 Only one device can transmit at a time.

Full Duplex.
 In full duplex mode, data can be transmitted in both directions simultaneously. It is a
faster mode for transmitting data because no time is wasted in switching directions.
 Example of full duplex is telephone set in which both the users can talk and listen at the
same time.

Advantage of Full Duplex.


 Enables two-way communication simultaneously.

Disadvantage of Full Duplex.


 The most expensive method in terms of equipment because of two bandwidth channels
is required.

92
CHAPTER 7

ALGORITHM DESIGN AND PROGRAMMING CONCEPTS

PROGRAM CONTROL STRUCTURES/ALGORITHM STRUCTURES


Program statements that affect the order in which statements are executed, or that affect
whether statements are executed, are called control structures. There are four control
structures.
 Sequential
 Selection
 Recursion
 Repetition.

 Sequential or linear structure is the construct where one statement is executed after
another. In simple terms it is a linear progression where one task is performed
sequentially after another.
A

 Selection (Decision) structure allows the program to make a choice between two
alternate paths, whether it is true or false. Thus is the construct where statements can
be executed or skipped depending on whether a condition evaluates to TRUE or FALSE.
There are three selection structures in C:
1. IF
2. IF – ELSE
3. SWITCH

YES NO

 Repetition (Looping) structure is the construct where statements can be executed


repeatedly until a condition evaluates to TRUE or FALSE. Causes an interruption in the
normal sequence of processing and directs the system to loop back to a previous
statement in the program, repeating the same sequence again.There are three
repetition structures in C:
1. WHILE
2. DO – WHILE

93
3. FOR

YES NO
Is..?

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

Repeat Until Loop While End while Loop


1 Loop body is executed when the Loop body is executed when the
condition set is FALSE until it condition set is TRUE until it becomes
becomes TRUE FALSE
2 Loop body is executed at least Loop body may not be executed at all
once
3 Condition is tested well after Condition is tested before execution of
execution of loop body loop body

 Recursion A recursive method is a method that calls itself either directly or indirectly.
There are two key requirements to make sure that the recursion is successful:
o Every recursive call must simplify the computation in some way.
o There must be special cases to handle the simplest computations.

Iteration Vs. Recursion


 Both iteration and recursion are based on a control structure: Iteration uses a
repetition structure; recursion uses a selection structure.
 Both iteration and recursion involve repetition: Iteration explicitly uses a repetition
structure; recursion achieves repetition through repeated method calls.
 Iteration and recursion each involve a termination test: Iteration terminates when
the loop-continuation condition fails; recursion terminates when a base case is
recognized.
 Iteration and recursion can occur infinitely: An infinite loop occurs with iteration if
the loop-continuation test never becomes false; infinite recursion occurs if the
recursion step does not reduce the problem in a manner that converges on the base
case.
 Recursion repeatedly invokes the mechanism, and consequently the overhead, of
method calls. This can be expensive in both processor time and memory space.

ALGORITHM
 A sequence of steps to solve a problem.

94
Characteristics of an Algorithm
 Well-ordered: the steps are in a clear order
 Unambiguous: the operations described are understood by a computing agent without
further simplification
 Effectively computable: the computing agent can actually carry out the operation

Method for developing an Algorithm


1. Define the problem: State the problem you are trying to solve in clear and concise terms.
2. List the inputs (information needed to solve the problem) and the outputs (what the
algorithm will produce as a result)
3. Describe the steps needed to convert or manipulate the inputs to produce the outputs.
Start at a high level first, and keep refining the steps until they are effectively
computable operations.
4. Test the algorithm: choose data sets and verify that your algorithm works!

FLOWCHART
 A flowchart is a pictorial representation of an algorithm in which the boxes represent
operations and the arrows represent the sequence in which the operations are
implemented.
 It is a graphical tool that diagrammatically depicts the steps and structure of an
algorithm or program
 The steps are drawn in the form of different shapes of boxes and the logical flow is
indicated by interconnecting arrows.
 The boxes represent operations and the arrows represent the sequence in which the
operations are implemented.

Symbols used

FLOW LINES CONNECTOR INPUT/OUTPUT PROCESS DECISION

 Process – Any type of internal operation: data transformation, data movement, logic
operation, etc.
 Connector – connects sections of the flowchart, so that the diagram can maintain a
smooth, linear flow
 Input/Output – input or output of data
 Terminal – indicates start or end of the program or algorithm
 Decision – evaluates a condition or statement and branches depending on whether the
evaluation is true or false
 Flow lines – arrows that indicate the direction of the progression of the program

95
General rules for flowcharts
 All symbols of the flowchart are connected by flow lines (note arrows, not lines)
 Flowlines enter the top of the symbol and exit out the bottom, except for the Decision
symbol, which can have flow lines exiting from the bottom or the sides
 Flowcharts are drawn so flow generally goes from top to bottom
 The beginning and the end of the flowchart is indicated using the Terminal symbol

Benefits of Flowcharts
o Makes Logic Clear
o Clear Communication
o Effective Analysis
o Useful in Coding
o Proper Testing and Debugging
o Appropriate Documentation

Limitations of Flowcharts
o Complex
o Costly
o Difficult to modify
o Difficult to update

Flowchart Symbols
• A flowchart uses special shapes to represent different types of actions or steps in a
process.
• Some standard symbols, which are frequently required for flowcharts, are:

PSEUDOCODE (or Program Design Language)


 Consists of natural language-like statements that precisely describe the steps of an
algorithm or program
 Statements describe actions3
 Focuses on the logic (sense) of the algorithm or program
 Avoids language-specific elements
 Written at a level so that the desired programming code can be generated almost
automatically from each statement
 Steps are numbered. Subordinate numbers and/or indentation are used for dependent
statements in selection and repetition structures4.
 It is an outline of a program, written in a form, which can easily be converted into real
programming statements.

Benefits of Pseudocode
o Pseudocode provides a simple method of developing the program logic as it uses
everyday language to prepare a brief set of instructions in the order in which they
appear in the completed program.
o Language independent
o Easier to develop a program from pseudocode than a flowchart

96
o Easy to translate pseudocode into a programming language
o Pseudocode is compact and does not tend to run over many pages
o Pseudocode allow programmers who work in different computer languages

PROGRAM DESIGN
Aims of program design
 Program designing must produce a program with less maintenance and debugging costs
later on.
 Therefore the aims are to produce a program with the following features:
- Readability: program must be easy for programmers to read and understand
- Reliability: program must always perform what is was designed to do.
- Maintainability: program must be very easy to modify or change when the need
arises.
- Performance: the program must be efficient and fast in performing whatever it was
designed to perform.
- Storage saving: program must occupy as little storage space as possible.

The Top-Down Approach


 With the top-down approach, we start with our top-level program, then divide and
sub-divide it into many different modules. The division process is known as stepwise
refinement. .
 After programming our smaller sub-modules, we will group them together into the
larger module. In the diagram, each level of refinement is labelled as LN.
 One advantage of the top-down approach is that we see the full picture at first.

The principles of top-down design


 The principles of top-down design dictate that a program should be divided into a main
module and its related modules.
 Each module should also be divided into sub modules according to software
engineering and programming style.
 The division of modules processes until the module consists only of elementary
processes that are intrinsically (basically) understood and cannot be further
subdivided.
 Top-down algorithm design is a technique for organizing and coding programs in which
a hierarchy of modules is used, and breaking the specification down into simpler and
simpler pieces, each having a single entry and a single exit point, and in which control is

97
passed downward through the structure without unconditional branches to higher
levels of the structure.
 NB# top-down programming tends to generate modules that are based on functionality,
usually in the form of functions or procedures or methods.
 In C, the idea of top-down design is done using functions. A C program is made of one or
more functions, one and only one of which must be named main. The execution of the
program always starts and ends with main, but it can call other functions to do special
tasks.

Advantages of modularisation (modular programming)


- Minimises coding since a module can be called many times from different modules
using parameters can be used to pass data within the program.
- Programmer can concentrate at one simpler task at a time.
- Modules are simpler and easier to understand and to solve.
- Modules are easier to test and to debug and therefore lessening testing time.
- Program modification is easier since changes are isolated with specific modules.
- Many programmers are employed, one on each of the modules.
- More experienced programmers can be assigned complex modules.
- It saves programming time by sharing tasks.
- A large project will be easier to monitor and control.
- It is easier to update (modify) modules than the whole program at larger.
- Fewer bugs since each set of programming commands is shorter
- Allows library programs to be inserted

Disadvantages of Modularisation
- Documentation will be long and thorough, therefore may take time to produce
- Can lead to problems of variable names as the modules are developed separately.
- However, it may be difficult to link the modules together.

*NB: Library programs: this refers to a collection of standard pre-written programs and
subroutines that are stored and available for immediate use by other modules in the
system.
-Library programs are required by other modules during execution, e.g. the Dynamic Link
Libraries (DLL) in the Windows environment.
-Libraries contain common tasks like saving, deleting, etc.

The Bottom-Up Approach


 The bottom-up approach, as the name suggests, starts from the bottom of our
structure and slowly gets to the top.
 To be more precise, we start by creating the smallest modules, put them together to
form larger modules, and continue the process until we have our whole thing built.
 This approach to programming is especially useful when we already have pre-made
modules at our disposal.

98
 Bottom-up algorithm design is the opposite of top-down design.
 It refers to a style of programming where an application is constructed starting with
existing primitives of the programming language, and constructing gradually more and
more complicated features, until the all of the application has been written.
 That is, starting the design with specific modules and builds them into more complex
structures, ending at the top.
 The bottom-up method is widely used for testing, because each of the lowest-level
functions is written and tested first.
 This testing is done by special test functions that call the low-level functions, providing
them with different parameters and examining the results for correctness. This process
continues, moving up the levels, until finally the main function is tested.

Types Error (Visual Basic)


In Visual Basic, errors (also called exceptions) fall into one of three categories: syntax
errors, run-time errors, and logic errors.

Syntax Errors
 Syntax errors are those that appear while you write code. Visual
 Basic checks your code as you type it in the Code Editor window and alerts you if you
make a mistake, such as misspelling a word or using a language element improperly.
 Syntax errors are the most common type of errors. You can fix them easily in the coding
environment as soon as they occur.
Note
The Option Explicit statement is one means of avoiding syntax errors. It forces you to
declare, in advance, all the variables to be used in the application. Therefore, when those
variables are used in the code, any typographic errors are caught immediately and can be
fixed.

Run-Time Errors
 Run-time errors are those that appear only after you compile and run your code.
 These involve code that may appear to be correct in that it has no syntax errors, but
that will not execute. For example, you might correctly write a line of code to open a file.
But if the file is corrupted, the application cannot carry out the Open function, and it
stops running.
 You can fix most run-time errors by rewriting the faulty code, and then recompiling and
rerunning it.

99
Logic Errors
 Logic errors are those that appear once the application is in use.
 They are most often unwanted or unexpected results in response to user actions. For
example, a mistyped key or other outside influence might cause your application to stop
working within expected parameters, or altogether.
 Logic errors are generally the hardest type to fix, since it is not always clear where they
originate.

100
CHAPTER 8

COMPUTER LANGUAGES AND LANGUAGE PROCESSORS

COMPUTER PROGRAMING LANGUAGES:


Since the invention of the computers, three types of computer language have evolved:
 Machine language
 Assembly language (Low Level Language) and
 High-level languages

Characteristics of a Good Language:


 Simplicity: - languages should provide a programmer with a clear, simple, and unified
set of concepts which can be easily grasped.
 Naturalness: A language should be problem-oriented..
 Efficiency: A programming language should be such that its programs are efficiently
translated into machine code, are efficiently executed, and acquire as little space in the
memory as possible.
 Compactness: User of a high level, problem oriented language should be able to
express intended operations concisely (in brief).
 Suitability to Environment: the language must also be made suitable to its
environment.
 Extensibility: A good programming language should also allow extension through
simple, natural, and elegant mechanism.

FACTORS TO CONSIDER WHEN CHOOSING A PROGRAMMING LANGUAGE


- Nature of the application, or the problem to be solved.
- Availability of suitable compilers/interpreters.
- Availability of needed facilities in the programming language for system
implementation.
- Availability of compatible hardware.
- Knowledge of the existing programmers.
- Cost of the programming language.
- Existing software with which to interact with.

Machine Language/Language of Zero and One:


 A program written in machine language is a sequence of 1's and O's.
 This is the fundamental language of a computer, because computer can only understand
the language of zero's and one's.
 Basic instruction consists of two parts. First part of the instruction represents the
operation code (what is to be done) and second part represents the operand to the
address (memory location address) where operand is located.
 Basic instruction set of the computer consists of add, subtract, multiply, divide, load,
store, read, write, and shift. Although machine language provides economy of

101
instructions but they are inconvenient to the user. They also require thorough
knowledge of computer hardware.

Advantages of Machine language:


 Fast: Programs written in machine language can be executed very fast by the computer.
This is mainly because machine instructions are directly understood by the CPU and no
translation of the program is required
 Mother Language: This the fundamental language of a computer zero's and one's
which is not further translated.
 Economy of Instructions: Basic instruction set of the computer consists of add,
subtract, multiply, divide, load, store, read, write, and shift. Machine language provides
all these instruction set.

Disadvantages of Machine Language:


 Machine Dependent: if a company decides to change to another computer, the
programmer may be required to learn a new machine language and would have to
rewrite all the existing programs.
 Difficult to Program: Although easily used by the computer, machine language is
difficult to program. It is necessary for the programmer either to memorize the dozens
of code numbers for the commands in the machine's instruction set or to constantly
refer to a reference card.
 Error Level: Since a programmer has to remember the operation code (OP code) and
he must also keep track of the storage location of data and instruction, it becomes very
difficult this frequently results in program errors. Hence, it is easy to make errors while
using machine code.
 Difficult to Modify: (debugging): It is difficult to correct or modify machine language
programs.
 Knowledge of Hardware Required: Since machine language is dependent, so the
programmer must be aware of a particular machines characteristics and requirements
as the program is written.
 Memory Management: A machine language programmer must know how his machine
works and should have a good knowledge of the logical structure of his computer in
order to write a good machine language program.
 Higher Program Preparation Cost: Writing programs in machine language requires
more time and efforts which ultimately leads to higher program preparation cost.

Assembly language:
 In assembly language, instructions, data and addresses are given in “mnemonics”,
symbols and labels that are readily understood by the human brain.
 This language uses symbolic codes for different operations.
 Assembly language can be translated into a machine language. A program which
performs this translation is called an “Assembler”.
 Machine and assembly languages, being machine dependent languages, they are called
“low-level “languages.

102
Assembly Language/Low level /Symbolic language
 In assembly language, instructions, data and addresses are given in “mnemonics”,
symbols and labels that are readily understood by the human brain.
 This language uses symbolic codes for different operations.
 Assembly language can be translated into a machine language. A program which
performs this translation is called an “Assembler”.
 Machine and assembly languages, being machine dependent languages, they are called
“low-level “languages.
 In other words, the computer manufacturers started providing English-like words
abbreviated as mnemonics (a technique of improving the memory) that are similar to
binary instructions in machine languages. The program is in alphanumeric symbols
instead of 1s and 0s. The ADD, SUB, MUL, and DIV are some symbols called mnemonics.
 The programs written in other than the machine language need to be converted to the
machine language. Translators are needed for conversion from one language to another.
Assemblers are used to convert assembly language program to machine language

Advantages of Assembly Language over Machine Language:


 Easy to Understand and use: Assembly languages are easier to understand and use
because mnemonic are used instead of numeric OP codes and suitable names are used
for data. The use of mnemonics means that comments are usually not needed; the
program itself is understandable.
 Easy to Locate and Correct Errors: (Debugging): While writing programs in
assembly language, fewer errors are made and those that are made are easier to find
and correct because of the use of mnemonics and symbolic field names.
 Easier to Modify: Assembly language programs are easier for people to modify than
machine language programs. This mainly because they are easies to understand and
hence it is easier to locate, correct, and modify instructions as and when desired.
 Lower Program Preparation cost: Writing programs in assembly language requires
less time and effort which ultimately leads to lower program preparation cost.

Limitations of Assembly Language:


The following disadvantages of machine language are not solved by using assembly
language:
 Machine Dependent: Because each instruction in the symbolic language is translated
into exactly one machine language instruction, assembly language are machine
dependent. That is, they are designed for the specific make and model of the processor
being used. A decision to change to another computer still usually requires learning a
new language and the conversion of all existing programs; a very expensive
undertaking.
 Knowledge of Hardware Required: Since assembly language are also machine
dependent, so the programmer must be aware of a particular machine's characteristics
and requirements as the program is written.
 Machine Level Coding: In case of an assembly language, instructions are still written at
the machine code level, that is, one assembler instruction is substituted for one machine
code instruction.

103
 Need of Translator: (Assembler): computer can only understand the language of 0, 1.
While symbols and addresses are used in assembly language which are not
understandable by the computer. To convert assembly language instructions into
computer readable form a translator is used. The type of translator which converts
assembly language into machine language is called assembler. Machine and assembly
languages being machine dependent, are referred to as low-level language.
 Slow as Compared to Machine Language: An extra step of translation of instructions
is added which slow the execution of the program written in assembly language.

High-Level Language/Procedure oriented language


 The program written in the high-level languages can be run on any computer which
supports these languages with little or no modifications.
 Thus HLL are machine independent since they ran on any computer without
modifications
 The structure of these languages is closer to that of a human language.
 The computer cannot directly understand a high-level language. It is translated into
machine language before it is executed by the computer. A set of programs used for
translation is called a “compiler” and “interpreter”.
 These languages are employed for easy and speedy development of a program.
 The programmer does not need to remember the architecture and registers of a CPU for
developing a program.
 Testing and debugging a program is easier than in the assembly language.

Advantages of High Level Language:


 Machine Independence: High-level languages are independent. This is very valuable
advantage because it means that a company changing computers will not be required to
rewrite all the programs that it is currently using.
 Easy to Learn and Use: (User Friendliness): These languages are very similar to the
languages normally used by us in our day-to-day life. Hence they are easy to learn and
use
 Fewer Errors: In case of high level languages, since the programmer needs not write all
the small steps carried out by the computer, he is much less likely to make an error.
 Lower Program Preparation Cost: Writing program in high level languages requires
less time and effort which ultimately leads to lower program preparation cost.
 No Worry about Addresses: one of the greatest advantages of the high level language
is that, it eliminates worry about address for instructions and data.
 Better Documentation: A high level language is designed in such a way that its
instructions may be written more like the language of the problem. Thus, the
statements of a program written in a high-level language can be easily understood by a
person familiar with the problem.
 Easier to maintain: Programs written in high level language are easier to maintain
than assembly language or machine language programs. This is mainly because they are
easier to understand and hence it is easier to locate, correct, and modifies instructions
as and when desired. Insertion or removal of certain instructions from a program is also

104
possible without any complication. Thus, major changes can be incorporated with very
little effort.

Limitations of High Level Languages:


Lack of Flexibility: because the automatic features of high level languages they are not
under the control of the programmer, they are less flexible than assembly/machine
language. This lack of flexibility means that some tasks cannot be done in a high-level
language or can be done only with great difficulty.

Difference between High Level Languages and Low Level Languages

High Level Language Low Level Language


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

Features of High Level Programming Languages


1. Programming Constructs
These are the basis from which high level languages are built. Programming
constructs includes:
(a) Control Structures
(i) If – Then – Else Construct
(ii) Case statement
(b) Looping Structures
(i) For – Next construct
(ii) Repeat – Until construct
(iii) While – Endwhile
2. Operators
Operators are used to manipulate data and they can be
(a) Arithmetic operators
e.g. b+c-d*e/f
(b) Logical operators
And, or, Not
(c) Assignment operators
=
(d) Comparison/relational operators
105
>, <, <=, >=, <>, Is
3. Identifiers
- An identifier is a unique label of a data item of element of a program and comprises
of one or more characters.
- Identifiers includes variable names, procedure names, constants, etc. Identifiers
must not be reserved words.
- Identifiers can be user defined as long as they are not reserved words.
4. Constants
- A constant is a data item (variable) whose value does not change during program
execution.
- Its value is fixed.
- Constants are used to represent data items with fixed values, e.g. the value of pi. In
VB 6.0, a constant is declared as shown below:

Public Sub compute_interest()


Const pi=3.14159
Dim rs As New Recordset
Dim rs_loanpay As New Recordset
……………..
……………….
……………..
End Sub

If the constant is a string value, it must be enclosed in quotes, e.g.


Const Name = “Mungazi”
In this case, the value of name will never change (when Name is declared as a
constant)

5. Variables
- A variable is a name given to a memory location that stores a certain value, which
may change (the value) during program execution.
- Variables can be field identifiers, e.g. surname is a valid variable name.
Rules for naming a variable
- Variables must not be reserved words.
- Variables must be unique in the procedure or program (if all are global).
- Variables are declared at the beginning or at some point inside the program code.
Every variable must be declared before use, otherwise an error is generated.
- Variable names, as are all identifiers, start with an alphabetic character.
- They can be one character or a string of characters.
- Variable names can be alphanumeric (combination of alphabetic and numbers).
- They must be one word and must be related to the data stored in them so that the
programmer cannot be confused, e.g. Surname should be variable that stores a
surname.
- If two words are used as a variable, they must be joined by and underscore ( _ ), with
no spaces between the words, e.g. Student_Surname, NOT Student-Surname.
- Alternatively, one may join the words as follows, StudentSurname.
106
- Variables can store numeric, character or string values and must be declared
appropriately.
- In Visual Basic 6.0, variables must be declared first before they are used. The
keyword Dim is used to declare variables, and each variable should have a data type,
e.g.

Dim number As Integer


Dim Name1 As String
Dim x, Number_1, AmountOwed As Integer
- The scope of variables can be global or local.
- Scope of a variable refers to the extent (within the program) that the variable is
recognised (used), especially in relation to other modules and functions within the
program.
- Constants can also be declared as global or local.
- In Microsoft Visual Basic variables have the following features:
 Must start with an alphabetic letter as the first character.
 Must be one word, no spaces allowed
 Must not contain a period (.), exclamation mark (!), or the characters @, &, $, #
in the name.
 can't exceed 255 characters in length.
 Must not be reserved words
 Must be unique. You can't repeat the same variable name within the same level
of scope. For example, you can't declare two variables named, age in the same
procedure

a. Global variables
- These are variables that are accessed and can be used by any procedure or function
within the same program.
- They are public variables
- The value of the variable exists throughout the program.
- Global variables are declared outside the procedure.
- In VB 6.0, global variables are declared as follows:
Public Sname As String
The word Public implies that it is a global variable.

b. Local variables
- These are variables that are defined within a procedure and that are accessible just
within the procedure they are declared.
- They are defined within the procedure.
- They are private variables
- The value of the variable only exists within the procedure it is defined.
- They are therefore local to that procedure in which they are declared and therefore
cannot be used (not accessible) by other procedures.
- Local variables are declared as follows:
Private Sname As String
Form Variables
107
6. Reserved words
- Reserved (key) words are identifiers with a pre-defined meaning in a specific
programming language, for example Dim, if, End, integer, As, etc. in Visual basic.
- Reserved words must not be used as variables.
- Each programming language has its own reserved words, which may differ from
other languages.
- translator program maintains a dictionary of reserved words
- if the reserved word used is not in this dictionary then an error has been made and
message may be given which suggests one close to spelling provided

7. Expressions
- An expression is a construct made up of variables and operators that makes up a
complete unit of execution.
Example:
NumberA = a+b-c*d
- The above is a statement. However, a+b-c*d is an expression found in a statement.
8. Statements
- A statement is a single instruction in a program which can be converted into machine
code and executed.
- A statement can just be one line of program code but in some cases a statement may
have more than one line.
- For example: Name = “Marian” is a statement.
Example 1
NumberA = a + b
- this is an assignment statement, that is, variable NumberA is assigned the sum of the
values of variables a and b. thus if a=2 and b = 3, NumberA is assigned the value 5.
- An assignment is an instruction in a program that places a value into a variable, e.g
total = a + b
- The above is just one line statement.
Example 2
If a>b Then MsgBox "a is bigger than b.", vbExclamation
- The above is a one line statement composed of if statement.
Example 3
If b < 0 Then
MsgBox "b is less than zero. Command cannot be executed", vbExclamation
Exit Sub
End If
- This is a statement (starting at the first if and ending at End If.
- This state comprises of other statements between it.

9. Block structure
- A block is a group of zero or more statements between balanced braces and can be
used anywhere a single statement is allowed. For instance
if (condition) Then ( begin block 1)

108
………………. (end block 1)

else (begin block 2)

……………….

End If (end block 2)

10. Functions
- A function is a self-contained module that returns a value to the part of the program
which calls it every time it is called/executed.
- A function can be just an expression that returns a value when it is called.
- A function performs a single and special task, e.g. generate a student number.
- Because they return a value, functions are data types, e.g. integer, real, etc.
- Functions can be in-built functions or user-defined functions.
- In-built functions are pre-defined procedures of a programming language that
returns a value, e.g. Val (returns a numeric value of a string), MsgBox (creates a
textbox on the screen), Abs (returns an absolute value of a number), etc.
- Visual Basic has in-built date functions, string functions, conversion functions, etc.
- A user-defined function is a procedure (module) that returns a value whenever it is
called. The structure of a user defined function is as follows:
Public Function count_rec(ByVal rs As Recordset) As Boolean
If rs.RecordCount <= 0 Then
MsgBox "There is no record in the table.", vbExclamation
count_rec = True
Else
count_rec = False
End If
End Function
- Note that a Function starts with the word Function and ends with the statement End
Function. This function returns a Boolean value (either true or false). The function
name as just after the word Function, i.e count-rec in the case above.

11. Procedures
- A self-contained module that does not return a value.
- Procedures usually starts with the key word Procedure and then procedure name,
e.g Procedure FindTotal. Procedures are user defined.
- The name of the procedure should be related to its task
- Each procedure name must be unique within the same program.

109
Language processors/translators and their characteristics

TRANSLATORS
- These are programs used to convert High Level Language programs as written by the
programmer (source code) into machine code that the computer can execute.

Source Code
- Refers to the program instructions written in English-like statements (High Level
Language) by the programmer, e.g. the Visual basic Code as typed by the programmer.
- Source code is human understandable language and cannot be understood by the
computer.
- This therefore needs to be translated into machine code (binary) which the computer
can understand.

Object Code
- Refers to a machine code version of a source code.
- All programs written in source code must be converted to object code for the computer
to understand them

Types of Translators
- Translators are in three types, which are assemblers, interpreters and compilers,
which are further explained below:

Compiler
- These are programs that convert a high level language program into its machine code
equivalent at one go (at once) and then run it, e.g. the COBOL compiler.
- Compiler must be present for compiling the program only and NOT during the running
process.
- Creates an object code version of the source code
- Once compiled, the program no longer needs conversion since the machine code version
is the one that will be run, until some changes are made to the program code.
- Compilers run faster when called and therefore may be held as library routines.
- Once compiled, the program can then be run even on a computer without the compiler
since the program will already be in machine code.
- The compilation processes involves many complex stages which will be looked later in
this course.

Functions of Compilers
- They check syntax errors in program statements.
- They allocate storage space to variables.
- Translate the whole program into machine code at one go.
- Run object code of the program.
- Produces a program listing which indicates position of errors in a program.
- Gives error messages to the user
- Finds wrong and reserved words of the program

110
- Determines wrong use of variables

Advantages of Compilers
- The object code can be saved on the disc and run when needed without the need for
compilation.
- Compiled programs run faster since only the object code is run.
- The object code can run on any computer, even those without the compiler. Therefore
compiled programs can be distributed to many users and used without any problems.
- The object code is more secure since can cannot be read without the need for reverse
engineering.
- Compilers indicate the line numbers with syntax errors and therefore assist
programmers in debugging programs.
- They are appropriate even for very large programs.

Disadvantages of Compilers
- Slower than interpreters for running programs for the first time.
- They can cause the computer to crash.
- Difficult to find errors in compiled program.
- There is need for lengthy recompilation each time an error is discovered.

Interpreter
- These are programs that translate and run one (command) instruction of a program at a time
before going to the next instruction until the end of the program, e.g. the BASIC interpreter.
- Interpreter must be present to run the program. It is used during program writing (coding)
because it easily aids in debugging.
- An interpreter translates one instruction at a time and then executes it.
- The translated program retains the source code.
- They do not produce the machine code version (object code) of a program; hence translation
is repeated every time the program is executed.
- If the program is run 100 times, translation for each instruction is also carried out 100 times.

Functions of Interpreters
- They translate each instruction in turn into machine language and run it.
- Allocates storage space to variables.
- They check syntax error in a program statement.
- Gives error messages to the user
- Finds wrong and reserved words of the program
- Determines wrong use of variables

Advantages of interpreters
- It is easy to find and correct syntax errors in interpreted programs.
- There is no need for lengthy recompilation each time an error is discovered.
- It is very fast to run programs for the first time.
- Allows development of small program segments that can be tested on their own without
writing the whole program.

111
- It is easier to partially test and debug programs, especially during the programming stage.
- It is very fast to run small programs.
- Individual segments can be run, allowing errors to be isolated
- Running will be necessary after very minor changes
- Continual compilation of whole code is wasteful/time consuming

Disadvantages of interpreters
- They are very slow in running very large programs.
- They do not produce an object code of a source code and hence difficult to use since
conversion takes place every time the program is run.

Assembler
 These are programs used to translate assembly language instructions (program) in
pneumonic codes and symbolic addresses into machine language instructions
before execution.
 Since each computer has its own assembly language, it also has its own assembler.
 Assembler programs are written either using assembly language, or using high level
languages like C.
 Assemblers are simpler to program as compared to compilers.
 An assembler performs the translation process in similar way as compiler. But
assembler is the translator program for low-level programming language, while a
compiler is the translator program for high-level programming languages

Uses of Assemblers
- The uses of assemblers include:
 They generate machine code that is equivalent to assembly language.
 They are used to check the validity of instructions, that is, checking for syntax errors
in an instruction.
 They also assign memory locations to variables.

Difference between Compiler and Interpreter


No Compiler Interpreter
1 Compiler takes entire program as input Interpreter takes single instruction as input.
2 Intermediate Object Code is Generated No Intermediate Object Code is Generated
3 Conditional Control Statements are Conditional Control Statements are
Executes faster Executes slower
4 Memory Requirement : More (Since Memory Requirement is Less
Object Code is Generated)
5 Program need not be compiled every Every time higher level program is
time converted into lower level program
6 Errors are displayed after entire Errors are displayed for every instruction
program is checked interpreted (if any)
7 Example : C Compiler Example : BASIC

112
Difference between Source Code and Object Code
Source Code:
1. Source Code is in the form of Text.
2. Source Code is Human Readable.
3. Source Code is generated by Human.
4. Source Code is Input Given to Compiler.

Object Code:
1. Object Code is in the form of Binary Numbers.
2. Object Code is in Machine Readable.
3. Object Code is generated by Compiler.
4. Object code is Output of Compiler.

113
CHAPTER 9

Logic Gates and Truth Tables

Logic Gates
 Logic gate A relatively simple, digital, electronic circuit that processes two-state signals
according to a logical rule. It has one or more inputs and a single output.
 Binary information is represented using signals in two states off or on which
correspond to 0 or 1, respectively.
 The manipulation/treatment of the binary information is done using logic gates.
 Logic gates are the hardware electronic circuits which operate on the input signals to
produce the output signals.
 Each logic gate has a unique symbol and its operation is described using algebraic
expression.
 For each gate, the truth table shows the output that will be outputted for the different
possible combinations of the input signal.
 Most logic gates have two inputs and one output.
 At any given moment, every terminal is in one of the two binary conditions low (0) or
high (1), represented by different voltage levels.
 In most logic gates, the low state is approximately zero volts (0 V), while the high state
is approximately five volts positive (+5 V).
 There are seven basic logic gates: AND, OR, XOR, NOT, NAND, NOR, and XNOR.
 Logic gates process signals which represent true or false. Normally, the positive supply
voltage +5V represent true and 0V represents false.
 Other terms which are used for the true and false states are shown in the table. It is best
to be familiar with them all.
Logic
States
True False
1 0
High Low
On Off
+5V 0V

NB: Gates are identified by their function: AND, OR, NOT, NAND, NOR, EX-OR and EX-NOR.
Capital letters are normally used to make it clear that the term refers to a logic gate.

The above said logic gates can be classified into following categories:
1. Basic Logic Gates
a. AND Gate
b. OR Gate
c. NOT Gate
2. Universal Gates

114
a. NAND Gate
b. NOR Gate
3. Combinational Gates
a. X-OR Gate
b. X-NOR Gate
The basic operations are described below with the aid of truth tables.

Basic Logic Gates


AND Gate
 If both of the inputs are high then the output is high
 A dot (.) is used to show the AND operation i.e. A.B. Bear in mind that this dot is
sometimes omitted i.e. AB.

OR Gate
 If at least one of the inputs is high the output is high
 A plus (+) is used to show the OR operation.

NOT gate

 If the input is high the output is lowor if the input is low the output is high It is also
known as an inverter. If the input variable is A the inverted output is known as NOT A.
This is also shown as A', or A with a bar over the top, as shown at the outputs.

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

115
**If at least one of the inputs is low then the output is high

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

**If both of the inputs are low the output is high

Combinational Gates X-OR Gate


The 'Exclusive-OR' gate is a circuit which will give a high output if either, but not both, of
its two inputs are high. An encircled plus sign (⊕) is used to show the X-OR operation.

**If all the inputs are not equal then the output is high

X-NOR Gate
The 'Exclusive-NOR' gate circuit does the opposite to the X-OR gate. It will give a low
output if either, but not both, of its two inputs are high. The symbol is an X-OR gate with a
small circle on the output. The small circle represents inversion.

**If all the inputs are equal then the output is high

116
Table 1: Logic Gate Symbols

Table 2 is a summary truth table of the input/output combinations for the NOT gate
together with all possible input/output combinations for the other gate functions.

Table 2: Logic gates representation using the Truth table

117
CHAPTER 10
Data Processing Systems

Distributed data processing system:


 Is a configuration in which many geographically dispersed computer systems are
connected by a telecommunication network, where messages, tasks, programs, data,
and other resources are transmitted between cooperating processors and terminals.
 Such an arrangement enables the sharing of many hardware and significant software
resources among several users who may be sitting far away from each other.

Advantages:
 It allows greater flexibility in placing true computer power at the location where it is
needed.
 Better computers resources are easily available to the end users.
 It facilitates quick and better access to data and information especially where distance
is a major factor.
 The availability of multiple processors in the network permits peak load sharing and
provides backup facilities in the event of equipment failure.
 User with access to nearby computer and databases may be able to react more rapidly.

Disadvantages:
 There are lack of proper security controls for protecting the confidential user programs
that are stored online and transmitted over network channels.
 Due to lack of adequate computing standard, it is not possible to link different
equipment produced by different vendors into a smoothly functioning network.
 Due to decentralization of resource at remote sites, management from central control
point becomes very difficult. This normally result in increased complexity.
 System reliability, flexibility, response time, vendor support, and the cost of
telecommunications facilities used, are some of the important factors that may
disappoint network users in some cases.
 Budget (availability of finance purchase equipment)

Batch Processing/ Offline Processing/ Stack Processing:


 In this mode data to be processed is accumulated over a period of time and processed
periodically.
 It is also known as stack processing because several jobs are stacked together and
processed in groups (batches) for efficient operations. It is used for office work like
accounts, payroll, etc.
 A group of similar (routine) transactions are processed in the same processing-run.
Input data could be entered into the system over a period of time, or at the same time.
But the actual processing of the data commences only when the transactions data
collection is complete and is held in transactions files.
 A classic example of batch processing is an organization's payroll. Typically, the wages
section records transaction into small batches (e.g. one per department). In this way,
most input data is in smaller collections.

118
 This mode was formerly the major form of processing. It is still the most logical
methods of dealing with large transactions volumes at a specific time.
Batch Processing
Advantages Disadvantages
 Error detection is simpler  The system is time-driven
 No special and so is not geared to rapid
hardware/software is action
needed (all computer  Preparing batches results in
systems should be able to duplication of efforts
adopt this).  Slow
 System design is simple  Delays decision making
 If necessary, some part may process
be processed now and the
remainder later.

Real-Time Processing/ Online Processing/ Interactive Processing:


 Each transaction is processed as soon as at it received, there is no waiting time for
accumulation of a batch of transactions.
 Complete which can receive and process data quickly are capable for real-time
processing. It is used where immediate response is required like, banks, inventory
systems, etc
Online processing
Advantages Disadvantages
 A higher level of customer  The system is relatively high-
satisfaction is achieved cost (in terms of hardware
 Information needed is obtained and software)
by adopting very simple  A high level of security is
procedures required
 Prompts and early information  System failure could causes
assists in improving and great organization problems
maintaining the quality of
management decisions

119
CHAPTER 11
DATABASE SYSTEM
DATABASE CONCEPTS
 Database: A collection of related information stored in a structured format.
 DBMS: Database management system. Is a program which lets you manage
information in databases.
 Conceptual data model - describes how data elements in the system are to be grouped
 Entity - thing of interest about which data is to be held e.g. student
 Attribute - property or characteristic of an entity
 Relationship - link or association between entities
 Entity-relationship diagram - diagrammatic way of representing the relationship
between the entities in a database
 Field: Fields describe a single aspect of each member of a table. A student record, for
instance, might contain a last name field, a first name field, a date of birth field and so
on.
 Foreign key: A key used in one table to represent the value of a primary key in a related
table. While primary keys must contain unique values, foreign keys may have
duplicates. For instance, if we use student ID as the primary key in a Students table
(each student has a unique ID), we could use student ID as a foreign key in a Courses
table: as each student may do more than one course.
 Primary key: A field that uniquely identifies a record in a table.
 RDBMS: relational database management system. a program which lets you manage
structured information stored in tables and which can handle databases consisting of
multiple tables.
 Record: a record contains all the information about a single ‘member’ of a table, in a
students’ table, each student’s details (name, date of birth, contact details, and so on)
will be contained in its own record. Records are also known as tuples in technical
relational database parlance.
 Relational database: A database consisting of more than one table. In a multi-table
database, you not only need to define the structure of each table, you also need to define
the relationships between each table in order to link those tables correctly.
 Report: A form designed to print information from a database (either on the screen, to
a file or directly to the printer).
 Table: A single store of related information. A table consists of records, and each record
is made up of a number of fields. Just to totally confuse things, tables are sometimes
called relations.
 Schema - different levels or views from which a database may be considered
 Secondary Key - not unique to each record but may be used to quickly locate a group of
records

Some of the alternative terminology used in database theory:


Table Relation File
Row Tuple Record
Column Attribute Field

120
- Bit: A single binary digit like 0 or 1.
- Byte: A group of eight bits representing a character for example 10010110
- Field: A specific category of information in a table (database), for example Surname, Date
of Birth, etc
- Record: A collection of related fields describing an entity, e.g patient.
- File: A collection of related records
- Database: A collection of related files

The Database Administrator (DBA):


 Maintains the data dictionary/phrase book.
 Provides users with a suitable interface to the data.
 Controls user access to the data via password and access permissions.
 Looks after data security including backup processes and disaster recovery plans.

What makes computerized databases much more popular than paper based or
traditional file approach?
Computerized Paper based/traditional file approach
Can hold vast amount of data Limited by physical storage space available
Very fast to find a specific record Time consuming to manually search through
all of the records
Easy to search for a specific record Difficult to search for a specific record
Can be used to analyse the data Very difficult to analyse the data
Data can be sorted using multiple criteria Difficult to sort data in more than one
e.g. ascending order criteria
Easier to update or amend a record e.g. Changes have to be done manually and data
customer address after moving house may end up untidy
Records are stored safely and they are Records can be lost or misfiled making it
available when needed hard to find them
The database can be kept secure by use of The only security would be locking up the
passwords records
Easy to make a back-up in case of data loss Difficult to make back-up because every
page would have to be rewritten

Advantages of a file based database


 All records are stored in one place
 Easy to understand
 You can use a single table in a DBMS to store it

Problems with the traditional file approach:-


 Data redundancy - same data duplicated in many different files
 Data inconsistency - when the same items of data are held in several different files, the
data should be updated in each file when it changes (if not -> data inconsistency)

121
 Program-data dependence - file format must be specified in each program. Changes to
the format of the data fields mean that every file which uses that program has to be
changed
 Lack of flexibility - for non-routine data it could take weeks to assemble data from
various files and write new programs to produce the required reports
 Non-sharable data - if two departments need the same data, either a second copy of the
data would be made (-> data inconsistency) or the same file used (adding extra fields
would mean programs would need to be changed to reflect the new file structure)
Databases – Advantages
 Data independence - changes to the data structure do not affect the programs that
access the data.
 No data duplication.
 Data is updated via a single input.
 Data consistency - because it is easier to update
 Ad hoc enquiries are possible through the use of a query language.
 It is easier to control access to the data by the users since data is in one place.

Databases – Disadvantages
 Databases are complex systems so they require considerable skills and expertise to
design and manage them.
 There will be greater impact if the system fails since every application that uses it is
affected.
 More complex recovery procedures are needed when then the system corrupts.
 Larger size than conventional file approach so may require more powerful computer
systems.
 If the data entered is wrong then all applications see the wrong data!
 Lack of security - all data in the database is accessible by all applications

DATABASE MODELS

The relational model


 A relational database is a collection of 2-dimensional tables which consist of rows and
columns. Tables are known as "relations", columns are known as "attributes" and rows
(or records) are known as "tuples".
 Tables / Relations are a logical structure therefore they are an abstract concept and
they do not represent how the data is stored on the physical computer system. Each
column / attribute in a relation represents an attribute of an entity. A single row / tuple
contains all the information (in the form of attributes) about a single entity.
 The "cardinality" of a relation is the number of row / tuples it has. The "degree" of a
relation refers to the number of columns / attributes in that relation. The order of
records and columns is irrelevant. Relations and columns should always be uniquely
named and therefore uniquely indentifiable. No duplicate rows occur in a single
relation.
122
 Each cell of a relation contains a single value or element which is atomic. This means
that arrays or lists, for example, would not be stored under a single attribute. Multi-
valued attributes are possible though but this involves a technique of referring to
another relation which holds these multiple values.

Figure 2. A hypothetical relational database model

Relational Database Vs Flat File


Relational databases Flat files
Less duplication of data as data does not Too much duplication of data since every
need to in every table table repeats data
Offer greater data integrity as there is little No data integrity is guaranteed due to too
chance of getting duplicate of data much duplication of data
Data is available to all users of the system as Data not available everywhere as there is
there are no problems of software no sharing of files
incompatibility. Thus users share files
Creates different user views within the No different user views are created
DBMS
Easy to access data from different table due
Difficult to access data from different files
to relationships between the tables as the files are not linked
Retrieval of records from different files is
Retrieval of records from different files is
faster slower
Better security of records is enhanced Less security of data from unauthorised
access
Promote program data independence There is program data dependence
There is centralised management of data No central data management, difficult to
which is more efficient manage and less security

123
Hierarchical Data Model:
 The hierarchical data model is the oldest database model.
 The general shape of this model is like an Organizational chart and used the tree as its
basic structure.
 Consists of a hierarchy of nodes, with a single node, called the root, at the highest level.
A node represents a particular entity. A node may have any number of children, but
each child node may have only one parent node.
 This kind of structure is often referred to as "Inverted Tree". The parent-to-child
creates one-to-many relationship, but the child-to-parent creates one-to-one
relationship.
 In hierarchical data model, records are arranged in a top-down structure.
 The nodes of the tree represent data records
 The relationships are represented as links or pointers between nodes.
 The figure 2.5 shows structure of a hierarchical data model for the 'University' system.
In this example, "University" is the root node and "Departments" are its children. Each
department is further divided into branches and so on.

FILE ORGANIZATION

TYPES OF FILE ORGANIZATION

o Serial
o Sequential
o Indexed Sequential
o Direct Access /Random Access

Serial File Organization


 A collection of records with no particular sequence
 Cannot be used as master but as temporary transaction file
 Records are stored in the order they are received. This means that new records are
stored at the end of the file.
 The entries were received in the order: Kettlewood, Queens Park, St Mary’s, Wilton
High, and WestOrling.

Centre Number Centre Name No of Candidates


27102 Kettlewood 85
38240 Queens Park 103
64715 St Mary’s 121
30446 Wilton High 156

124
12304 West Orling 105

 Note that the key field in this file would be Centre Number (it uniquely identifies each
school)
 Both disks and tapes can be used to store a file serially.

Sequential File Organization

 A collection of records stored in key sequence


 To add/delete a record youre-write the whole file to another disk
 Used as master files
 A sequential file is one in which the records are stored, one after the other, in the order
of the key field.
 The entries were added in the order: Kettlewood, Queens Park, St Mary’s, Wilton High,
West Orling but they are stored in the order of the key field – Centre Number:

Centre Number Centre Name No of Candidates


12304 West Orling 105
27102 Kettlewood 85
30446 Wilton High 156
38240 Queens Park 103
64715 St Mary’s 121

 As with a serial file, both tape and disks can be used to store a file sequentially and
access to the records must take place from the beginning of the file.
 Sequential files allow the records to be displayed in the order of the key field – this
makes the process of adding a record slower, but significantly speeds up searches.

 All records are stored in some sort of order (ascending, descending, alphabetical).
 The order is based on a field in the record. For example a file holding the records of
employeeID, date of birth and address. The employee ID is used and records stored is
group accordingly (ascending/descending).
 Can be used with both direct and sequential access.

Advantages
 Simple file design
 Very efficient when most of the records must be processed e.g. Payroll
 Very efficient if the data has a natural order

125
 Can be stored on inexpensive devices like magnetic tape.

Disadvantages
 Entire file must be processed even if a single record is to be searched.
 Transactions have to be sorted before processing
 Overall processing is slow

Direct (Random) File Organization


 records are stored and retrieved according to their disk address / relative position
within file
 to add, use the hashing algorithm to work out the appropriate memory location
 to delete, set flag = 0 but leave the value there, therefore space can be reused but is not
actually empty
 to search for a record continue until either the record is found or empty space is
encountered
 The records are stored randomly but each record has its own specific position on the
disk (address).
 With this method no time could be wasted searching for a file. Instead it jumps to the
exact position and access the data/information.
 Can only be used with direct access method.A random file would have to be stored on a
direct access backing storage medium e.g. magnetic disc, CD, DVD
 A random access file is one in which a record can be written or retrieved without first
examining other records.
 A random access file must be stored on disk and the disk address is calculated from the
primary key. In its simplest form a record with a primary key of 1 will be stored at block
1, a record with a primary key of 2 will be stored at block 2; a record with primary key 3
will be stored at block 3 etc:
It should be noted that this very simple method where [disk address] = [primary key] is
very inefficient in respect of disk space. For example:
o If the lowest primary key is 1001, then all the disk space below block 1001 will be
wasted.
o If there are some values which the primary key never takes (for example odd
values) – these storage spaces will be wasted.
 In order to be more efficient with the use of disk space, random access files calculate
disk addresses by using a hashing algorithm (also known as just hashing).

Indexed sequential file


 Each record of a file has a key field which uniquely identifies that record.
 An index consists of keys and addresses.
 An indexed sequential file is a sequential file (i.e. sorted into order of a key field)
which has an index.
 A full index to a file is one in which there is an entry for every record.

126
 Indexed sequential files are important for applications where data needs to be
accessed.....
o sequentially
o Randomly using the index.
 An indexed sequential file can only be stored on a random access device e.g. magnetic
disc, CD.
 The records is stores in some order but there is a second file called the index-file that
indicates where exactly certain key points. Cannot be used with sequential access
method.

Advantages
 Provides flexibility for users who need both type of accesses with the same file
 Faster than sequential

Disadvantages
 Extra storage space for the index is required

File Access Method


This is the way by which information/data can be retrieved. There are two methods of file
accesses:

o Direct/Random Access
o Sequential Access
o Serial Access

Direct Access
 In this access method the information/data stored on a device can be accessed
randomly and immediately irrespective to the order it was stored.

127
 The data with this access method is quicker than sequential access. This is also known
as random access method. For example Hard disk, Flash Memory
 Direct Access
• Also known as Relative Access
• Fixed length logical records
• No particular order for read and write
• Based on disk model of a file
• File viewed as a numbered sequence of blocks or records

 Direct Access
• Useful for immediate access to large volumes of data
• Most suitable for database applications
• Easy to read, write and delete a record

 Applications for Direct access


• Airline reservation system
• Customer account processing in a bank

Sequential Access
 In this access method the information/data stored on a device is accessed in the exact
order in which it was stored.
 Sequential access methods are seen in older storage devices such as magnetic tape.
 Sequential Access
• Simplest access method
• Information processed in order
• Most common
• Used by editors and compilers
• Based on a tape model of a file

 Applications for sequential access


• Payroll of employees
• Student data processing

Serial Access
 When a serial access medium is being used, the head that reads data from the storage
medium has limited freedom of movement. The only serial access medium is magnetic
tape.
 To read a particular record/file from a serial access medium, all of the data that comes
before the record/file must be scanned through. The tape head cannot move to a

128
particular record/file on the tape without reading through all of the other records that
come before it.
 Because of this it can take a very long time to locate a record/file on a tape and so tapes
are only used for specific applications such as backup and batch processing. For these
applications the speed of locating data is not important and the other advantages of
magnetic tapes outweigh the slow access speed.

Indexed Sequential Access:


 This access method is a slight modification of the direct access method.
 It is in fact a combination of both the sequential access as well as direct access.
 The main concept is to access a file direct first and then sequentially from that point
onwards.
 This access method involves maintaining an index. The index is a pointer to a block.
 To access a record in a file, a direct access of the index is made. The information
obtained from this access is used to access the file. For example, the direct access to a
file will give the block address and within the block the record is accessed sequentially.
 Sometimes indexes may be big. So hierarchies of indexes are built in which one direct
access of an index leads to access another index directly and so on till the actual file is
accessed sequentially for the particular record.
 The main advantage in this type of access is that both direct and sequential access of
files is possible.

129
CHAPTER 12
SYSTEMS ANALYSIS AND DESIGN

WHAT IS SYSTEM?
 A combination of resources working together to transform inputs into usable outputs.
 In a system the different components are connected with each other and they are
interdependent. For example, human body represents a complete natural system.
 The objective of the system demands that some output is produced as a result of
processing the suitable inputs.
 A well-designed system also includes an additional element referred to as ‘control’ that
provides a feedback to achieve desired objectives of the system.

SYSTEMS ANALYSIS AND DESIGN

This is a process of identifying problems of an existing system by analysing it and finding


the best solution to such a problem.
System users or the manager would have realized that the Information system is no longer
reflective of or satisfying the existing business aims and objectives.

This problem could be triggered by many factors, some of which are:


i. System users: they may be dissatisfied with the current system since they are the ones
who operate it. They will sent requests to have a new system or some modification to the
existing one.
ii. Top management: they may issue directives in order to meet new organisational
objectives. It can also be due to changes in management (new manager), new
requirements, etc.
iii. The need for improved operating efficiency: Errors in the existing systems may be
intolerable, especially to customers.
iv. Changes in technology: new hardware and software may force organisations to change
their ways of operation.
v. Change of government policies: new government laws and policies can force
organisations to change their systems
vi. The user could have changed his/her mind
vii. The business might have expanded or due to other reasons

The systems analyst


This is a person who identifies problems of the existing system and recommends the best
solution to such a problem.

The duties of a systems analyst are:


 Identifies the problems of the current system.
 Liaises with system users and determine their requirements.
 Finds out facts important to the design of the new system.
 Determines the human and computer procedures that will make up the system.
 Participates in the process of system implementation.

130
By performing such duties the systems analyst acts as:
i. A consultant: can be called or hired to identify problems in a system
ii. A supporting expert: draws together professional expertise concerning computer
hardware and software and their uses in business.
iii. An agent of change: bring new ideas into the organisation

Qualities of a systems analyst


 Must have good oral and written communication skills for all managerial levels of an
organisation.
 Must be able to work as a team.
 Must be well educated, with at least a degree.
 Must be well experienced in computers and at top managerial levels.
 Must have good managerial skills.
 Must be a problem solver and see problems as challenges.
 Must be self-motivated.
 Must be well disciplined.
 Must be able to work under pressure and meet deadlines.

THE SYSTEMS DEVELOPMENT LIFE CYCLE


 It refers to stages that are chronologically completed to develop a new or modified
computer system.
 It refers to the stages through which a system develops from ‘birth’ to ‘death’, that is,
from the moment the system is incepted until it is modified or replaced with a new
one.

The stages in the System’s Life-Cycle are as follows:


 Problem identification
 Feasibility Study (Initial investigation)
 Analysis (detailed investigation)
 System Design
 System Development and Testing
 System Implementation
 Review (Evaluation) and Maintenance

DEFINING THE PROBLEM


 The problem identification is a statement of the existing problems and description
of user requirements as outlined by the customer.
 An accurate problem definition is needed so that the developers know exactly what
is expected from the system. This means that the system that is delivered is going to
be what the customer expected.
 Without an accurately defined problem, it is likely that the software that is
developed will not fully satisfy the needs of the end users

131
FEASIBILITY STUDY
 A feasibility study is an initial investigation of a problem in order to ascertain
whether the proposed system is viable/feasible/practicable, before spending too
much time or money on its development.
 A feasibility study is undertaken to verify that the system that is required is, in fact,
viable/possible and that it is worth proceeding.

It involves evaluation of systems requests from users to determine if it is feasible to


construct a new one. Feasibility can be measured by its:

 Technical feasibility – this investigates whether the hardware and software exists to
create the system that is wanted.
 Determines if the organisation can obtain software, equipment, technology and
personnel to develop, install and operate the system effectively.
 Economic feasibility – this investigates the cost of developing a new system (including
the purchase of new hardware) and then determines whether the benefits of a new
system would outweigh the costs.
 Benefits can be tangible and quantifiable, e.g. profits in terms of monetary
values, fewer processing errors, increased production, increased response time,
etc. Other benefits are intangible, e.g. improved customer goodwill, employee
morale, job satisfaction, better service to the community, etc.
 Legal feasibility – investigates if there is a conflict between what is wanted and the
law. For example, would the new system satisfy the requirements of the Data Protection
Act?
 Operational feasibility – investigates whether the current working practices within
the organization are adequate to support the new computer system. It is possible that
the new system would require employees to perform duties in a different way –this
may not be acceptable!
 Schedule feasibility – this investigates the amount of time that the new system is likely
to take to develop and determines whether it can be developed within the timescale
that is available.

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

132
Analysis (detailed investigation)
 The analysis is a detailed, fact-finding, investigation of the existing system in order
to ascertain/determine its strengths and weaknesses and to produce the list of
requirements for the new system.
 The systems analyst collects data about the system. The fact finding methods that
can be used include: interviews, record inspection, questionnaire, observations, etc.

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

Disadvantages of Interviews
 It is expensive since the researcher has to travel to the interview venue.
 Difficult to remain anonymous
 It is time consuming as more time is spent travelling and carrying out the interview.
 Good interview techniques are required as failure may lead to disappointments.
 Biased information can be given since the respondent may not tell the truth.

ii. Record inspection:


A fact finding method which involves scrutinising system documents in order to solicit
information. Record inspection has the following Advantages:
 Accurate information is collected from system records.
 Shows how data is collected within the system
 Shows the exact data that is collected
 Shows information that must be produced by the system
 First-hand information is obtained.
 Gives a good idea of the ways things are actually done rather than how they are
supposed to be done.

Disadvantages of record inspection


 It is time consuming to go through all system records.
 Manual files can be tiresome to go through and some of the data may be illegible.
 Confidential files are not given to the researcher
 Documentation may difficult for an outsider to understand
133
 Some records may not be relevant

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

Advantages of questionnaires
 Effective when collecting a lot of data
 Questions are very simple to answer.
 It saves time as questionnaires can be distributes and then collected later.
 Respondents can fill questionnaires at their own pace.
 Give guarantees confidential of information, thereby encouraging respondents to
give accurate information.
 They are cheap to use as travel expense can be low

Disadvantages of questionnaires
 Questions must be well thought out and precise.
 Some questions are left blank.
 Some questionnaires may not be returned. Biased information can be collected.
 Respondents usually do not fill the correct information.
 It is difficult to analyse information collect using questionnaires.
 They are expensive to use if the postal system is used.
 Abusive information can be filled by respondents.

iv. Observations:
It is a fact finding method that involves viewing the actual system in operation by the
researcher. The researcher can even take part in operating the system. It is used when the
researcher wants to see for himself how the system operates.
Advantages of observations
 First-hand information is collected.
 May identify problems that the users did not see
 Accurate information can be obtained.
 More reliable information is obtained.
 Only areas of interest can be observed.
 The researcher can take part in operating the system thereby getting insight on how
the system operates.

Disadvantages of observations
 People work differently if they feel that they are being observed, therefore
inaccurate information can be collected.
134
 The researcher may not understand some of the activities being observed.
 It is time consuming to collect the required information.
 The researcher may interrupt some of the activities being done.
 More expensive than other methods

DESIGN

This stage is concerned with the development of the new computer based solution as
specified by requirement specification under the analysis stage.
Design is the production of diagrams, tables and algorithms, which show how the new
system is to look and work. The design will show:
• how the interfaces and reports should look:
• the structure of and relationships between the data;
• the processing to be used to manipulate/transform the data;
• the methods to be used for ensuring the security and validity of the data.

 The deliverable at the end of the design stage is documentation that could be used,
independently, by a third-party programmer to create the system as the designer
intends/aims. This means that each section of the design must be detailed and clear.
 Explanations of what must be done and why this method is chosen need to be included.
The design documentation will contain the following:
o user interface designs (input forms and menus);
o specification of data structures (including the relationships between different types
of data);
o validation procedures;
o output/report designs;
o algorithms;
o security methods.

Tools used during designing are DFD, Data Dictionary, Data models, prototypes, system
flowcharts: The personnel involved are users, Analysts, Database Designer.

Design stage involves:

Input Design: includes designing of data entry forms, input methods (e.g. by filling forms,
use of barcodes, etc) and the user interface.
Output Design: Includes design of reports, data output formats, screen displays and other
printed documents like receipts, etc
File design: Involves designing tables/files, records and validation rules. It also involves
determining how data is to be stored and accessed, the media to be used for storage and
the mode of file organisation.
Program Design: Involves design of systems flowcharts, structure diagrams, dataflow
diagrams, algorithms, user interface design, pseudocodes, prototyping, EAR diagramming,
etc.

135
Selection of appropriate hardware: Specify the input hardware, output hardware,
processing hardware and speed, storage media, RAM size, etc.
Selection of appropriate software: specifying the type of operating system, programming
language or database package and other application packages to be used.
Design of test plan and strategy,
Design of the user manual,
Design of the technical documentation

SYSTEM DOCUMENTATION
Documentation refers to the careful and disciplined recording of information on the
development, operation and maintenance of a system. Documentation is in two main types:
user documentation and technical documentation

(a) User Documentation: It is a manual that guides system users on how to load, operate,
navigate and exit a program (system). User documentation contains the following:
 System/program name.
 Storage location.
 System password.
 Instruction on how to install the program.
 Instruction on how to operate the system: e.t.c.
(b) Technical Documentation: This is a manual for programmers and systems analysts
which aid them in modifying the system and in correcting program errors. The following
are found in technical documentation:
 Algorithms of the program,
 Program testing procedures and test data,
 Sample of expected system results,
 Program structure showing modules and their relationships,
 System flowcharts,
 Programming language used,
 Program code,
 program listings,
 File structures.
 Validation rules
 Output formats
 Bugs in the system
 Hardware requirements
 Software requirements

DEVELOPMENT AND TESTING


CODING
Coding is the creation and editing of the interfaces, code and reports so that they look and
work as indicated in the design stage. Note that user and technical documentation will also
be produced during the coding stage.

136
TESTING
Testing is the process to ensure that the system meets the requirements that were stated in
the analysis and also to discover (and eliminate) any errors that might be present.

 Testing is undertaken to ensure that a system satisfies the user’s requirements and to
discover any errors that might be present.
 This phase is important for testing needs to be undertaken by both the programming
team and by the end-users.
Types of programming errors
 Syntax error
-occur when instructions do not follow the rules of the programming language. The
instruction will therefore not be executed and error message displayed.
Examples: misspelled keywords, missing or extra brackets, type mismatch errors
(trying to carry a multiplication on text data), referring to variables that have not
been declared, assigning data of the wrong type to a variable e.g. student_name =
12.5.
 Logical error
-occur when the software specification is not respected and results in a program not
running in the way it was expected to. Logical errors tend not to produce error
messages. e.g. mistake in a wrong formula, arithmetic error (using a division sign
instead of multiplication sign)
 Run-time error
-occur when the program is being executed usually logical error e.g. attempting to
read from a file not in the disk drive or attempting to read past end of file.

Test data
 Normal data
-the data the program is expected to handle/accept
 Extreme data
-values which are at the boundaries or upper or lower limit of acceptability.
 Abnormal data
-values or data that the system should reject rather than attempting to process.
Testing will include:

Testing strategies
First step involves testing of the programs and various modules individually, e.g.
- Bottom – up testing:
Each individual module/function is tested individually as soon as it written and then
combined to test the complete program.

- Top-Down testing:
Program is tested with limited functionality (the skeleton of the system is tested).
Most functions are replaced with stubs that contain code. Individual
functions/modules are gradually added to the program until the complete program
is tested.

137
- Black-box testing (Functional testing):
 Selected test data is imputed that covers all the inputs and outputs and
program functions.
 The actual output is compared with expected output, without considering the
way the actual program works.
 The internal working of the program being tested are not known by the
tester. (black box)

Advantages
-Test is done from the point of view of the user, not the designer
-The tester does not need to know any specific programming language
-The test is unbiased because the tester and the programmer are independent of
each other.
Disadvantages
-The test case are difficult to design
-Testing every possible input stream is unrealistic as it will take a lot of time, thus
some program paths go untested.

- White-box testing (Structural testing):


 Dependent on the actual code and derives from the program structure rather
than program function.
 Involves testing the all program paths to determine whether all possible
paths through the program produce desired results.
 Mostly appropriate if the program has different routes through it, i.e. uses
selection control structure and loops
 Involves testing of the structure and logic of the program (if it has logical
errors)
 Involves desk checking (dry running)

Advantages
-Helps in removing extra lines of code, which can bring in hidden defects
-Helps in optimising the code
-Becomes easier to find out which type of input/data can help in testing the
application effectively.
Disadvantages
-A skilled tester is needed to carry out the test, which increases the cost
-It will not detect missing functions-you can't test what isn't there.
-It is impossible to look into every bit of code to find out hidden errors.

- Alpha testing:
 The first testing done within the developers company (at owners’
laboratory).
 Testing is done by members of the software company or programming team
using their own data and their own computer system.

138
Advantages
 Testers have knowledge of the software and of programming so they know
what they are looking for.
 Sections of the program can be tested in isolation.
Disadvantages
 Some errors may still be in existence after alpha testing as the testers are
programmers not users.
 The software version may not have the required functionality as the
developer may overlook or misunderstood something in the specification.

Testing by the end-users:


-Testing by the end-users is either beta-testing or acceptance testing. Software is tested
under real conditions, using real data, by a selection of real end-users.

- Beta testing:
 System testing done after alpha testing; in which the program version is
released to a number of privileged customers in exchange of their constructive
comments. Mostly similar to the finally released version.
 Real data is used on a variety of computer systems to detect bugs before the
final release of the software.

Advantages
 It exposes the program to real use and detect errors that will have been
missed by the developers.
 The system will be tested on different hardware systems, of varying ages and
configurations which is real.
-Acceptance testing:
 Acceptance testing is where the customer specifies tests to check that the
supplied system meets his/her requirements as specified at the analysis
stage and that the system works in their own environment.
 Note that the tests and data are specified by the customer, but the testing
itself may be carried out by the customer or by the developer under the
scrutiny of the customer.

Debugging Tools
 Dry running and trace table
-Dry running is the manual method of tracing the program in order to find errors (bugs) in
the program. It involves execution of the program with the programmer acting as the
computer.
-Trace table/dry run table- is a way of tracking the values of variables while testing the
algorithm/program. All the variable names are written in column and at each step the
values of variables are checked and written below the respective variable in the table

139
SYSTEM IMPLEMENTATION/ CONVERSION (INSTALLATION/CHANGEOVER)
This also involves putting the new computer system into operation that is, changing from
the old system to the new one. It involves file conversion, which is the changing of old data
files into the current format. Different changeover methods can be used, and these include:

a. Parallel Run: This involves using of both the old and new system concurrently until the
new system proves to be efficient. It involves operating the new and old systems
simultaneously until management is confident that the new system will perform
satisfactorily. Other workers will be using the old system while others use the old system
but doing the same type of job.

Advantages of parallel run


 Results for both systems are compared for accuracy and consistency.
 If the new system develops problems, it will be easier to revert to the old one.
 There is enough time given to determine if the new system produces expected
results.
 Employees have enough time to familiarise with the new system.

Disadvantages of Parallel run


 Running two systems at the same time is very expensive.
 Running two systems simultaneously is demanding to employees.
 It may be difficult to reach a decision when comparing the two systems.
 There is duplication of tasks which in turn stresses employees

b. Abrupt (Direct) changeover: Involves stopping using the old system on a certain day
and the new system takes over on the next morning. This is suitable for control systems
like in chemical plants and for traffic lights.

Advantages of Direct Changeover


 Reduces cost as of running two systems at the same time.
 Faster and more efficient to implement.
 There is minimum duplication of tasks.
 Enough resources can be allocated to make sure that the new system operates
successfully.

Disadvantages of Direct Changeover

 It will be difficult to revert to the old system if the new system fails.
 Allows no time for training-
 Very risky because results are so important

c. Phased / Partial conversion: This is whereby the old system is gradually removed
while the new system is gradually moved in at the same time. This can be done by
computerising only one department in an organisation this month, then the next
department in two months’ time, and so on until the whole system is computerised.

140
Advantages of phased conversion
 Avoids the risk of system failure.
 Saves costs since the new system is applied in phases.
 It could be easier to revert to the old system if the new system fails since only one
department will be affected.

Disadvantages of phased conversion


 It could be very expensive since the organisation will be running two systems but in
different departments.

d. Pilot conversion: one area of organization is converted to the new system while the
remainder still uses the old system
- could be even one subject / department
- Program is tested in one organisation (or department),

Advantages
 Allows workers to familiarize with the new system on department by department
basis.
 Effect of one or more problems could be minimised
Disadvantages
 Expensive to have a pilot study

MAINTENANCE/REVIEW/EVALUATION STAGE
-This stage is concerned with making upgrades and repairs to an already existing system.
Evaluation and maintenance ensures that the system still meets the users' needs. Certain
sections of the system will be modified with time.
-Maintenance can be

(1) Perfective Maintenance:

-It deals with accommodating new user requirements and facilities. It means that
there is room for improving the system even if it is running effectively. For example,
improving report generation, system performance, improving user interfaces etc.

(2) Corrective Maintenance

-Involves correcting some errors that may emanate later whilst the system is in use,
for example, wrong totals, wrong headings on reports, etc. Such errors may have
been realized later or when the system has been in use for a short period of time.

(3) Adaptive Maintenance

141
-Involves making the system adapt to changing needs within the organization or suit
changes due to growth in requirements whilst it is in use.. For example, changing the
system from being a standalone to a multi-user system. May be caused by
purchasing of new hardware, changes in software, new government legislation and
new tax bands.

(4) Preventability Maintenance

-It deals with activities which increases the systems maintainability, such as
updating documentation.

SYSTEM SECURITY
It is important to keep data secure so that it may not be damaged or get lost. The risks and
their solutions are as follows:

Risk Solution
Hardware -Frequent back-up of data, at least one copy to be kept at different
failure locations on daily basis
-Log files to be kept for all transactions
Fire Keep backup file at fireproof safe or storage at an alternative
location
Theft Physical security measures like locking rooms, use security
cameras, guards, electric fence, screen gates, etc
Disgruntled Employee checks (ID cards to check workers, careful vetting during
employees employment, instant removal of access right to sacked workers,
separation of tasks for workers, educating workers to be aware of
security breaches)
Hackers Usernames & Passwords, firewalls
Viruses Latest and updated Antiviruses (, firewalls
Floods Building rooms at higher grounds, waterproof safes for backups

If a hard disc fails, files can be recovered by using the last backup, which is copied on to
another hard disc. The log file should be used to update the master file.
During the recovering process, the master file will not be available but the system could be
maintained at a lower level of services. Any transaction could be logged and used to update
the master file when the system is up and running.

Data Flow Diagram (DFD)


 The DFD (also known as a bubble chart) is a hierarchical graphical model of a
system that shows the different processing activities or functions that the system
performs and the data interchange among these functions.
 Each function is considered as a processing station (or process) that consumes some
input data and produces some output data.

142
 The system is represented in terms of the input data to the system, various
processing carried out on these data, and the output data generated by the system.

DFD Elements
Processes- transform data.

Data Stores -retain data until needed. They are usually named after the data entity.

Terminators (or entities) can represent customers or people etc... within a system.

Data Flows(arrow) are instantaneous and the names of the flows are typically listed in the
data dictionary along with information about each one.

Level 0
 The top level diagram shows the external entities and the main data flows. The
system is represented by a single process symbol.
 DFDs contain a system boundary which contains the whole "system". Data flows can
cross that boundary into the "environment". Objects outside the system are known
as "terminators".
 The Context Diagram which is the Topmost DFD (level 0) has one process only and
shows the inputs and outputs of the system.

143
Importance of DFDs
DFD is a very simple formalism – it is simple to understand and use.

144
CHAPTER 13

TYPES OF USER INTERFACES

Menu-Based Interfaces for Browsing


These interfaces present the user with lists of options, called menus, that lead the user
through the formulation of a request. It displays a list of options / commands from which
the user has to choose one by use of the mouse or keyboard. Menus do away with the need
to memorize the specific commands and syntax of a query language; rather, the query is
composed step by step by picking options from a menu that is displayed by the system.
Pull-down and pop-up menus are becoming a very popular technique in window-based
user interfaces. They are often used in browsing interfaces, which allow a user to look
through the contents of a database in an exploratory and unstructured manner.

Below is an illustration of a menu driven type of interface:


1. PRINT RECORD
2. DISPLAY RECORD
3. DELETE RECORD
4. EDIT RECORD
5. MY OPTION IS: __

The user has to enter 1, 2, 3 or 4 and then press enter on the keyboard.

Advantages:
It is fast in carrying out task.
The user does not need to remember the commands by heart.
It is very easy to learn and to use.

Disadvantages:
The user is restricted to those few options available and thus is not flexible to use.

Form-Based Interfaces
 A forms-based interface displays a form to each user.
 The form has spaces for input/insertion of data
 Insertion fields are provided together with validation checks on data entered.
 It mirrors a hardcopy form.
 Data is entered in strict order.
 The form has explanatory notes /comments on the screen
 It also uses drop-down lists tick boxes, etc
 Each record in the database may have its own form displayed on the screen.

145
 Users can fill out all of the form entries to insert new data, or they fill out only
certain entries, in which case the DBMS will retrieve matching data for the
remaining entries.
 Forms are usually designed and programmed for naive (inexperienced) users as
interfaces to canned (pre-recorded) transactions.
 Many DBMSs have forms specification languages, special languages that help
programmers specify such forms.
 Some systems have utilities that define a form by letting the end user interactively
construct a sample form on the screen.
 Ensures that no data is missed/left un-entered.
 It is very easy to insert validation checks/routines. (read Heathcote for more on
Form-Based interfaces and other forms of user interfaces)
Application: Ordering goods online, applying for membership online, applying for an e-
mail address online, completing postal order forms, etc. It ensures that only the relevant
information is captured/entered.

Command Driven Interface:


 This is an interface which allows the user to type the command to be carried out by
the computer through the keyboard as supported by MS-DOS.
 The instruction is typed in at the command prompt
 Commands can be typed individually or can be combined to make a command
sequence
 User must know and understand the commands fully.
 The commands are abbreviated and short e.g. Del (for delete), copy, print, e
 The user has to remember the commands to be typed when performing a specific
task.
 An example of a program that uses command driven interface is Microsoft Disk
Operating System (MS-DOS).
 Application: Technician who maintains a computer system, which requires access to
the whole system and its faster to access required information since it is
manipulated directly
 Application: Can be used in telnet systems

Advantages
 It saves disk storage space since there are no icons and less graphics involved.
 It is very fast in executing the commands given once the user mastered the
commands.
 It saves time if the user knows the commands by heart.

Disadvantages
 It takes too long for the user to master all the commands by heart.
146
 It is less user friendly.
 More suited to experienced users like programmers.
 Commands for different software packages are rarely the same and this will lead to
mix-up of commands by the user.

Graphical User Interfaces


A graphical interface (GUI) typically displays a schema to the user in diagrammatic form,
which can implemented using Windows, Icons, Menus and Pointers (WIMP). It is suitable
for inexperienced users. The user can then specify a query by manipulating the diagram. In
many cases, GUIs utilize both menus and forms. Most GUIs use a pointing device, such as a
mouse, to pick certain parts of the displayed record.

Advantages of GUI
 It is faster to give commands by just clicking.
 It is easier for a novice (beginner) to use the system right away. It is user friendly (this
is an interface that is easy to learn, understand and to use).
 There is no need for users to remember commands of the language.
 It avoids typing errors since no typing is involved.
 It is easier and faster for user to switch between programs and files.
 A novice can use the system right away.

Disadvantages of GUI
 The icons occupy a lot of disk storage space that might be used for storage of data.
 Occupy more main memory than command driven interfaces.
 Run slowly in complex graphics and when many windows are open.
 Irritate to use for simple tasks due to a greater number of operations needed

147
CHAPTER 14

CLOUD COMPUTING

Cloud computing
Cloud computing, also on-demand computing, is a kind of Internet-based computing that
provides shared processing resources and data to computers and other devices on demand.
or
Cloud computing is shared pools of configurable computer system resources and higher-level
services that can be rapidly provisioned with minimal management effort, often over the Internet.
Cloud computing relies on sharing of resources to achieve coherence and economies of scale,
similar to a public utility.

Cloud computing exhibits the following key characteristics:

 Agility for organizations may be improved, as cloud computing may increase users'
flexibility with re-provisioning, adding, or expanding technological infrastructure
resources.
 Cost reductions are claimed by cloud providers. A public-cloud delivery model converts
capital expenditures (e.g., buying servers) to operational expenditure.[41] This purportedly
lowers barriers to entry, as infrastructure is typically provided by a third party and need
not be purchased for one-time or infrequent intensive computing tasks.
 Device and location independence enable users to access systems using a web browser
regardless of their location or what device they use (e.g., PC, mobile phone). As
infrastructure is off-site (typically provided by a third-party) and accessed via the
Internet, users can connect to it from anywhere.
 Maintenance of cloud computing applications is easier, because they do not need to be
installed on each user's computer and can be accessed from different places (e.g.,
different work locations, while travelling, etc.).
 Multitenancy enables sharing of resources and costs across a large pool of users thus
allowing for:

148
o Centralization of infrastructure in locations with lower costs (such as real estate,
electricity, etc.)
o peak-load capacity increases (users need not engineer and pay for the resources
and equipment to meet their highest possible load-levels)
o utilization and efficiency improvements for systems that are often only 10–20%
utilized.
 Performance is monitored by IT experts from the service provider, and consistent and
loosely coupled architectures are constructed using web services as the system interface.
 Resource pooling is the provider’s computing resources. There is a sense of location
independence in that the consumer generally has no control or knowledge over the exact
location of the provided resource.
 Productivity may be increased when multiple users can work on the same data
simultaneously, rather than waiting for it to be saved and emailed. Time may be saved as
information does not need to be re-entered when fields are matched, nor do users need to
install application software upgrades to their computer.
 Reliability improves with the use of multiple redundant sites, which makes well-designed
cloud computing suitable for business continuity and disaster recovery.
 Security can improve due to centralization of data, increased security-focused resources,
etc., but concerns can persist about loss of control over certain sensitive data, and the lack
of security for stored kernels.

Cloud computing types

Private cloud
Private cloud is cloud infrastructure operated solely for a single organization, whether managed
internally or by a third-party, and hosted either internally or externally. They have attracted
criticism because users "still have to buy, build, and manage them" and thus do not benefit from
less hands-on management essentially "[lacking] the economic model that makes cloud
computing such an intriguing concept".

Public cloud
A cloud is called a "public cloud" when the services are rendered over a network that is open for
public use. Public cloud services may be free. Technically there may be little or no difference
between public and private cloud architecture, however, security consideration may be
substantially different for services (applications, storage, and other resources) that are made

149
available by a service provider for a public audience and when communication is effected over a
non-trusted network.

Hybrid cloud
Hybrid cloud is a composition of two or more clouds (private, community or public) that remain
distinct entities but are bound together, offering the benefits of multiple deployment models.
Hybrid cloud can also mean the ability to connect collocation, managed and/or dedicated
services with cloud resources.

Gartner defines a hybrid cloud service as a cloud computing service that is composed of some
combination of private, public and community cloud services, from different service providers.
A hybrid cloud service crosses isolation and provider boundaries so that it can't be simply put in
one category of private, public, or community cloud service. It allows one to extend either the
capacity or the capability of a cloud service, by aggregation, integration or customization with
another cloud service.

150
CHAPTER 15

WEB DESIGNING

WEB DESIGNING USING HTML


HTML (Hyper Text Markup Language)
What is HTML?
HTML is a language for describing web pages.
 HTML stands for Hyper Text Markup Language
 HTML is a markup language
 A markup language is a set of markup tags
 The tags describe document content
 HTML documents contain HTML tags and plain text
 HTML documents are also called web pages
HTML Tags
HTML markup tags are usually called HTML tags
 HTML tags are keywords (tag names) surrounded by angle brackets like <html>
 HTML tags normally come in pairs like <b> and </b>
 The first tag in a pair is the start tag, the second tag is the end tag
 The end tag is written like the start tag, with a forward slash before the tag name
 Start and end tags are also called opening tags and closing tags

<tagname>content</tagname>

HTML Elements
"HTML tags" and "HTML elements" are often used to describe the same thing.
But strictly speaking, an HTML element is everything between the start tag and the end tag,
including the tags:
HTML Element:
<p>This is a paragraph.</p>

HTML Element Syntax


 An HTML element starts with a start tag / opening tag
 An HTML element ends with an end tag / closing tag
 The element content is everything between the start and the end tag
 Some HTML elements have empty content
 Empty elements are closed in the start tag
 Most HTML elements can have attributes

151
HTML Basic elements
<html> </html> - defines the beginning and end of a document
<head></head> - works as a store house for important information about a document.
<title></title> - displays the title of the page on the title bar of your browser.
<body></body> - everything that one wants to work with comes between these tags.
HTML Template
Step 1: open any text editor eg notepad
Step 2: the menu items click File>save as
Step 3: type the file name with an .html or .htm extension eg homepage.html and save the file
Step 4: inside the created file include the following code
<html>
<head>
<title>title of the page </title>
</head>
<body>
Main body goes here
</body>
</html>

Step 5: save the file


Note: A template is important because it reduces time spent in rewriting the tags time and again.
All you simply do is to edit the template then save with a different name.

HTML Attributes
HTML elements can have attributes
 Attributes provide additional information about an element
 Attributes are always specified in the start tag
 Attributes come in name/value pairs like: name="value"

HTML Hyperlinks (Links)


The HTML <a> tag defines a hyperlink.
A hyperlink (or link) is a word, group of words, or image that you can click on to jump to
another document.
When you move the cursor over a link in a Web page, the arrow will turn into a little hand.
The most important attribute of the <a> element is the href attribute, which indicates the link’s
destination.
By default, links will appear as follows in all browsers:
 An unvisited link is underlined and blue
 A visited link is underlined and purple
 An active link is underlined and red

152
HTML Link Syntax
The HTML code for a link is simple. It looks like this:
<a href="url">Link text</a>
The href attribute specifies the destination of a link.
<a href="http://www.kidsland.ac.zw">Visit Jameson High School Website </a> which will
display like this: Visit Jameson High School Website
Clicking on this hyperlink will send the user to Jameson High School homepage.
Tip: The "Link text" doesn't have to be text. It can be an image or any other HTML element.
HTML Images - The <img> Tag and the src Attribute

In HTML, images are defined with the <img> tag.


The <img> tag is empty, which means that it contains attributes only, and has no closing tag.
To display an image on a page, you need to use the src attribute. Src stands for "source". The
value of the src attribute is the URL of the image you want to display.
<img src="url" alt="some_text">
Eg. <img src="boat.gif" alt="Big Boat">
The alt attribute provides alternative information for an image if a user for some reason cannot
view it (because of slow connection, an error in the src attribute, or if the user uses a screen
reader).
HTML Images - Set Height and Width of an Image
The height and width attributes are used to specify the height and width of an image.
The attribute values are specified in pixels by default:
<img src="pulpit.jpg" alt="Pulpit rock" width="304" height="228">
Tip: It is a good practice to specify both the height and width attributes for an image. If these
attributes are set, the space required for the image is reserved when the page is loaded. However,
without these attributes, the browser does not know the size of the image. The effect will be that
the page layout will change during loading (while the images load).

HTML List
Two types of lists are more common, thus ordered and unordered lists.
An ordered list:
1. The first list item
2. The second list item
3. The third list item
An unordered list:

HTML Unordered Lists


An unordered list starts with the <ul> tag. Each list item starts with the <li> tag.

153
The list items are marked with bullets (typically small black circles).
<ul>
<li>Orange</li>
<li>Apple</li>
</ul>
How the HTML code above looks in a browser:

HTML Ordered Lists


An ordered list starts with the <ol> tag. Each list item starts with the <li> tag.
The list items are marked with numbers.
<ol>
<li>Orange</li>
<li>Apple</li>
</ol>
How the HTML code above looks in a browser:
1. Orange
2. Apple

HTML Tables
Tables are defined with the <table> tag.
A table is divided into rows (with the <tr> tag), and each row is divided into data cells (with the
<td> tag). td stands for "table data," and holds the content of a data cell. A <td> tag can contain
text, links, images, lists, forms, other tables, etc.
<table border="1">
<tr>
<td>row 1, cell 1</td>
<td>row 1, cell 2</td>
</tr>
<tr>
<td>row 2, cell 1</td>
<td>row 2, cell 2</td>
</tr>
</table>
How the HTML code above looks in a browser:
row 1 cell 1 row 1 cell 2
row 2 cell 1 row 2 cell 2
HTML Tables and the Border Attribute
If you do not specify a border attribute, the table will be displayed without borders. Sometimes
this can be useful, but most of the time, we want the borders to show.

154
To display a table with borders, specify the border attribute:
<table border="1">
<tr>
<td>Row 1, cell 1</td>
<td>Row 1, cell 2</td>
</tr>
</table>
HTML Table Headers
Header information in a table are defined with the <th> tag.
All major browsers display the text in the <th> element as bold and centered.
<table border="1">
<tr>
<th>Header 1</th>
<th>Header 2</th>
</tr>
<tr>
<td>row 1, cell 1</td>
<td>row 1, cell 2</td>
</tr>
<tr>
<td>row 2, cell 1</td>
<td>row 2, cell 2</td>
</tr>
</table>
How the HTML code above looks in your browser:
Header1 Header 2
row 1, cell 1 row 1, cell 2
row 2, cell 1 row 2, cell 2

What is a cookie?
Cookies are usually small text files, given ID tags that are stored on your computer's
browser directory or program data subfolders.
They are designed to hold a modest amount of data specific to a particular client and
website, and can be accessed either by the web server or the client computer.

An HTTP cookie (also called web cookie, Internet cookie, browser cookie, or
simply cookie) is a small piece of data sent from a website and stored on the user's
computer by the user's web browser while the user is browsing.

155
Cookies were designed to be a reliable mechanism for websites to:
 Record the user's browsing activity (including clicking particular buttons, logging in,
or recording which pages were visited in the past).
 They can also be used to remember arbitrary pieces of information that the user
previously entered into form fields such as names, addresses, passwords, and credit
card numbers.
 They are designed to hold a modest amount of data specific to a particular client and
website, and can be accessed either by the web server or the client computer.

Cookies are created when you use your browser to visit a website that uses cookies
to:
 keep track of your movements within the site,
 help you resume where you left off,
 help remember your registered login, theme selection, preferences, and other
customization functions.

The website stores a corresponding file(with same ID tag)to the one they set in your
browser and in this file they can track and keep information on your movements within the
site and any information you may have voluntarily given while visiting the website, such as
email address.

Why are Cookies Used?/ Uses of cookies


 Cookies are a convenient way to carry information from one session on a website to
another, or between sessions on related websites, without having to burden a server
machine with massive amounts of data storage.
 Storing the data on the server without using cookies would also be problematic
because it would be difficult to retrieve a particular user's information without
requiring a login on each visit to the website
 They are widely used in order to make websites work, or work more efficiently, as
well as to provide information to the owners of the site.
 Cookies help us also to provide a better and richer experience: if the user finds
something interesting, he or she can "Like" it on Facebook, or tweet it (cookies make
this feature possible).

What types of cookies are used on our website?

Technical cookies
Technical cookies are used only to "carry out the transmission of a communication over an
electronic communications network, or as strictly necessary to provide an information
society service explicitly requested by the subscriber or user to provide the service"

156
Navigation or session cookies
 These are used to register useful data on normal browsing and how the website is
used on the user’s computer (allowing, for example, to record the preferred page
dimensions in a list).
 Such cookies can also be different from one other in how long they stay on the user’s
computer: those that are automatically deleted when the browser is closed are
called session cookies. If they have a longer lifespan however, they are called
permanent cookies.
Functional cookies
 These cookies allow the website to record information about the choices made by
the user in order to tailor the website to the user’s needs. For example, functional
cookies allow the website to record the user’s specific settings, such as the country
selected and, if set up, permanent access.
Analytical cookies
 These cookies gather data on the user’s use of the website, including the items
which are clicked on whilst browsing, in order to improve the services and the
design of the site.
 They can be shared with our third party suppliers of analysis tools. However, our
analytical cookies are used solely for the purposes of our website.

Structure and presentation

Structure consists of the mandatory parts of an HTML document plus the semantic and
structured markup of its contents.

Presentation is the style you give the content. In most cases presentation is about the way
a document looks, but it can also affect how a document sounds – not everybody uses a
graphical web browser.

Web browers

A web browser is a software program that allows a user to locate, access, and display web
pages. Browsers are used primarily for displaying and accessing websites on the internet,
as well as other content created using languages such as Hypertext Markup Language
(HTML) and Extensible Markup Language (XML).

 A web browser, or simply "browser," is an application used to access and view


websites. Common web browsers include Microsoft Internet Explorer, Google
Chrome, Mozilla Firefox, and Apple Safari.
 The primary function of a web browser is to render HTML, the code used
to design or "mark up" webpages

157
The most popular mobile browsers as of June 2014 are:

 Safari.
 Android Browser.
 Chrome.
 UC Browser.
 Opera Mini.
 Internet Explorer.
 Dolphin browser.

158
CHAPTER 16

DATA ENTRY ERRORS


Data can be entered incorrectly into the computer and this can have the following effects:
- A company can be prosecuted under the Data Protection Act if incorrect information
causes a person or organisation some loss.
- Wrong decisions can be made by managers due to wrong information given.
- Customers may be angry if they are sent wrong bills.

Types Of Errors
1. Transcription Errors: These are mistakes due to misreading or mistyping of data, e.g.,
confusing the number 5 with the letter S, 0 (zero) instead of the letter O, etc. This can also
be caused by bad handwriting.
2. Transposition Errors: These are mistakes caused by swapping 2 letters or digits, e.g.
typing ‗ot‘ instead of ‗to‘, 5721 instead of 7521. Transposition errors occur mostly when
typing at very high speeds.

Avoiding Data Entry Errors


The following procedures can be used to avoid / reduce data entry errors:
1. Verification: Involves checking that what is in the computer is similar to what is on the
input document (Proof reading). Verification is done manually by the user of the computer.
Verification is carried out to determine errors that cannot be detected by the computer.
2. Validation: A process of detecting if data entered is valid, correct, complete, sensible and
reasonable. For instance the height of a person entered as 12 metres is incorrect, not
sensible, neither is it reasonable, and therefore the computer should reject this. Validation
is done by the computer.

Differences between verification and validation


Verification Validation
Check whether data entered in the Checks for correctness, completeness,
computer is similar to that on input sensibleness of data.
document.
Done well after data has been entered Done during data entry.
into the computer.
It is a manual process /done by the user. It is an automatic process/done by the
computer.

Types Of Validation Checks On Data


(a) Character type (Data type) checks: A validation check for detecting if the correct
characters have been entered, for example can detect and reject alphabetic letters where
numbers are needed. Data types include numbers, bytes, dates, text, alphabetic,
alphanumeric, etc and each is to be entered where appropriate.

159
(b) Range Checks: Are validation checks performed on numbers to make sure they lie in a
specified range. For example, you are required to enter a number between 5 and 20, and
you enter 51, the computer should automatically reject this since it lies outside the
required range.
(c) Presence checks: These are validation checks for determining if certain key data items
have been entered in databases, for example, fields that should not be left without data like
Surname for student databases. The computer does not allow the user to continue until an
entry has been made.
(d) Length checks: These are validation checks used to determine if data entered is of the
required number of characters. For example, if a student number has 5 digits, the computer
should reject if a number with 4 or less digits or even more digits is entered.
(e) Spell Checkers: These are validation checks that determine if accurate text has been
entered especially in word processing. Spell checkers use custom dictionaries to check
spelling mistakes in documents. If a word is typed in, it is checked if it is in the custom
dictionary, if not, it is treated as an error. Spell checkers cannot be used in case of names of
people, places, computer jargon, new slang words, etc.
(f) Check Sum: A validation check of adding together the bits in a byte to give a number
that will be transmitted together with the data. It is used to check whether errors have
occurred in transmission or storage.
(g) Parity Bits: A parity bit is an extra bit (1 or 0) that is used in checking for errors in a
group of bits transferred within or between computers. Parity bits are appended to the left
of a byte to make it even or odd depending on the method of parity checking. Parity bits are
also used to determine if a block of data has been correctly transmitted over a
communication channel. It works in the following way:
Using Odd Parity: The letter C is transmitted as 1000011. Since there are three 1s in this
byte, a 0 is added to the left so that the total for 1s is odd, thus making it 01000011. The
first 0 (underlined) is used as the parity bit.
Using even parity: In even parity, a 1 would be appended to the left of the byte so that the
total number of ones is even, thus making it 1 1000011
(h) Check Digits: A check digit is an extra figure added to the end of an original number for
error checking purposes. It s calculated from the original number.
*NB: - Check digits are used where data entered automatically as in using barcode
readers.
Calculating Check Digits
Using the Modulus 11 method: Suppose a product number has been entered as:
1512113239; the following procedures will be used.
The computer removes the last digit, 9, so that it is left with the number 151211323.

160
Data integrity
This refers to the correctness and accurateness of data held in the computer. The issue of
data integrity and security lead to the introduction of some data protection laws which
govern how organisations holding public data must operate.

THE DATA PROTECTION ACT (1984)


This tries to regularise the use of automatically processed individual information by
organisations. The Act outlines some of the following rules:
 Organisations using personal data must be registered.
 Data about individuals must be obtained fairly and lawfully for the purpose
collected for.
 Data must be used only for the specific purpose collected for and may only be
disclosed in accordance with such a purpose.
 Data collected must not be excessive for the purpose collected for but must be
adequate and relevant.
 Data collected must be accurate, up-to-date and kept no longer than necessary.
 Data must be protected from unauthorised access or loss.
 Individuals with collected data have the right to view it and make alterations where
necessary.

161
CHAPTER 17

Technopreneurship

Technopreneurship
 Technopreneurship it is a simple entrepreneurship in a technology intensive
context.
 It is a process of merging technology prowess and entrepreneurial talent and skills.
 Technopreneur is the person who destroys the existing economic order by
introducing, new products and services, by creating new forms of organizations and
by exploiting new raw materials.
 It is someone who perceives an opportunity and creates an organization to pursue
it.
 A person who undertakes risks that has the chance of profit.
 Technopreneurship distinguishes themselves through their ability to accumulate
and manage knowledge, as well as their ability to mobilized resources to achieve a
specified business or social goal.
 Entrepreneurship is a way of thinking and acting that is opportunity obsessed,
holistic approach and leadership balanced for the purpose of wealth creation.
 Searches for change, responds to it, and exploits it as an opportunity.
 Innovation is the specific tool of entrepreneurs, the means by which they exploits
change as an opportunity for a different business or a different service.
 Entrepreneurship pursuit of opportunity without regard to the resources currently
under one’s control.

Entrepreneur
 An innovator or developer who recognizes and seizes opportunities; converts these
opportunities into workable/marketable ideas; adds value through time, effort,
money or skills; assumes the risks of the competitive marketplace to implement
these ideas; realizes the rewards from these efforts
 Entrepreneurship is the practice of embarking on a new business or reviving an
existing business by pooling together a bunch of resources in order to exploit new
found opportunities

Intellectual capital
 It is the intangible value of a business, covering its people (human capital), the
value inherent in its relationships (Relational capital), and everything that is left
when the employees go home(Structural capital), of which Intellectual property
(IP) is but one component.

Many practitioners suggest that Intellectual capital consists of the following elements:
 Human capital
 Structural capital (or organizational capital)
 Relational (customer) capital
 Social capital

162
Human Capital
 Refers to the skills/competences, training and education, and experience and value
characteristics of an organisation’s workforce that in the minds of individuals:
knowledge, skills, competences, experience, know-how, capabilities, expertise of the
human members of the organization.
Relational Capital (also Relationship Capital, Customer Capital, External Capital).
 All relations a company entertains with external subjects, such as suppliers,
partners, clients.
 External capital comprises relationships with customers and suppliers, brand
names, trademarks and reputation.

Structural Capital (also Organizational Capital, Internal Capital)


 That which is left after employees go home for the night: processes, information
systems, databases, policies, intellectual property, culture, etc.
 Thus, the knowledge embedded in organisational structures and processes.

Social capital
 The networks of relationships among people who live and work in a particular
society, enabling that society to function effectively.

Business ethics
 Business ethics (also known as corporate ethics) is a form of applied ethics or
professional ethics that examines ethical principles and moral or ethical problems
that arise in a business environment.
 It applies to all aspects of business conduct and is relevant to the conduct of
individuals and entire organizations.

Role of ethics in business


Why is ethics important to business?
 Ethics concern an individual's moral judgements about right and wrong.
 Decisions taken within an organisation may be made by individuals or groups, but
whoever makes them will be influenced by the culture of the company.

Ethical responsibilities
 Ethical responsibility is the duty to follow a morally correct path.
 In your personal life, you might feel the greatest sense of ethical responsibility to
your family and close friends.
 But small business owners also have ethical responsibilities to the many people
who count on them to do the right thing.

163
FEATURES OF BUSINESS ETHICS
1. Ethical Values:
 Business ethics is concerned with morality in business in today’s business world,
community firms is large part of society and its action is bond to have a direct
impact on the wellbeing and welfare of the society.
 Business affects society in terms of what products it supplies. Therefore, it is
necessary that business community conduct its activities with self control, self
check, and self scarifies .i.e. acting with less concern for yourself than for the success
of the joint activity.
 And keeping always in mind the interest of community at large signifies ethical
values.
2. Relative term:
 Ethics is a relative term in the concept of morality and immorality.
 It differs from one individual to another or from society to society.
 What is moral to one may be immoral to another.
3. Interest of society:
 Business ethics implies that business should first do good to the society and then to
itself.
 Business is an important institution and has a social responsibility to protect the
interest of all those groups who are directly or indirectly related to the organization
like employees, shareholders and consumers etc. to contribute to the success of
business.
4. Business social relationship:
 Business ethics set the terms and standards to understand the societal relationship
of business.
 It indicates what society expects from business and what it thinks about the
business.
5. Provides the framework:
 Like an individual, business is also bound by social rules and regulations.
 Business is expected to restrict its activities within the limits of social, legal, cultural,
and economic environment.
6. Facilitates protection of social groups:
 Business ethics gives protection to consumers and other social groups such as
shareholders, employees and the society at large.
 Business should give priority to social interest or social good.
 Such ethical approach creates good name, add status to business and helps in its
growth and expansion.
7. Not against profit making:
 Business ethics is not against fair profit making.

 However, it is against making profit by cheating and exploiting consumers,


employees or investors.

164
 It supports expansion of business activities but by fair means and not through illegal
activities or corrupt practices. 8. Needs willing acceptance:
 Business ethics cannot be imposed by law or by force.
 It must be accepted as self-discipline by businessmen.
 It should come from within.
 Businessmen should go for ethical trade practices on their own and not by force of
law.

Marketing and Business Strategies


Marketing
 Marketing is the business discipline concerned with developing brands, informing
the public about products and services, convincing consumers to buy specific
products, facilitating transactions and providing after-sale service.
 Marketing provides the face of a business, and the only component that most
consumers ever come into contact with.
 Although marketing encompasses a broad set of concepts and techniques, there are
a number of basic elements that tie all marketing concepts together.
 Understanding the underlying fundamentals of marketing can boost your
effectiveness as a marketer or a small business owner.

Marketing Strategies
 It defines how you are going to market your products, services or business to
customers.
 It lays out what your objectives are and how you're going to execute them.

What should a marketing strategy achieve?


 Your strategy will depend on where you want your business to go - it forms part of
your overall business aims.
 The following are examples of what your overall business aim might be, and
marketing strategies that you could use to achieve it:
 Increase sales
 Bring in new customers
 Get existing customers to buy more
 Introduce a new product or service
 Increase market share
 Better establish your brand
 Improve customer loyalty

HOW TO DEVELOP A MARKETING STRATEGY


1. Research. You need to carry out detailed analyses of these three areas:
 Market analysis:
 The size of your market, how quickly its growing, your customers and their
spending and lifestyle habits.
 Competitor analysis:

165
 Monitor both direct and indirect competition and how they compare with you on
every aspect of sales and marketing (their customers, their brand, price,
convenience of location, sales channels, and so on).
 Company analysis:
 Your overall business objectives, how you are going to achieve them, your strengths
and weaknesses and those of your products or services.
2. Customers. Next you need to identify your target customers, using the information
you've gathered from your research and, if needed, more detailed customer research. Then
you have to:
 Segment them: split your existing and target customers into groups, according to
what they need from your business - which will differ. Some will want cost-
effectiveness, some quality, some great customer service, and so on.
 Positioning: how you compare to your competitors for each of your customer
segments - are you the fastest, do you have the best customer service, are you the
third most popular, and so on.
3. Product. Now you need to examine your product or service with the aim of working out
how you're going to market it and outdo competitors, according to these:
 USPs: what it can offer that no other product or business can.
 Benefits to the customer: From your USPs, draw out what benefits your product or
service offers to the customer. These may well vary between your various customer
segments. You need to look very closely at what the customer actually sees: The way
you define the benefits will shape your marketing message.
4. Communication. How you are now going to communicate the benefits of buying your
product or service or using your business to your target customers (again, this may well
vary between your various customer segments).

Marketing mix:
 The combination of all the marketing tools you are going to use to communicate
your benefits to your customers. For example: advertising, PR, word of mouth,
distribution channels, pricing, promotion, which products you'll sell to them, display
in a shop, website, and so on.
 Remembering four P's can be useful when you're putting your marketing mix
together: Product, Placing, Pricing and Promotion.
Elements of marketing
The 4Ps
The four Ps of marketing: product, price, place and promotion. The marketing mix can be
divided into four groups of variables commonly known as the four Ps: Product: The goods
and/or services offered by a company to its customers.
Product
 The concept of product in a marketing plan deals with finding the right product for
your target market.
 The product must be something desired by the intended customer.
 A target market can be a certain age group of people, such as young adults; people of
a certain geographic area, the Midwest or Southeast, for example; or people of a
certain income level, incomes greater than $50,000 per year.

166
 The target market for your product could also be a very specific combination of
these criteria. For instance, an electronic game manufacturer can target young
adults with an income more than $50,000 per year living in metropolitan areas.
 Companies often conduct surveys to determine products desired by specific target
markets.

Price
 Price is a very important element of the marketing mix.
 The company must create something of value for the consumer.
 The product must be one that the consumer is willing to pay a predetermined price
for.
 Analysis is necessary to determine the price customers are willing to pay for a
specific product.
 If your price is too low, you will not realize a profit. However, pricing higher than
the other market suppliers of the product leads to decreased sales, also resulting in
a loss for the company.

Place
 Selling your product in the correct place is another important aspect of the
marketing mix.
 Customers should find your products whenever needed.
 Determine the proper place to market your product, by determining where the
target audience is shopping for the similar purchases.
 This might be in brick and mortar store location or through an internet store.
 Promotion
 Your product or service should reach the intended people.
 There are multiple mediums available to promote a product or service.
 This includes word of mouth, newspapers and print publications, television, radio,
internet etc.

Market Research
 The process of gathering, analyzing and interpreting information about a market
 Gathering information about a product or service to be offered for sale in that
market.
 Also about the past, present and potential customers for the product or service.
 A research into the characteristics, spending habits, location and needs of your
business's target market, the industry as a whole, and the particular competitors
you face.

Business Strategies
 A business strategy, in simple terms, is a documented plan on how an organisation
is setting out to achieve their goals.
 It contains the key elements on how business can execute their long term aims and
performances.

167
 It is important to create one as it provides a strategic plan on how to develop as a
company.
 The aim of every business is to be sustainable and to stand out from the crowd and
attract customers.
 A coherent business strategy will help you understand the performance of a
company, what drives that performance, how it can be increased, as well as
protecting the company against future risks.

Four types of business strategies


Growth
 A growth strategy entails introducing new products or adding new features to
existing products.
 Sometimes, a small company may be forced to modify or increase its product line to
keep up with competitors.
 Otherwise, customers may start using the new technology of a competitive
company. For example, cell phone companies are constantly adding new features or
discovering new technology. Cell phone companies that do not keep up with
consumer demand will not stay in business very long.
 A small company may also adopt a growth strategy by finding a new market for its
products.
 Sometimes, companies find new markets for their products by accident. For
example, a small consumer soap manufacturer may discover through marketing
research that industrial workers like its products. Hence, in addition to selling soap
in retail stores, the company could package the soap in larger containers for factory
and plant workers.

Product differentiation
 It can be used when companies have a competitive advantage, such as superior
quality or service. E.g. a small manufacturing or air purifiers may set themselves
form competitors with their superior designs.
 Companies use product differentiation strategy to; set themselves apart from key
competitors.
 It can also help company build brand loyalty.

Price skimming
 It involves charging high prices for a product, particularly during the introductory
phase.
 It is used to quick recover production and advertising costs.
 There should special about the product for consumers to pay the exorbitant price.
 One disadvantage of this is that it tends to attract competition relatively quickly.

Acquisition strategy.
 It is used to gain a competitive advantage.
 It entails purchasing another company, or one or more of its product lines.

168
 For example, a small grocery retailer on the east coast may purchase a comparable
grocery chain in Midwest to expand its operations.

E-COMMERCE
 Electronic commerce is a way of doing business over large electronic networks
such as the Internet.
 Also called e-commerce, electronic commerce greatly facilitates transactions
between companies and consumers (B2C), between one company and another
(B2B), and between individual consumers (C2C).

There are 6 basic types of e-commerce:


 Business-to-Business (B2B)
 Business-to-Consumer (B2C)
 Consumer-to-Consumer (C2C)
 Consumer-to-Business (C2B).

Feature of ecommerce
 A main feature of e-commerce through commercial transactions is making money
on the Internet.
 7 unique features, such as the Ubiquity, Global Reach, Universal Standards,
Richness, Interactivity, Information Density, and Personalization.

Advantages
 Faster buying/selling procedure,
 Easy to find products.
 Easy reach to customers, there is no theoretical geographic limitation
 Low operational costs
 Better quality of services.

Disadvantages
 No physical contact between customer and seller
 Not able to have a physical feel of the objects.
 Expensive to conduct

Finance and funding


 Investors
 Business Sectors
 Funding Agencies
 Financial Services

Techno Ventures
Human Resources
 Research – thinker, idea generator, innovator
 Development – technical people implementer

169
 Marketing people – involving marketing
 financer

Environmental technopreneurship components


 Science parts
 Incubation centre
 Academic institution
 Research and development centres
 Internet access and communication and other support services
 Geographic accessibility

Laws and policy on technopreneurship



 Intellectual Property Rights(IP)
 They are the rights given to persons over the creations of their minds.
 They usually give the creator an exclusive right over the use of his/her creation for a
certain period of time.
 It refers to the creations of the mind such as inventions, literary and artistic works,
and symbols, names, images, and designs used in commerce.
 Under intellectual property law, owners are granted certain exclusive rights to a
variety of intangible assets, such as musical, literary, and artistic works; discoveries
and inventions; and words, phrases, symbols, and designs.

 Common types of intellectual property rights include copyright, trademarks,
patents, industrial design rights, trade dress, and in some jurisdictions trade secrets.

PATENT
 It is an exclusive right granted for an invention, which is a product or a process
that provides, in general, a new way of doing something, or offers a new technical
solution to a problem.
 In order to be patentable, the invention must fulfil certain conditions.
 A patent has a term of protection of twenty years providing an inventor significant
commercial gain.
 In return, the patent owner must share the full description of the invention.
 This information is made available to the public in the form of the Intellectual
Property Official Gazette and can be utilized as basis for future research and will in
turn promote innovation and development.

Trademark
 It is a tool used that differentiates goods and services from each other.
 A trademark can be one word, a group of words, sign, symbol, logo, or a combination
of any of these.
 Trademark is a very effective tool that makes the public remember the quality of
goods and services.

170
 Once a trademark becomes known, the public will keep patronizing the products
and services.

Copyright
 It is the right that creators have to stop others from copying their creative works
without their permission.
 Copyright is a legal concept, enacted by most governments, giving the creator of an
original work exclusive rights to it, usually for a limited time.
 Generally, it is "the right to copy", but also gives the copyright holder the right to be
credited for the work, to determine who may adapt the work to other forms, who
may perform the work, who may financially benefit from it, and other related rights

How does it work?


 Copyright protects the work of creators, such as artists, writers, musicians, and
filmmakers.
 Works are protected as soon as they are created, as long as they have been written
down, filmed or recorded.
 Copyright is automatic. You don’t have to put a copyright notice on works, but it is a
good idea.
 You will often see works with the copyright symbol (©) and the copyright owner’s
name on them.
 Copyright ownership is different to physical ownership of something. For example,
if you buy a DVD of a film, you own the DVD, but you don’t own the right to copy it.
The film producer owns copyright in it and you need to have their permission if you
want to copy it.

Why is copyright important?


 Copyright is important because it gives creators control over their creative works.
 This means they can decide who uses their work, how it can be used and if they will
charge a fee to other people who want to use it.
 This gives creators the ability to earn a living from their works.

 Technology Licensing Office


 Legal Services

171

You might also like