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

New Computer SSS 3

Uploaded by

stanzeemane02
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)
34 views

New Computer SSS 3

Uploaded by

stanzeemane02
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/ 96

New

COMPUTER
STUDIES
for

Senior Secondary Schools 3


J. O. E. Otuka

A. F. Akande

S. L. Iginla

i
Learn Africa Plc
HEAD OFFICE
Felix Iwerebon House
52 Oba Akran Avenue
P.M.B. 21036
Ikeja, Lagos State
Tel: +234 01 7403967
+234 01 4393111
Fax: +234 4964370
E-mail: [email protected]
Website: www.learnafricaplc.com

Abuja, Ajegunle,Akure, Benin, Enugu, Ibadan, Ilorin, Jos, Kano,


Onitsha, Owerri, Port Harcourt, Zaria and representatives throughout Nigeria

All rights reserved. No part of this publication


may be reproduced, stored in a retrieval system, or
transmitted in any form or by any means, electronic,
mechanical, photocopying, recording or otherwise
without the prior permission of Learn Africa Plc.

© Learn Africa Plc 2013

First Published 2013


Reprinted 2016

ISBN 978 978 026 718 6

ii
Contents
Contents
Preface
Chapter 1 Networking 1
Introduction to networking 1
Definition of a computer network 1
Network classification 1
Types of network connection 2
Other types of network 3
Ethernet 4
Classification of networks based on organisational
scope 4
Network transmission media 5
Communications protocol 6
Network topology 6
Benefits of computer networks 8
Demerits of computer networks 9
Network devices 9
Summary 11
Revision questions 12

Chapter 2 Introduction to world wide web 14


History of the world wide web 15
Basic world wide web terminologies 15
World wide web protocols 15
Benefits of the world wide web 16
Navigating through websites-using website addresses 16
Softwares for website designs and their uses 17
Summary 17
Revision questions 18

iii
Chapter 3 Cables and connectors 19
Introduction 19
Cable 19
Connector 20
Data cables 21
Summary 26
Revision questions 27

Chapter 4 Database 28
Introduction 28
Database 28
Database package 28
Database organisation 30
Types of relationship 31
Queries 34
Types of query 34
Summary 35
Revision questions 35

Chapter 5 Graphics (Corel Draw) 37


Introduction 37
Features of CorelDraw environment 37
Drawing of objects in CorelDraw 40
Simple designs in CorelDraw 42
Summary 42
Revision questions 42

Chapter 6 Basic programming III (one-dimensional


arrays) 44
Introduction to arrays 44
Properties of array 45
One-dimensional array 48
Operations on array 48

iv
Reading data into an array 48
Computing with arrays 48
Printing from an array 49
Basic programs 49
Summary 50
Revision questions 50

Chapter 7 High-level languages 52


Introduction 52
High-level languages 52
Programming language (PL) 53
General features of high-level languages 53
Advantages of high-level languages 53
Disadvantages of high-level languages 53
Classification of high-level languages 54
Types of high-level languages 54
Interpreted and compiled languages 54
Low-level language 55
Advantages of high-level languages over low-level
language 56
Features of high-level languages 57
Basic language 57
Pascal language 57
Summary 59
Revision questions 60

Chapter 8 Overview of number systems 62


Number systems 62
Number bases 62
Place values 62
Arithmetic operation in number systems 65
Representation of negative numbers 68
Complementation 68

v
Explicit sign methods 70
Summary 70
Revision questions 70

Chapter 9 Data representation 72


Introduction 72
Method of data representation 72
Summary 75
Revision questions 75

Chapter 10 Security and ethics 76


Introduction 76
Computer network security 76
Computer network security ethics 76
Sources of computer network security breaches 77
Preventive measures against computer network
security breaches 78
Legal issues 78
Summary 79
Review questions 80

vi
Preface
New Computer Studies for SSS Book 3 is the third Teachers and students are advised to
of a new three-year course written towards take special interest in all the chapters for
achieving the educational objectives set by effective teaching and learning.
the new curriculum for Senior Secondary
Schools approved by the Federal Ministry of
Education. J. O. E. Otuka
Divided into ten chapters, the book
A. F. Akande
covers the following:
S. L. Iginla
1. Networking

2. Introduction to world wide web

3. Cables and connectors

4. Database

5. Graphics (CorelDraw)

6. BASIC programming III (one-dimensional


array)

7. High level languages

8. Overview of number system


9. Data representation

10. Security and ethics

There is a summary at the end of each


chapter, as well as a set of review questions
for use as class and out-of-class exercise.
There is no gainsaying the fact that this
book which is essentially prepared to build on
the foundation laid in the subject at the Junior
Secondary School, will adequately cater for the
needs of teachers, students and examination
bodies. It will also prepare students for
both internal and external examinations.

vii
viii
Chapter

1
Networking

Learning objectives
At the end of this chapter, you should be able to:
• define computer networking;
• list types of networks;
• state types of network topologies;
• draw a flow diagram for each network topology;
• list network devices; and
• state benefits of networking.

Introduction to networking is a collection of computers and peripheral


components interconnected by communica-
Human, social and economic environment tion channels (also called transmission me-
continues to grow bigger and more complex dia). It allows for sharing of resources (data,
with new yearnings and a desperate need hardware, and software) and information.
for innovative tools to manage the environ- The computer network connection can be
ment and reduce the burden that man faces. done as peer-to-peer or client/server (mas-
A computer network is one of such scientific ter-slave). Network users are able to share
innovations which has turned the human en- files, printers and other resources, send elec-
vironment into a virtual meeting point. tronic messages and run programs on other
The computer network comprises simple computers.
to complex manipulation of computers and
other devices with the aim of making these
connected computers and devices communi- Network classification
cate with each other and share available re-
sources. Networks can be classified according to a
wide range of characteristics: scale, the me-
dium used to transport the data, topology,
Definition of a computer network communications protocol used, and organ-
isational scope.
A computer network, simply called network,

1
from the network. There is no central server
and all the computers can act as the server.
This type of network is very easy to in-
stall. Each computer holds its files and re-
sources. For other computers to access these
resources, the computer that posseses these
particular resources must be turned on.

Benefits of peer-to-peer network


a) It is easy to implement.
b) It is cheaper to establish.
c) Failure of one system will not automati-
Fig. 1.1 Computer network cally lead to network failure.
d) It allows faster downloads of very large
files at maximum speed.
Types of network connection e) It has the ability to obtain hard-to-find
contacts.
Computer network has two types of connec-
tions, namely physical connections (that let
computers directly transmit and receive data
or electronic signals), and logical or virtual
connections (that allow computer appli-
cations such as e-mail programs and web
browsers used to explore the Internet to ex-
change information).
Computer network connections can also
be classified by their scope or scale. Every
type of network design can be said to be a
kind of area network. Based on the connec-
tion type or architecture, there are two broad
classifications, namely peer-to-peer network
or client server network (also called master-
slave network). Fig. 1.2 Peer-to-peer network

1 Peer-to-peer network 2 Client-server network


This network usually has between 10 or 15 In this network, the server is the central com-
people (users) on it. In this type of connec- puter. It is used to facilitate communication
tion, every computer on the network can and sharing of resources between other com-
communicate directly with other computers; puters on the network referred to as a client.
by default, no computer has more authority In this network system, a server is used
than the other. to enable clients create data storage space
Here, every computer on the network is and store data. For the computer to function
capable of sending and receiving information as a server, it must run a network operating

2
system (NOS). The server is also called a ded- together (i.e., in the same building). It is a col-
icated system because it is optimised to serve lection of interconnected computers that can
clients’ requests. share data, software and hardware resources,
such as scanners and printers. Computers in
a LAN are separated by distances of up to a
few kilometres and are usually used in offices
or educational institutions.
A LAN enables fast and effective transfer
of information within a group of users, and
reduces operational costs to the bearest mini-
mum.

MAN (Metropolitan Area Network)


This is a data network designed for a town
or city. It is larger than LAN and it connects
clients and server for multiple buildings.

Fig.1.3 Client-server network WAN (Wide Area Network)


This is a geographically-dispersed collection
of LANs. A network device called a router
Benefits of client-server network
connects LANs to a WAN. In IP networking,
a) Centralisation: In this network connec-
the router maintains both a LAN address and
tion, files are in a central location for easy
a WAN address.
administration.
The computers are farther apart and are
b) Resource optimisation: The server (hard-
connected by telephone lines or radio waves.
ware) is designed to respond to clients’
WAN covers a large distance for communica-
requests quickly.
tion between computers. The Internet is the
c) Data security: The server is fortified with
largest WAN, spanning the Earth.
multiple level of permission to prevent
users from damaging files.
WLAN (Wireless Local Area Network)
d) Backups: Files are easily backed-up in
WLAN uses a high-frequency radio technol-
multiple locations.
ogy similar to digital cellular and a low-fre-
e) Redundancy: Data can be stored in re-
quency radio technology. WLAN also uses
dundant ways for quick restore opera-
spread spectrum technology to enable com-
tions in case of problems.
munication between multiple devices in a
limited area.
Other types of network
SAN (Storage Area Network)
Common examples of area network types are
It is also known as system area network,
as follows:
server area network, or sometimes small
area network. It connects servers to data
LAN (Local Area Network)
storage devices through a technology like
The computers here are geographically close
fibre channel.

3
CAN (Campus Area Network)
This is also called controller area network, or
cluster area network. It is an interconnection
of LANs in limited geographical locality like
a university or local business campus. A LAN
is smaller than the area covered by WAN.

PAN (Personal Area Network)


This is a computer network used for commu-
nication among computers and different in-
formation technological devices close to one
person.
Some examples of devices that are used
in a PAN are personal computers, printers,
fax machines, telephones, PDAs, scanner, Fig. 1.4(b) Wireless connector for desktop
and even video game consoles. computer
A PAN may include wired and wireless
devices.

DAN (Desk Area Network) Classification of networks based


This is a network contained within the user’s on organisational scope
desk in an office area.
Networks can be classified based on the or-
HAN (Home Area Network) ganisations that manage and own them.
This is a network contained within a user’s
According to the owners’ point of view,
home that connects a person’s digital devices.
networks are seen either as intranets or ex-
tranets. Intranets and extranets are usually
Ethernet parts or extensions of LAN network. The
Internet; however, is the only network with-
This is a family of connectionless protocols out a single owner but a distinct status when
used in LANs. It is described by a set of stan- seen by an organisational entity – that of per-
dards called IEEE 802, published by the Insti- mitting virtually unlimited global connectiv-
tute of Electrical and Electronics Engineers. ity for a great multitude of purposes.

Intranets and Extranets

Intranet
Intranet is a set of networks, that uses Inter-
net Protocol and IP-based tools such as web
browsers and file transfer applications, that
is under the control of a single administrative
Fig. 1.4(a) Wireless connector for laptop com- entity that gives access only to authorised us-
puter ers.

4
Intranet is the internal network of an or- machine to the receiving machine).
ganisation. A robust intranet will typically The most commonly used transmission
have at least one web server to provide users media are:
with company information. 1 Wired technologies: The network me-
dia uses wired devices to transmit signals
Extranet across the network. They are:
Extranet is a network that is restricted in a) Coaxial cable
scope to a single body and also has limited b) Twisted-pair cable
connections to the networks of one or more c) Fibre-optic cable
organisations. For example, a customer may
be given access to some parts of the organ- 2 Wireless technologies: These media use
isation’s intranet although the customer may wireless devices to transmit signals across
not be considered trusted from a security the network. They include:
standpoint. a) Microwave transmission (terrestrial
From the technical point of view, an ex- microwaves) - This is a high-frequen-
tranet may also be classified as a CAN, MAN, cy electromagnetic wave (an electro-
WAN, etc. An extranet cannot consist of a sin- magnetic wave whose wavelength
gle LAN; it must have at least one connection ranges from 1 mm to 30 cm) used in
with an external network. signal transmission. It involves re-
ceiving and resending microwave
signals between relay stations.
Network transmission media Terrestrial microwaves use low-
gigahertz range which limits all com-
Transmission media are physical materials or munications to line-of-sight. It employs
other means that are used to establish a com- microwave antennas which are usu-
munication channel (i.e. the path that data ally placed on top of buildings, moun-
follows as it is transmitted from the sending tains, etc.

Transmission Transmission
line line

Input Transmitter Receiver Output

Fig. 1.5 Microwave transmission

5
b) Wireless transmission: This is the Communications protocol
transmission of telecommunication
signals without wire. It offers in- Communications protocol defines the for-
creased mobility and flexibility. It is mats and the set of rules for exchanging
the technology employed in cordless information in a network. It comprises a
telephone, satellite and pager. complete protocol suite which describes the
c) Transmission satellite: This is a sat- protocols used at various usage levels.Proto-
ellite that provides a means of trans- cols have various properties, such as whether
mitting telecommunications signals they are connection-oriented or connection-
all over the globe, without the need less, whether they use circuit mode or packet
for a network of wires and cables. switching, or whether they use hierarchical
The communication satellites orbit or flat addressing.
earth at a speed that enables them to Examples of communications protocols
stay above the same place on Earth are Ethernet, Internet Protocol Suite (also
at all times. These Earth-orbiting sys- called TCP/IP) which is the foundation of
tems are capable of receiving and re- all modern internetworking, synchronous
laying voice, data and television sig- optical networking (SONET) and synchro-
nals. nous digital hierarchy (SDH). They are stan-
d) Infrared communication: This is a dardised multiplexing protocols that transfer
wireless medium that can transmit multiple digital bit streams over optical fiber
signals between devices within small using lasers.
distances of typically not more than
10 metres. In most cases, line-of-sight Network topology
propagation is used; it limits the A network topology refers to the physical
physical positioning of communicat- structure or the layout of the interconnec-
ing devices. tions of the nodes of a computer network.
e) Global area network (GAN): This is a However, the physical layout of the nodes in
network system used to support a network may not necessarily reflect the net-
mobile communications across a sub- work topology. Common layouts are:
jective number of wireless LANs, sat-
ellite coverage areas, etc. It is usually 1 Bus network topology: This is a kind of
employed in mobile communication LAN in which all computers on this common
with some attendant challenges. connection receive all signals transmitted by
f) Wireless LAN: Wireless local area any attached computer.
network uses a high-frequency radio The bus topology is composed of a single
technology that is similar to a digital link connected to many computers. It is also
cellular and a low-frequency radio known as linear typology because comput-
technology. It uses spread spectrum ers are connected to each other using a single
technology to enable communication cable called trunk or backbone. All nodes are
between multiple devices in a limited connected to a common communication me-
area. dium along this medium. This was the layout
used in the original Ethernet, called 10BASE5
and 10BASE2.

6
node can reach other nodes by traversing
nodes left or rightwards. The fiber distribut-
ed data interface (FDDI) uses ring topology.
Node D

Node C

Fig. 1.6 Bus network topology

2 Star network topology: All nodes are Node B


connected to a special central node. This is
the typical layout found in a wireless LAN,
where each wireless client connects to the CPU
Node A
central wireless access point. It is usually a
network consisting of a central computer (the
hub) surrounded by terminals (other com-
puters).
In a star network, messages pass directly
from a node to the central computer, which
Fig. 1.8 Ring network topology
handles any further routing that might be
necessary.
4 Mesh network topology: In this topolo-
B gy, each node is connected to an arbitrary
Hub number of neighbours in such a way that
A there is at least one traversal from one node
C
to any other. Here, each computer (node) is
connected individually to another system. If
one link fails, the other will be used.

node

link
D
Fig. 1.7 Star network topology

3 Ring network topology: Here, all com-


puters (called nodes) are connected in a ring
or a closed loop, and each node is connected
to its left and right neighbour nodes, such
that all nodes are connected and that each
Fig. 1.9 Mesh network topology
7
5 Hierarchical–star network topology: Here, multiple stars are combined into a tree-like
structure known as hierarchical–star topology and it allows for high level of flexibility and
expandability depending on the network equipment used.

Fig. 1.10 Hierarchical–star network topology

6 Hybrid network topology: This is an in- Benefits of computer networks


terconnection of one or more networks with
the same physical topology. Some of the benefits of computer networks
are as follows:
1 They facilitate communication: People
can communicate effectively, efficiently
and easily via email, instant messaging,
chat rooms, telephone, video telephone
calls and video conferencing.
2 They permit sharing of files, data, and
other types of information: In a network
environment, authorised users may ac-
cess data and information stored on other
computers on the network.
3 They share network resources: Com-
puters on a network may access and use
resources provided by devices on the net-
work, such as printing a document.
Fig. 1.11 Hybrid network topology

8
4 They save time: Computer networks 2 Repeater: This an electronic device that
save time. receives a signal, removes unnecessary
5 They allow for easy collaboration: Net- noise from it, regenerates it, and retrans-
work users can easily collaborate because mits it at a higher power level, so that the
they are linked together. signal can cover longer distances without
degradation.
Demerits of computer networks In most twisted pair Ethernet con-
figurations, repeaters are required for
1 They are not secure: A computer net- cables that run longer than 100 metres.
work may be used by computer hack-
ers to deploy computer viruses or com-
puter worms on devices connected to the
network, or to prevent these devices from
normally accessing the network (denial
of service).
2 They are difficult to set up: A complex
computer network may be difficult to set
up.
3 They are expensive: It may also be very
Fig. 1.13 A repeater
costly to set up an effective computer net-
work in a large organisation or company.
3 Modem: A modem is a device that en-
Network devices ables users of computers, facsimile ma-
chines, and other equipment to commu-
1 Hub: This is a repeater with multiple nicate with each other across telephone
ports. It is a rectangular box that is used lines or other network cables. It is a de-
as the central object onto which comput- vice that converts analog signals (such as
ers and other devices are connected. To sound waves) to digital signals which are
make this possible, a hub is equipped used by computers.
with small holes called ports. In recent time, the term has also in-
cluded devices that permit the transmis-
sion of entirely digital signals.

port

Fig. 1.12 A hub with eight ports Fig. 1.14 A modem

9
4 Switch: This is a routing device used in which the broadcast was received. Bridge
telephone exchanges to route transmis- learns which MAC addresses are reach-
sions between network nodes. A switch able through specific ports and does not
is distinct from a hub in that it only for- just copy traffic to all ports as hub does.
wards the frames to the ports involved in
the communication rather than all ports 6 Router: This is an intermediary device
connected. that connects a LAN to a larger LAN or
WAN by interpreting protocol informa-
tion and selectively forwarding packets
to different LAN or WAN connections
through the most efficient route avail-
Fig. 1.15 A switch able.
A router is an internetworking device
5 Bridge: The bridge connects multiple that forwards packets between networks
network segments at the data link layer by processing information found in the
(layer 2) of the OSI model. It creates an datagram or packet. Like a hub, a router
extended LAN by passing information is another type of device that acts as the
between two or more LANs. A bridge central point among computers and oth-
broadcasts to all ports except the port on er devices that are part of a network.

wireless
access
point
switch

network
bridge
Fig. 1.16 A network bridge

router

cable/DSL
modem

Fig. 1.17 Network router configuration

10
7 Network interface card (NIC): This is a receive data or electronic signals) and
piece of computer hardware designed to logical or virtual connections (that allow
allow computers to physically access a computer applications such as e-mail
networking medium. It provides a low- programs and the Internet browsers used
level addressing system through the use to explore the Internet to exchange infor-
of MAC addresses. mation).

• Peer-to-peer network – This network is


usually between 10 or 15 people. In this
type of connection, every computer on
the network can communicate directly
with other computer.

• Client-server-network – In this network,


the server is the central computer. It is
used to facilitate communication and
Fig. 1.18 A network interface card sharing of resources between other com-
puters on the network referred to as
client. In this network system, a server is
8 Node: This is a device that is connected
used to enable clients to create data stor-
to the network and is capable of commu-
age space and store data.
nicating with the other devices.
• LAN (local area network) – The computers
Summary are geographically close together (that is,
in the same building). It is a collection of
This chapter has taught the following:
interconnected computers that can share
• A computer network, simply called net-
data software, and hardware resources,
work, is a collection of computers and
such as scanners, printers.
peripheral components interconnected
by communications channels (also called
• MAN (metropolitan area network) – This
transmission media) that allow sharing
is a data network designed for a town or
of resources (data, hardware, and soft-
a city. It is larger than LAN and it connects
ware) and information.
clients and server for multiple buildings.
• Networks can be classified according to a
• WAN (wide area network) – This is a
wide range of characteristics which in-
geographically-dispersed collection of
clude: scale, the medium used to trans-
LANs. A network device called a router
port the data, topology, communications
connects LANs to a WAN. In IP network-
protocol used and organisational scope.
ing, the router maintains both a LAN
address and a WAN address.
• Computer networks have two types of
connections, namely physical connections
• WLAN (wireless local area network) –
(that let computers directly transmit and
WLAN uses a high-frequency radio tech-

11
nology similar to digital cellular and a B a collection of computers and periph-
low-frequency radio technology. eral components interconnected by
communications channels that allow
• Intranet is a set of networks that uses sharing of resources and information
Internet Protocol and IP-based tools such C a firewall
as web browsers and file transfer appli- D all the software and hardware re-
cations, that are under the control of a sources that help gate-checks
single administrative entity that gives 2 ______________ is an example of trans-
access only to authorised users. mission media.
A Firmware
• Extranet is a network that is restricted in
B Firewall
scope to a single body and also has lim-
C Optical fibre cable
ited connections to the networks of one
D Network OS
or more organisations.
3 Which of the following is not an example
• Transmission media are physical materi- of wireless technologies?
als or other means that are used to estab- A Terrestrial microwaves
lish a communication channel. B Transmission satellite
C Infrared communication
• The most commonly used transmission D Coaxial cable connection
media are: 4 Wireless technologies are ______________.
Wired technologies – These media A media that use wireless devices to
use wired devices to transmit signals transmit signals across the network
across the network. Examples are coaxial B media that use wired connected
cable, twisted pair, fibre-optic etc. computers to transmit signals
Wireless technologies – These media C cables that are wireless and poor ICT
use wireless devices to transmit signals implementation
across the network, e.g. microwave trans- D all of the above
mission (terrestrial microwaves), wire- 5 Which of the following is odd?
less transmission, transmission satellite, A Crimpler
infrared communication, global area net- B RJ45
work (GAN) and wireless LAN. C RJ11
D Cable connector
• A network topology refers to the physi- 6 A repeater is ______________.
cal structure or the layout of the intercon- A a network operating system
nections of the nodes of a computer net- B a computer hacker
work. Examples are bus, ring, mesh, star, C an electronic device that receives a
hierarchical and hybrid. signal, removes unnecessary noise,
regenerates it, and retransmits it at a
Review questions higher power level, so that the signal
can cover longer distances without
Multiple choice questions degradation
1 A computer network is ______________. D a medium that uses wireless devices
A a program that protects anti-virus

12
to transmit signals across the net-
work.
7 Computer networks include the follow-
ing except ______________.
A star
B token-ring
C computer tree
D bus
8 Which of these is a data network de-
signed for a town or city?
A LAN
B MAN
C WAN
D PAN
9 _________________ refers to the physical
structure or the layout of the interconnec-
tions of the nodes of a computer network.
A Topology
B Arrangement system
C Virology
D Networking
10 ______________ uses a high-frequency
radio technology similar to digital cellu-
lar and a low-frequency radio technol-
ogy.
A PAN
B WAN
C MAN
D WLAN

Essay-type questions
1 Define networking and state the types of
networking that you know.
2 a) What is network topology?
b) State the differences between star and
bus topology.
3 Draw any three network topologies that
you know and mention their uses.
4 Write short notes on any five network
devices.
5 List five benefits of networking.

13
Chapter

Introduction to world
2
wide web

Learning objectives
At the end of this chapter, you should be able to:
• define world wide web (www);
• give a brief history of world wide web;
• define basic terminologies of www;
• list the world wide web protocols;
• state the benefits of the world wide web;
• navigate through website addresses; and
• recognise the software for website design and its use.

Introduction fetches the named branch and sends it to the


browser. Web servers are usually owned and
The acronym www stands for world wide administered by Internet service providers (I
web; it is usually called the web or W3. This SP).
is a system of Internet servers that support If you have an account with an ISP, you
hypertext and multimedia to access several can access pages on web servers by using a
internet protocols on a single interface. One software program called a web browser. A
of the most outstanding features of the world web browser enables one to view and navi-
wide web is that it has web pages which usu- gate between web pages that may contain
ally contain links that you can click on to lead text, videos, images and other multimedia
to other web pages. It can contain graphics, through hyperlinks.
sound and other multimedia elements. A collection of related web pages hosted
Computers on the Internet that store by the same person, company or organisation
and deliver to request web pages are called is called a website. A website may consist of
web servers. For example, when a uniform a web page or several web pages, depending
resource locator (URL) http://www.learnafrica. on the size of information the host wants to
com/branch is entered in your browser, the post.
browser sends a request to the server whose
domain is learnafrica.com. The server then

14
History of the world wide web 3 Web page: This is an electronic document
that is viewed on the web. It can contain
The development of the world wide web graphics, text, sound and video as well as
started in 1990 by an English computer sci- hyperlinks to other web pages.
entist called Timothy Berners Lee, a brilliant
independent contractor at the European Or- 4 Website: This is a collection of related
ganisation for Nuclear Research (CERN), web pages hosted by the same person,
Switzerland. company or organisation.
Browser and web server software were
available in 1991. In 1992, a few preliminary
5 Home page: This provides information
sites existed in places like University of Il-
linois, where Marc Andreesen became in- about the purpose and content of the web
volved. At the end of 1992 they were about site.
26 sites.
The first browser which became popu- 6 Uniform resource locator (URL): This
larly available was Mosaic in 1993 – it was can also be called a web page address or
very slow and could not download pictures. a unique address on a website. It consists
At the end of 1994, there were a million of a protocol, a domain name and some-
browser copies in use. In the same year, Marc times the path to a specific web page, e.g.
Andreesen founded Netscape Corporation, http://www.learnafrica.com..
and the world wide web consortium which
administers development of world wide web 7 Protocol: This is used to transfer data. It
standards, that was formed by Tim Berners
is always http:// for web pages.
Lee.
The first search engine came up in the
mid 1990s; it did not take long for Google 8 Web server: This is a computer system
to come on scene, and establish a dominant that delivers to request web pages.
market position.
9 Web browser: It is a program that inter-
Basic world wide web terminolo- prets HTML and displays web pages. It
gies can also be called browser: it enables
you to link to other web pages and web-
1 World wide web: This is a system of sites.
Internet servers that supports hypertext
and multimedia to access several Internet 10 Hypertext markup language (HTML):
protocols on a single interface. This is a set of special codes called tags
that define the placement and format of
2 Hyperlink: This can also be called a link, video, graphics, text and sound on a web
and it is the connection between one web page.
page and another. The link can be either
text or graphic image. It is usually indi- World wide web protocols
cated by underlining and colouring them
differ-ently from other texts on the web The following are some of the world wide
page. web protocols:
• ARP: Address resolution protocol

15
• DHCP: Dynamic host configuration pro- 6 It allows people develop lines of com-
tocol munication that promote contact with
• DNS: Domain name service potential clients and organisations.
• DSN: Data source name 7 It provides business information. A
• FTP: File transfer protocol website can post your business services,
• HTTP: Hypertext transfer protocol hours, location, phone number and
• IMAP: Internet message access protocol e-mail for the public to view; but unlike
• ICMP: Internet control message protocol the traditional advertising media, your
• IDRP: ICMP router-discovery protocol website can provide instant communica-
• IP: Internet protocol tion and information about your com-
• IRC: Internet relay chat protocol pany that changes regularly.
• POP3: Post Office Protocol version 3 8 Remote employee/office access. Sensi-
• PAR: Positive acknowledgment and re- tive information can be protected with a
transmission password for employee access only. For
• RLOGIN: Remote login the cost of a local phone call, an employee
• SMTP: Simple mail transfer protocol can log into the ‘office’ from anywhere in
• SSL: Secure sockets layer the world at any time.
• SSH: Secure shell
• TCP: Transmission control protocol
• TELNET: TCP/IP terminal emulation Navigating through websites,
protocol using website addresses
• UPD: User datagram protocol
• UPS: Uninterruptible power supply There are several ways to navigate web pages
on the Internet. The use of a web browser
allows for the convenience of viewing pag-
Benefits of the world wide web es on the computer, mobile phone or other
types of electronic equipment with Internet
The following are advantages of the world facilities.
wide web. The following are steps involved in navi-
1 The world wide web makes it feasible to gating through websites.
access information and make friends 1 Open your mobile web browser. For ex-
across the globe. ample, if you have Safari installed on
2 Browsers make it easy to use and navi- your iPhone, iPad or Blackberry, look for
gate the web. the icon on the application screen and tap
3 The web can be used as a dynamic pre- it.
sentation tool. 2 Use the keyboard on your mobile phone.
4 You can access any data at any location as Type a website address in the search box.
long as it is on a server using the world Tap the text box with the magnifying
wide web. glass search icon.
5 There is also the benefit of communica- 3 Use your finger to navigate web pages.
tion, in the sense that you can simply go For example, if you are using an iPhone,
on the web, type an e-mail, send it and it rotate it 90 degrees to see a page in por-
goes instantly. trait or landscape orientation. Double-
16
tap the screen to zoom in or out. This will not have to be an expert programmer to
increase or decrease the size of the text or develop a website.
image on the page.
4 Look for several buttons located near the 5 Photoshop CS5.5
top of the page, such as ‘Add Bookmark,’ This is a top-quality professional photo
‘Forward,’ ‘Backward,’ ‘Pages’ and ‘Stop.’ editing tool that creates fantastic effects!
Use them to help you navigate the page. This design software is ideal for photog-
Tap the ‘Page’ button near the bottom of raphers, graphic designers, and seasoned
the screen to view several open pages. web designers.
Swipe the screen, left or right, to view the
web pages. Tap on the page you want to 6 Flash professional
see. This is the single most popular design
software for web site animation.

Softwares for website designs and Summary


their uses
This chapter has taught the following:
1 Web studio • The world wide web is a system of Inter-
This is an easy-to-learn web design pro- net servers that support hypertext and
gram. Web studio has everything needed multimedia to access several Internet
to create and upload a site. It has galler- protocols on a single interface.
ies with backgrounds, buttons, colour
schemes and other graphics that can be • The acronym www stands for the world
used to design web pages. It has unlim- wide web, and is usually called the web or
ited expansion and it is very fast. W3.

2 Dreamweaver • The development of the world wide web


Dreamweaver remains the clear best started in 1990 by an English computer
website software for Mac users. scientist called Timothy Berners Lee, a
brilliant independent contractor at the
3 Fireworks European Organisation for Nuclear Re-
This is a rapid web design software tool search (CERN), Switzerland.
specifically built for web designers. Ado-
be’s Fireworks CS5.5 is highly recom- • Protocol is used to transfer data, and it is
mended for the creation of well-designed always http:// for web pages.
and optimised websites.
• The world wide web makes it feasible to
4 Dreamweaver CS 5.5 access information and make friends
It is used to design, program, manage, across the globe.
update and publish cutting edge profes-
sional websites with ease and consisten- • Browsers make it easy to use and navi-
cy. Dreamweaver CSS.S generates valid gate the web.
HTML/XHTML code for you, so you do

17
• You can access any data at any location as D Web page
long as it is on a server using the world 5 ________________ provides information
wide web. about the purpose and content of a web-
site.
• The web can be used as a dynamic pre- A Protocol
sentation tool. B Home page
C Web page
• The home page provides information D Web browser
about the purpose and content of a web-
site. Essay-type questions
1 Mention ten world wide web protocols.
2 State five benefits of the world wide web.
Review questions 3 State five steps involved in navigating
through websites, using website ad-
Multiple choice questions dress.
1 The acronym www stands for the follow- 4 List five software for website design and
ing except _____________. their uses.
A world web wide
B world wide web
C web world wide
D world wealth war
2 ___________ is a system of Internet serv-
ers that support hypertext and multime-
dia to access several Internet protocols on
a single interface.
A World wide web
B World web wide
C Web world wide
D World wealth war
3 The development of the world wide web
was established by an English computer
scientist called _____________.
A Philip Emelugwa
B Charles Darwin
C Timothy Berners Lee
D Marc Andreesen
4 What is the electronic document that is
viewed on the web which contains graph-
ics, text, sound, and video as well as hyp-
erlinks to other web pages?
A Web browser
B Web site
C Web server

18
Chapter

3
Cables and connectors

Learning objectives
At the end of this chapter, you should be able to:
• decribe cables and connectors;
• list network connectors;
• list types of computer cables;
• list types of data cables; and
• list types of connectors.

Introduction Cables are used to connect most new de-


vices to the computer, including flash mem-
In communications systems, cables and con- ory sticks, portable media players, Internet
nectors are important tools that are used to modems, mice, keyboards, webcams, porta-
allow flow of electrical signals (pulses) be- ble hard-drives, microphones, printers, scan-
tween devices, thereby making it possible ners, speakers and digital cameras.
for devices to be adequately linked together.
They allow direct communication between
one device and the other.

Cable
A cable is composed of one or more electric
conductors, covered by insulation and some-
times a protective sheath, used for transmit-
ting electronic signals or the impulses of an
electric communications system.
Cables are often bundled with the pur-
chased computers or other electronic gad- Fig. 3.1 A cable
gets, but sometimes they are not and; hence,
the user needs to purchase the cables.
19
Connector 2 Digital optical audio cable: This connec-
tor cable is used for high-end audio such
A connector is a piece of hardware (coupler) as connecting the output of a DVD player
used to join cables together or to join a cable and some game consoles to the digi-
to a device, examples are RS-232-C connec- tal audio stream, e.g. Toslink also called
tor used to join a modem cable to a computer S/PDIF connector.
and the RJ-45 connector that connects com-
puter to a network.
Most types of connectors are available in
one of two genders—male or female. A male
connector is characterised by one or more
exposed pins, while a female connector is
characterised by one or more receptacles de-
signed to accept the pins on the male connec-
tor.

Fig. 3.4 Digital optical audio cable

3 RCA connector cable: The RCA connec-


tor cables are a bundle of 2-3 cables in-
cluding composite video (coloured yel-
low) and stereo audio cables (red for right
channel and white or black for the left au-
dio channel). They are usually used for
connecting DVD player, stereo speakers,
Fig. 3.2 A connector digital camera and other audio/video
equipment to the television.
List of cables Also, RCA cables can
The following are some of the cables used to be plug-in to the computer
connect devices: through a video capture card, and this
1 Audio jack cables: These types of cables will allow transfer of video from an old
are used for connecting various audio de- analog camcorder into the computer’s
vices to the computer. hard drive.

Fig. 3.5 RCA cable connector


Fig.3.3 Audio jack cable
20
4 HDMI connector cables: HDMI cable
provides both audio and video trans-
mission through a single cable. It sup-
ports a maximum resolution of 4096 ×
2160p whereas HD is only 1920 × 1200p.
They are used for connecting Blu-ray
players to an HDTV. Standard HDMI
cables can be up to 5 metres long, but
higher quality ones can be up to 15 me-
tres long or more, and the length can be
further increased with amplifiers.
HDMI is backward compatible with
DVI (Digital Visual Interface) therefore, Fig. 3.7 Displayport connector cable
a converter can be used to watch video
on a DVI device through the HDMI cable.
Another cable is needed for the audio.
Data cables

A data cable is any medium that allows


baseband transmissions (binary digits of 1,
0’s) from a device transmitter to a receiver.
Examples are:

1 Monitor cables

Fig. 3.6 HDMI connector cable

5 Displayport connector cable: Display-


port cables can be up to 3 metres long,
but at lower resolution cables can be up
to 15 metres long.  Displayport connec-
tors are available to connect VGA, DVI
video, or HDMI video and audio with a
Fig. 3.8 Monitor cables
displayport cable or connection. Convert-
ers are sometimes available to convert
mini displayports into standard display- These are used to connect the monitor
ports. to the computer. Video connectors for com-
puter monitors and high-definition TVs is
the VGA (video graphics array) cable which

21
most often has 15-pins. A VGA cable is also 4 eSATA cables
used to connect a laptop to a television screen eSATA cables are designed for portable
or a projector. hard drives, and can transfer data faster than
USB or firewire. SATA cables, on the other
2 S-Video cables hand, are used internally for connecting the
S-video cables, also known as separate video hard drive to the computer’s motherboard.
or super video cables, are used for transmit- Keep in mind that eSATA cable cannot
ting analog video signals. They are common- transmit power like USB does; you cannot
ly used for connecting DVD players, cam- power an external hard drive with eSATA.
corders, etc. to analog TV sets. The eSATA cable is somewhat different from
the internal SATA cable; it has more shielding
and a larger connector.

Fig. 3.9 S-Video cables

3 Firewire IEEE 1394 Fig. 3.11 An eSATA cable


Firewire is a serial bus, which means that
information is transferred one bit at a time. 5 Printer cables
Firewire, otherwise known as IEEE 1394, A printer cable is the cable that carries
i.Link, or Lynx, is a faster alternate to USB data between a computer and a printer. There
and it is commonly used for connecting digi- are different types of printer cables such as
tal camcorders and external hard drives to a parallel printer cable, serial printer cable,
computer. USB printer cable. etc.
It is also possible to ad-hoc network a) Serial cable: A serial connector cable
computers without a router over firewire. is a set of wires used to transfer infor-
Firewire typically has 6 pins in its connector, mation from the CPU to an external
though a 4 pin variety is common as well. device such as a keyboard, mouse,
modem, scanner and some printers.
This type of connection transfers only
one piece of data at a time. The ad-
vantage to using a serial connection
is that it provides a reliable connec-
tion over long distances. Examples
are RS-232, EIA-422.
b) Parallel cable: This is the oldest par-
allel port used by printers and it is
Fig. 3.10 Firewire cable slowly being phased out; it is regard-
22
ed as obsolete. USB adapter (also with two or three pins; they sometimes come
called parallel-to-USB) cable is used with current stabilisers.
to connect printers and scanners with
only parallel ports.
c) Universal serial bus (USB): This in-
terface was developed as the stan-
dard for connecting external devices
by transferring data between com-
puter devices thereby replacing both
the serial and parallel ports, because
of its enormous data transfer speed.
It was developed by a group of
companies that includes Microsoft,
Intel, and IBM. USB can also provide
a small amount of power, eliminating
the need for external power cables for Fig. 3.13 Power cable
most peripherals.
USB cable with USB-A end – This Male connector
cable has a USB connector that is used The male connector is a type of connector that
to connect devices together. has pins for insertion into a receptacle. Male
connector part numbers often include an M
(male) or a P (plug). For example, a male
DB-9 connector might be labeled DB-9M.

Fig. 3.12 A USB cable

Power cables
A power cable is composed of one or more
Fig. 3.14 Male and female connectors
electric conductors, covered by an insulator
and sometimes a protective sheath. It is used
for transmitting electric power or the impuls- Female connector
es of an electric communications system. The female connector is a type of connector
Power cables come in various forms and that has one or more receptacles for the inser-
shapes. They usually assume a black colour tion of pins. Female connector part numbers
often include an F (female), an S (socket), a J

23
(jack), or an R (receptacle). For example, a fe-
male DB-9 connector might be labeled DB-9F.

Network cables
Network cables are data cables used to con-
nect one network gadget to another or to con-
nect two or more computers to share printer,
scanner, plotter, etc. Examples of network
cables used in networking connections are
coaxial cable, optical fiber (fiber optic) cable
and twisted pair cables.
The choice of cable depends on the net- Fig. 3.15 Twisted pair cables
work topology, size and protocol. Each com-
ponent of the computer network can be sepa-
rated through ethernet when the distance is a 2 Optical fiber cable
few metres apart or through the interconnec- An optical fiber cable (also called fibre optic
tions of the Internet for unlimited distances. cable) is a cable containing one or more op-
The following are examples of network tical fibers. The optical fiber components are
cables; typically independently covered with insu-
1 Twisted pair cables; lated plastic layers, and contained in a pro-
2 Optical fiber cables; tective tube that is suitable for the location
3 Coaxial cables; where the cable will be used. Fibre optic cable
4 Patch cables; is in increasing demand as the requirements
5 Ethernet crossover cables; and for faster data transmission increases. Fibre
6 Telephone cables; optic cables have many advantages over old
fashioned conventional copper cables such
1 Twisted pair cable as:
Twisted pair cable is a form of cabling in a) It is smaller in size than copper cables.
which two conductors are twisted together b) It is lighter and easier to install.
for the purposes of preventing out electro- c) It has immunity to unwanted electrical
magnetic interference from external sources. interference.
This cable carries signals from one device to
another. Twisted pair cables are classified
into two types:
a) unshielded pair, and
b) shielded twisted pair.
Example of twisted pair cable is Category 5
cable (Cat 5).
Fig. 3.16 Optical fiber cable

24
3 Coaxial cable
Coaxial cable is an electrical cable with an
interior conductor surrounded by a flexible,
tubular insulating layer, with a tubular con-
ducting shield.
The most common use of the coaxial
cable is the use as a transmission line for ra-
dio frequency signals. It transmits television
signals and other signals with bandwidth
of multiple megahertz. It is also employed as
home coaxial cable for high-speed home net-
Fig. 3.18 A patch cable

5 Ethernet crossover cable


woven copper shield
This is a type of cable that is used to connect
computing devices together directly, where
they would normally be connected via a net-
work switch, hub or router, such as directly
connecting two personal computers through
network adapters.
copper core outer plastic
sheath 6 Telephone cables
A telephone cable is a piece of conductor wire
inner electric
that carries signals from one device to anoth-
insulator er. The components are finely distinguished
from each other and coated with insulator
Fig. 3.17 Coaxial cable outer layer.
Examples of telephone connectors are
6P2C for RJ11 single telephone line, 6P4C for
working applications. RJ14 two telephone lines, 6P6C for RJ25 three
4 Patch cable telephone lines, 4P4C and 4P2C for handset
A patch cable is a very fast connection speed cables, 8P8C for RJ61X four telephone lines,
cable. It is an electrical or optical cable that RJ48S and RJ48C for four-wire data lines, and
is used to connect one electronic or optical RJ31X single telephone line with equipment
device to another for signal routing. Switches disconnect.
connected to computers, or switches connect-
ed to routers are connected with patch cords.
Patch cords are relatively short, perhaps no
longer than two metres, and are usually pro-
duced in many different colours so as to be
easily differentiated.

Fig. 3.19 Telephone cable


25
Quality and reliable booted RJ45 cat5e patch
leads are the glue which holds networks to-
gether.

T- connectors
These are intended for connecting coaxial
network cables.

Fig. 3.20 Phone /RJ11 cable

The telephone cable, otherwise known as


RJ11, is still used around the world for con-
necting to the Internet through DSL/ADSL
modems. A standard phone cable has four
wires and the connector has four pins. The Fig. 3.22 A T-connector
connector has a clip at the top to help main-
tain a tight connection. Summary
Connectors This chapter has taught the following:
RJ45 connector • Cables and connectors are important
The RJ45 connector, otherwise known as Eth- tools that are used to allow the flow of
ernet cable, is based on Cat5 twisted pair ca- electrical signals between devices there-
ble and is made from 8 individual wires. by making it possible for devices to be
The RJ45, likewise, has eight pins and adequately linked to each other.
looks like a phone plug, but is actually thicker
and wider. It too has a clip to help maintain a • A cable is composed of one or more
tight connection like a phone connector. electric conductors, covered by insulator
and sometimes a protective sheath, used
for transmitting electronic signals or the
impulses of an electric communications
system.

• A connector is a piece of hardware (cou-


plers) used to join cables together or to
join a cable to a device.

• Cables include audio equipment cables,


digital optical audio cables, audio and
video cables.
Fig. 3.21 RJ45 connectors

26
Review questions 7 An example of data cable is power cable.
___________
Multiple choice questions 8 Serial cable is used to transfer informa-
1 In communications systems, __________ tion from the CPU to an external device
and ___________ are important tools that such as a keyboard, mouse, modem,
are used to allow the flow of electrical scanner. ___________
signals (pulses) between devices. 9 Study the figure below and circle the con-
A cables and connectors nector that is female.
B wire and links
C cables and cartridges
D cables and CAT
2 Cables are ___________.
A electrical conductors covered by insu-
lators
B insulators covered by electrical con-
ductors 10 The part labeled B in the figure below is
C conductors covered by conductor the _____________.
sheaths A
D solar conductors.
3 An audio jack cable is used for connect-
ing ___________.
B D
A computer machine
B mobile devices
C audio devices to the computer C
D visual devices.
4 The RCA cables are usually used for con- Essay-type questions
necting ___________. 1 What are cables and connectors? Give five
A DVD player examples each.
B stereo speakers 2 a) Write short notes on three types of net-
C digital camera work cables.
D all of the above b) What are the uses of these cables?
5 HDMI cable provides ____________. 3 a) Write short notes on three types of net-
A only audio transmission work connectors.
B only video transmission b) What are the uses of these connec-
C both audio and video transmission tors?
D video transmission through multiple 4 State the difference between data cable
single cable. and power cable.
5 Write briefly on the following:
State whether True (T) or False (F): a) Audio equipment cables
6 A data cable is any medium that allows b) Digital optical audio cables
baseband transmissions (binary 1, 0’s) c) Audio and video cables
from a device transmitter to a receiver. d) Female connectors
___________ e) Male connectors

27
Chapter

4
Database

Learning objectives
At the end of this chapter, you should be able to:
• define database and database package;
• state examples of database packages;
• define the basic terms in database;
• state the different forms of database organisation;
• recognise and state the features in a computer database
format;
• create a database; and
• carry out basic operations on an existing database.

Introduction place or thing) stored together.


2 It is an orderly arrangement of collected
Before the invention of computers, manual computer data, which is arranged so that
database stored in file cabinets were the main it can be automatically retrieved or used.
method of storing large volumes of informa- It is also referred to as data bank.
tion. This method involves gathering infor- Examples of a very simple database
mation on sheets of paper or related objects, are:
and creating different files which are later a) An address book
stored in file cabinets. b) A list containing telephone numbers
Database has been in use for a long time c) A list containing students’ results
and works well for small amounts of data. 3 Database is a comprehensive collection
However, once the volume of data starts to of related data organised for convenient
increase it can present many problems to the access, generally in a computer.
organisation, hence the need for computers
arose. Database package
A database package is a kind of software that
Database enables organisation and storage of related
1 Database is a collection of related data data together, so that specific pieces of infor-
about a particular subject (e.g. a person, mation can be retrieved easily, conveniently

28
and quickly. Examples of database packages:
A modern database also allows applica- 1 Microsoft Access (MS-Access)
tions to link to the data in such a way that 2 Dbase 3+
the structure of the database is transparent 3 Dbase IV
to the application. This has led to powerful 4 SQL, SQL server
integrated systems being set up and used in 5 Oracle
many businesses. An integrated system is 6 DB2 (from IBM)
one that makes it easy to pass information 7 Open source
from one system to another without having 8 My SQL
to transfer the data manually.

Basic terms in database


1 Record: This is a set of related items of data which are regarded as a unit.

Table 4.1

Student ID Surname First name D.O.B Address Phone


CSC/11/001 Akande Olufunmilola May 30 Abeokuta 080237653987
CSC/11/002 Bello James Sept 10 Ibadan 080677549844
CSC/11/003 Coker Alice March 3 Lagos 070657532333

In Table 4.1 above, all the information about each student constitutes a record.
There are two types of records:
a) Logical record: The type of information stored in this record is determined by the na-
ture of information without any consideration for the storage device holding it.
b) Physical record: This type comprises two or more records that are written, read and
stored as a single block.
2 Table: A table can be defined as an organised collection of related records. A table is divid-
ed into rows and columns. Each row holds a record and each column represents a unique
field.
3 Field: This is an area reserved for each piece of individual data (each data item) such as
student ID, Surname, First name, Date of Birth, Address, etc.
4 Object: This is an option you can select and manipulate.
5 Form: A form allows us to perform the following tasks:
a) View the data stored in tables or queries, in another format.
b) Add new records to a table.
c) Make changes to data in any field of a record.
6 Query: This is database software that enables the user to view data from one or more
tables in a specific order.

29
Database organisation plier. In addition, a customer can also be a
supplier.
Database organisation is simply the way in
which the data within the database is struc- Relational database structure
tured. The ideas for the relational database struc-
There are three types of database organ- ture were first proposed by Edgar Codd in
isation: the 1970s.
1 Hierarchical database structure The relational database structure is based
2 Network database structure on a relational model which can be thought
3 Relational database structure of as a table in which each row of values, as
far as we are concerned, corresponds to a
Hierarchical database structure logical record. Codd called these records or
This is ideal for the one-to-many relation- rows n-tuples, or in a more simple way, tu-
ships found naturally in a tree-like arrange- ples.
ment in some organisations. A tuple specifically refers to the row (or
record) of data in the relation or table. How-
ever, a column is referred to as an attribute.
Parent
A single field is alsoregarded as an attribute.
Each table or relation usually corresponds to
a file.
Child 1 Child 2 Child 3 Child 4
Computer database
School records
A computerised database is a container of ob-
jects. Microsoft Access is one of the database
packages which allow creation of files that
(Student 1) (Student 2) (Student 3) (Student 4)
can be queried or filtered. Unless it has been
specifically designed to use data or code from
Academic Social Medical report
another source, an Access database stores its
Fig. 4.1 Hierarchical database structures tables in a single file along with other objects,
such as forms, reports, macros and modules.
From the two diagrams in Fig. 4.1, we can see
Databases created in the Access (2003, 2007)
that a hierarchical data structure is just a par-
format have the file extension.
ticular case, that is, a database that has been
A database can be designed for the list
set up based on a hierarchical data structure.
below:
Links or pointers are established to enable
• Matriculation number
very fast search and processing of data items
• Surname
based on these naturally occurring structures.
• Other names
• Age
Network database • Department
In a network database structure, a record can
• Faculty
have multiple owners. For example, one sup-
• Year of entry
plier may have two or more customers; also
• Course
one customer may have more than one sup-

30
A table can be designed for the list in page 30.

Table 4.2
Matric Surname Other Age Dept. Faculty Year of Course
no names entry

11/001 Akande Adenike 18 Computer Science 2008 CSC

11/002 Ben-nana Toritseju 17 Maths Science 2008 Mat

From Table 4.2, we can see that the data have Note:
different fields, field size and field types. The • A key must be common to the two tables
convenience in this is that more records can e.g. Matric no.
be added. • A relationship must be created between
the two tables.
Fields: A field has certain defining character-
istics. Every field has a name that uniquely Types of relationship
identifies the field within a table, e.g. matric
number, or security number, or registration 1 One-to-one relationship. For every re-
number. cord in one of the tables, one correspond-
ing record exists in the other table.
Field size: This is the number of characters or 2 One-to-many. For each record in a table,
bits in a field, e.g. the field size for surname is many corresponding records may exist in
12 (which implies that you cannot enter more the related table.
than 12 bit/digits for surname).
Starting a database package e.g. (Ms-Access)
Field types: They are the types of data being Step 1: Design the database and identify the
entered, or they determine the values that purpose (by listing the fields).
can be stored and the operations that can be Step 2: Load Microsoft Access on the system
performed, e.g. test data, number, date, data if it is not preloaded.
type, picture (object linkage), etc. a) Click on Start button.
To reduce repetition and redundancy, da- b) Select Program.
tabase can be split into two or more tables. c) Select Microsoft office.
d) Click on Ms-Access.
Database
A database screen will appear.

Table 4.3(a) Table 4.3(b)


Main table Course table e.g.
Bio-data table Matric no.
(e.g. Matric no. Course code.
Surname) Level.
Session/year

31
Fig.4.2. Ms Access page

Step 3: Click on New. acteristics of the table.


a) Click on blank database. c) Table wizard: This is the easiest and fastest
b) Enter the desired database name (such as method of creating a table. The table wiz-
students’ records….). ard walks you through a four-step pro-
c) Click on Create. cess that is very easy to follow, although
This will create database windows. A dia- the resulting table may not meet the us-
logue box having the name of the database er’s exact requirements.
is displayed along with the database objects.
In this chapter, we will use method 2 which
Step 4: Create tables and enter fields. Tables is design view.
can be created using any of the fol-
lowing methods: Creating a table in design view
a) Datasheet view: You enter data into the 1 Open the database.
datasheet grid which consists of rows 2 Click on Tables (tab).
and columns labelled ‘Field 1’, ‘Field 2’, 3 Click on New (the New Table dialogue
‘Field 3’, etc. Access will determine the box appears).
data type based on the data you enter. 4 Select Design view.
b) Design view: This method enables the 5 Click on OK (the table design view will
user to create a table from scratch. The appear).
user can precisely determine all the char-

32
Table 4.4: The table design view window
Column

Selection

Row

Note Defining a primary key


The row selected enables the user to choose 1 Display the table in Design view.
the row in which he wishes to enter, change 2 Select the field that you would like to
or delete information, by using the mouse or define as the key field by clicking any-
the up and down arrow keys. The selected where within it or by using the new selec-
row has an arrow in the row-selected column. tor.
1 The ‘field name’ column enables the user 3 Click on the primary key button ▢ in the
to type in a field name. tool bar or pull down the Edit menu and
2 The data type column enables the user to select Primary key.
select an appropriate data type from a
drop-down list. Adding a field to an existing table
3 The description column is for typing out With the table in Design view, enter the new
a short description of the field. field name, data type and description in the
appropriate columns. However, if the field
has to be inserted between two existing rows,
Adding fields to a table in Design view
perform the following:
1 Type a field name in the Field Name 1 Place the selection in the row above
column. where you want the new field to be in-
2 Press the tab key or use the mouse to serted.
move to the Data Type column. 2 Pull down the inserted menu, and select
3 Select a data type from the drop-down rows.
list. 3 A blank row appears. Type in the new
4 Move to the description column and type field name, data type and description.
a short description of the information
that will be held in the field. Deleting a field
5 After this, pull down the file menu. 1 Open the table in Design view.
6 Select Save or Save As to save the table 2 Select the desired row.
within the current database. 3 Press the Delete key, or pull down the
7 Type in a name for the table and click Edit menu and select Delete.
OK.

33
Entering records into a table Select query: It is used to retrieve data from
After saving the structure of the table, you a table or multiple tables. The set of record
can now insert data into each field of each selected by a query is called a dynaset. In
record. other words, a select query uses the criteria
With the table displayed in Design view; you specify and then displays it in the order
1 Pull down the view menu. you want.
2 Select Datasheet view.
3 Type in the data under each heading. Creating a new query
1 Open the database.
4 Continue until you have entered data for
2 Click the query object tab in the data-
all the records.
base window.
Deleting a record 3 Click on New. The New query dialogue
1 Open the table as a datasheet. box appears.
2 Select the record to be deleted. 4 Select Design view.
5 Click Ok. (The show Table dialogue box
3 Press the Delete key or pull down the
shown with the query grid).
Edit menu and select Delete.

Editing a record Adding tables to query


1 Open the table as a datasheet. 1 Select the table(s) from the list in the
2 Select the required field of the appropri- table.
2 Click Add to add them to the upper part
ate record.
of the query design grid.
3 Type in new information or edit the exist-
3 Click close.
ing information.
Removing a table from query
Queries 1 Select the table from the query design
grid.
A query is an Access object that enables you
2 Right click the mouse (a drop-down
to view data from one or more tables in a
menu appears).
specified order.
3 Select Remove Table.
A query stores the questions you ask
about information from one or more tables in Running a query
a database. In a nutshell, the query is used to 1 The Run Command is an instruction to
find and retrieve/filter just only the data you the database to perform the operations
want. specified in your query.
2 Click the RUN button on the toolbar, or
Types of query pull down the query menu and click on
RUN.
There are three main types of queries;
1 Select, Report
2 Action (Delete, Append, Update and
Make-table), and A report consists of information that is
3 Crosstab. pulled from tables, as well as information
that is stored with the report design, such
The most common type is a select query. as labels, headings and graphics. The ta-

34
bles or queries that provide the underly- taining to one person, place or thing.
ing data are also known as the report’s The two types of record are logical and
record source. physical record.

Creating a report, using the Report tool • A table is the basic unit of a database. It is
A report tool provides the fastest way for you a collection of related data about a speci-
to create a report, because it generates a re- fied subject.
port immediately without prompting you for
information. The report displays all the fields • A field is an area reserved for each place
from the underlying table or query. of individual data (such as student ID,
The Report tool may not create the final, surname, first name, date of birth).
polished product that you ultimately want, • An object is an option you can select and
but it is quite useful as a means to quickly manipulate.
look at
the underlying data. You can then save • A form is a method used to enter, view or
the report and modify it in Layout view print the information in a table.
or Design view.
1 In the Navigation, click the table or • Database mode is simply a model of the
query (on which you want to base the way in which the data within the data-
report). base is structured.
2 On the create tab, in the Reports
group, click Report. • The three main types of database models
3 Create a report by using the Report wiz- are:
ard. • Hierarchical database structure
4 On the create tab, in the Reports group, • Network database structure
click Report wizard. • Relational database structure
5 Follow the directions on the report wiz-
ard page. On the last page, click Finish. • Microsoft Access is one of the database
packages which allows you to create files
Save your report designs that can be queried or filtered.
1 Click the Microsoft Office Button.
2 Click on save. • A query is an Access object that enables
3 If the report is untitled, type a name in you to view data from one or more tables
the Report Name box and then click Ok. in a database. There are three main types
of queries: sheet, action and crosstab queries.
Summary
• A form is a method used to enter, view
This chapter has taught the following: and print information other than simply
• A database is a comprehensive collection
through rows and columns.
of related data organised for convenience
access, generally in a computer.
• A report consists of information that is
pulled from tables or queries, as well as
• A record is a group of related fields per-

35
information that is stored with the report C Spreadsheet
design, such as labels, headings and D report
graphics. 7 A primary key can _________________.
A speed up data retrieval
Review questions B sort records according to values in
fields
Multiple choice questions C enable you to establish relationships
1 A collection of related information is a between tables
_________________. D do all of the above
A form 8 Tables can be created using any of the fol-
B cell lowing except _________________.
C database A datasheet view
D field B design view
2 The following are examples of database C data base
packages except _________________. D table wizard
A Dbase 3+ 9 An Access object that enables you to view
B Ms-word data from one or more tables in a speci-
C My-SQL fied order is _________________.
D Oracle A query
3 A table is divided into _________________. B tables
A length and breath C forms
B field and record D none of the above
C rows and columns 10 Which of the following fields can be used
D none of the above as a primary key?
4 The following are examples of database A Surname
models except _________________. B First name
A hierarchical C Phone number
B local area network D Student number
C relational
D network Essay-type questions
5 Which of the following types of informa- 1 Design a database with the following:
tion can be stored in an electronic data- ID-number, Patient name, Sex, Nature of
base? _________________. disease, Prescription and Amount paid.
A Text 2 Discuss the basic terms in a database.
B Alphanumeric 3 Explain how an electronic database can
C Date help you find information.
D All of the above 4 Differentiate between hierarchical and
6 Which of the following are not objects network database modes.
found in a computerised database? 5 Explain traditional database.
_________________.
A Form
B Table

36
Chapter

5
Graphics (CorelDraw)

Learning objectives
At the end of this chapter, you should be able to:
• define graphics;
• list examples of graphic packages;
• state features in CorelDraw environment;
• open CorelDraw;
• use CorelDraw to make simple designs; and
• close and exit CorelDraw.

Draw 11 and CorelDraw 12.


Introduction It is necessary to understand the features
in the Corel Draw environment because al-
A graphic is a digital representation of non-
most all the versions are indeed very similar
text information, such as drawing, chart, or
to one another.
photograph. A graphic can also be called a
picture or image which contains no move-
1 Title bar: This is the bar that displays the
ment or animation.
name of the current environment.
Examples of graphics packages are Ms-
2 Menu bar: This is the bar that contains the
Paint, Harvard Graphics, Photoshop, Corel-
pull-down menu options which can be
Draw, Instant Artist, Logic Graphic, Corel-
used in accomplishing various task
Dream.
3 Standard toolbar: This is the bar that
CorelDraw is a software that is specifi-
contains shortcut icons to menu and oth-
cally designed for desktop publishing. It can
er commands.
also be used for word processing and page
4 Toolbox: This is a floating bar that con-
layout.
tains tools for creating, filling, and modi-
fying objects in drawing.
Features in CorelDraw environ- 5 Property bar: This is a detachable bar
ment with commands that relate to the active
tool or object. For example, when the text
There are so many versions of Corel Draw
tool is active, the text property bar dis-
such as; CorelDraw 8, CorelDraw 9, Corel-
plays commands that create and edit text.

37
CorelDraw environment standard tool bar property bar
title bar menu bar

tool box

drawing
window

colour
pallette

drawing
page

Fig. 5.1 The CorelDraw environment


document navigator

6 Drawing window: This is the area out- of the application window that contains
side the drawing page, bordered by the information about the objects properties
scroll bars and application control. such as type, size, colour, fill, and resolu-
7 Drawing page: This is the rectangular tion. The status bar also shows the cur-
area inside the drawing window. It is the rent mouse position.
printable area of your working area. 11 Colour palette: This is the dock able bar
8 Rulers: These are the horizontal and ver- that contains colour swatches.
tical borders that are used to determine
the size and position of objects. Opening CorelDraw
9 Document navigator: This is the area at 1 Click the start button.
the bottom left side of the application 2 Click All programs.
window that contains the controls for 3 Click Corel graphic suite 11(depending
moving between pages. on the version on you system).
10 Status bar: This is the area at the bottom

38
Default screen

Fig. 5.2 Default CorelDraw screen

This is the default screen of CorelDraw 11 Help project.


Graphic suite with a dialog box that gives 6 What’s New: This button takes you to the
room for options to start with. different newer versions that the old one
does not have.
1 New Graphics: By clicking on New
Graphics option, a new project is started Setting up a page in CorelDraw
entirely. 1 Select layout from the main menu bar.
2 Open Last Edited: By clicking on Open 2 Select page setup (the page setup dialog
Last Edited, the last job worked on will box appears).
come up. 3 Select the paper orientation (portrait or
3 Open Graphics: By clicking on Open landscape) and paper size (letter, legal,
Graphics, the Open drawing dialogue A3, A4, A5, B5 etc.).
box comes up. 4 Select OK.
4 Template Option: This takes you to dif-
ferent template designs that you can Some tools in a toolbox
choose from. 1 Pick tool is used to select, transform,
5 Corel Tutor: This is the button that serves stretch and transfer objects. It is also used
as a shortcut to launching Corel Draw to move an object (text, picture, etc.).

39
2 Shape tool is used to modify, shape and defining the start, center points and end.
adjust the shape of an object. 21 Pen tool is used to draw lines, one seg-
3 Knife tool is used to cut through objects. ment (curved or straight) at a time by
4 Eraser tool is used to remove areas of placing each node with precision and
your drawing. controlling the shape of each curve seg-
5 Smudge brush is used to distort a vector ment.
object by dragging along the line.
6 Free transform tool is used to transform an Drawing of objects in CorelDraw
object by using the free rotation, angle
rotation, scale and skew tools. Drawing a circle
7 Virtual segment delete is used to delete 1 Click the ellipse tool.
portions of objects that are between inter- 2 Click and draw on the page to produce a
sections. circle.
8 Zoom is used to change the magnifica-
tion level through window. Drawing a perfect circle
9 Hand tool is used to control the visible 1 Click on ellipse tool.
parts of the drawing in the window. 2 Hold down the ctrl key, click and drag
10 Pen tool is used to draw curves one seg- from on page to produce a perfect circle.
ment at a time.
11 Poly line tool is used to draw freehand Filling a perfect circle with a special fill
lines (with curved and straight segments), a) Select a drawn circle.
as if you were sketching on a sketch pad. b) Click on the fill tool.
12 Interactive connector is used to join two c) On the fly out, click on the fourth tool
objects with one line. (texture fill dialogue box).
13 Ellipse tool is used to draw ellipses and d) Click on any of the texture list and see the
circles. preview.
14 Graph paper tool is used to draw a grid of e) Click OK to accept.
lines similar to that on a graph paper. f) Click the pick tool.
15 Star shapes tool is used to draw ribbon g) Click on outline tool.
objects and explosion shapes. h) Choose the fourth tool, that is no outline
16 Text tool is used to type words directly on (the circle shape loses its outline and
the screen as artistic or paragraph. leaves only the fill).
17 Interactive extrude is used to apply the
illusion of depths to objects. Drawing a rectangle
18 Eyedropper is used to select object proper- 1 Click on the rectangle tool.
ties, such as line thickness, size and 2 Click and drag from one upper end to the
effects from an object on the drawing other lower end of the page.
window.
19 Paint bucket is used to apply object prop- Filling a rectangle shape with colour
erties, such as fill, line thickness, size and a) Go to colour palette and pick a colour.
effects to an object on the drawing win- b) Click on any colour of your choice by
dow. left-clicking on any colour in the colour
20 3 Point curve is used to draw a curve by palette.

40
c) Click on your object to insert the colour Shaping elipse to form arcs and pie
(Ensure that the object is selected before 1 Select ellipse tool.
adding the colour). 2 Draw the ellipse in the working area.
3 Select the shape tool and drag it either to
Drawing a polygon the clockwise or anticlockwise movement
1 Click on the Polygon tool. at one corner, around the edge of an
2 Click and drag on the page. ellipse. Depending on the placement of
the cursor when dragging, you will get
Typing text either a simple arc or pie.
1 Click on the text tool (make sure you
have zoomed in into the page). Shaping line curve
2 Click on anywhere on the page and begin 1 Select the pencil tool.
to type. 2 Draw a line (hold down the mouse and
3 Type ‘Ajumobi Njideka’ for example. drag it to the appropriate direction).
4 Then click on the pick tool.
3 Select the shape tool and drag it to pick
5 Move up to the font list and change the
the desirable style.
font type and font size.
6 Select the text, and pick a colour from the
Moving, scaling, and stretching ob-
colour palette to the text.
jects
1 To move an object, drag it. To constrain
Selecting objects
the movement to the horizontal or verti-
To select an object
1 Click on the object. cal axis, hold down Ctrl while dragging.
2 To nudge the object, press the Arrow
To select an object that is behind another object keys.
2 Hold down Alt key and click on the ob- 3 To scale the object, drag one of the corner
ject. sizing handles, holding down Shift if
you want to scale from the center.
To select an object from within a group
3 Hold down the ctrl key and click on the 4 To stretch the object, drag one of the
object stretching handles, holding down Shift if
you want to stretch from the center.
To select multiple objects 5 The top and bottom stretching handles
4 Hold down the shift key and click on stretch the object vertically.
each object or drag to form a marquee 6 The left and right stretching handles
around the objects. stretch the selection horizontally.
7 To activate an object’s rotation and skew-
To select all objects
ing handles, click the center handle.
5 Double-click on the pick tool.

Shaping objects Applying special effects to objects


To start changing the shape of an object 1 The Interactive tools fly out offers a wide
Click the object with the shape tool to dis- variety of special effects that can be ap-
play its nodes. plied to objects.
Each type of object provides a specialised 2 The Blend tool allows blends to ob-
set of shaping methods. jects by dragging.

41
Alternatively, you can outline objects by us-
3 The Contour tool allows addition of
ing Color eyedropper tool or by using the
a series of concentric lines or 'steps' that
Outline fly out.
radiate inside or outside of the object’s
borders.
4 The Distort tool allows applying four
Simple designs in CorelDraw
types of distortion effects to objects.
Creating business cards
5 The Drop shadow tool allows addi-
1 Open a new document.
tion of drop shadows to objects, to create
2 On the layout menu click page setup.
the illusion of depth.
3 In the pop up window click labels and
6 The Envelope helps in applying an
then double-click on the folder AVERY
envelope with nodes that can be adjusted
LASER A4.
to reshape the object.
4 Select L7417 – 90 × 54 and click OK.
7 The Extrusion tool helps to extrude
5 A single blank card will appear on the
objects to create the illusion of depth.
screen (now you can start to design your
8 The Transparency tool lets you apply
business card).
transparencies to objects.
6 When the design is finished, click File
and select Print preview. The A4 print
Outlining objects
preview is then shown as overleaf.
1 To apply an outline colour to an object,
drag the colour from the colour palette to
the object’s outline.
Closing and exiting CorelDraw
1 Click on File menu.
2 Click on Exit sub-menu.
3 Select the appropriate option from the
exit dialog box.
2 To choose an outline colour, right-click a 4 Select OK.
colour on the colour palette.
3 To change the outline colour of the select-
ed object, right-click a colour on the co- Summary
lour palette. To tint the outline colour to-
wards another colour, hold down Ctrl This chapter has taught the following:
and right-click that colour on the colour • A graphic is a digital representation of
palette. non text information, such as drawing,
4 To choose a customised outline colour, chart, or photograph. A graphic can also
click and hold the mouse button, and be called a picture or an image which
then in the colour palette that appears, contains no movement or animation.
right-click a colour. • CorelDraw is a software that is specifi-
cally designed for desktop publishing.
• CorelDraw can also be used for word
processing and page layouts.
• Examples of graphic packages are Ms-
paints, Harvard graphics, Photoshop,
CorelDraw, Instant Artist, CorelDream,

42
and Logo graphics. 4 _______________ tool lets you add drop
• Some features in CorelDraw environ- shadows to objects, to create the illusion
ment are title bar, menu bar, standard of depth.
tool bar, property bar, drawing bar, A Contour
drawing page, ruler, document naviga- B Distort
tor, and status bar. C Envelope
• Some of the tools in a toolbox are pick D Drop shadow
tool, shape tool, knife tool, eraser tool, 5 To select multiple objects, hold down the
smudge brush, free transform tool, vir- shift key and click each object or drag to
tual segment delete tool, zoom, hand form a marquee around the objects. True
tool, and pen tool. or False? ____________
• There are so many versions of CorelDraw
such as CorelDraw 8, CorelDraw 9, Essay-type questions
CorelDraw 11 and CorelDraw 12. 1 What is CorelDraw?
It is necessary to understand the fea- 2 List ten features in the CorelDraw envi-
tures in the CorelDraw environment be- ronment.
cause almost all the versions are indeed 3 Explain five tools in the toolbox.
very similar to one another. 4 State the steps involved in typing text in
CorelDraw.
Review questions 5 State the steps involved in filling a rect-
angle shape with colour.
Multiple choice questions
1 ________________ is a digital representa-
tion of non text information, such as
drawing, chart, or photograph.
A A graphic
B Status bar
C Pick tool
D Bitmap
2 Which of following is a computer graph-
ics package?
A FORTRAN
B BASIC
C Corel Draw
D Microsoft word
3 _______________ is used to select object
properties, such as line thickness, size
and effects from an object on the drawing
window.
A Pick tool
B Fill tool
C Eraser tool
D Eyedropper

43
Chapter

BASIC programming III


6
(one-dimensional array)

Learning objectives
At the end of this chapter, you should be able to:
• define array in BASIC;
• define one-dimensional array (using DIM statement);
• state some properties of array;
• list data types;
• list some operations on array; and
• write simple BASIC programs on array.

Introduction to arrays In BASIC, the rules that apply to naming


simple variables also apply to naming arrays.
An array is a list of variables with the same Only numbers can be stored in numeric vari-
data type and name. It is either an integers or able arrays, and only character strings can be
floats, where one variable is used only when stored in string variable arrays. Each memo-
we work with a single item. ry cell, or element of the memory cell, can be
An array allows these related variables to accessed using subscripted variable normally
be referred to by the same name, and to use a enclosed in parentheses.
number called an index or a subscript, to tell Access or reference to an individual
them apart. The subscripts can also be called item within an array is performed by telling
an (index): inside the parenthesis is the posi- the computer which positions in the list the
tion of the element within the array. The real name will occupy. This is done through the
advantage of using an array is not realised use of subscripts. A subscript is a value in pa-
until you use variables for subscripts in the rentheses that indicates a position within an
place of the constants. array. The subscripts are enclosed in paren-
The individual variables are called the el- theses; for example, if there are two students
ements of the array. The individual elements in a computer class their names can be stored
are treated the same as any other variable in an array called NM$.
and may be used in any statement, such as an
assignment or a printer. They are contiguous Arrays NM$
from index (0) through to the highest index NM$ (1) Njideka
value. NM$ (2) Ajumobi

44
Njideka is in the first position in the array, Example 2: Given array P as 2
that is NM$ (1), Ajumobi is in the second po- 4
sition, NM$ (2). 6
The subscript enclosed in the parentheses 8
can be a numeric constant, numeric variable, Assume that X = 1, Y = 2 and Z = 3, state the
or arithmetic expression. value and position of the arrays: P(X), P(Y)
The zero, for example X (T), Y (3) and and P (Z + 1).
P (4 + Q) are valid reference to array elements.
The value or expression inside the pa- Solution
rentheses is evaluated by the computer, and P(X) refers to P (1), i.e. the first element in the
the computer also translates the results of the array, 2
greatest integer less than or equal to the re- P(Y) refers to P (2), i.e. the second element in
sult, thereby truncating or dropping off the the array, 4
decimal part, and accessing the indicated ele- P (Z + 1) refers to P4, i.e. the fourth element in
ment in the array. Therefore in X(T), the com- the array, 8
puter references the current value of T, which
indicates the position of the desired element Properties of array
in array X.
1 Arrays are defined in a DIM statement
Example 1: DIM N(5), S(100), TEN(50) and the total number of elements of an
In Example 1 above, it tells BASIC to reserve array is given in parenthesis.
5 adjacent memory locations an assign vari- 2 The lower and upper limit of each sub-
able N to the locations. It also reserves anoth- script in an array can be specified; the
er 100 and 50 locations and assigns them to default lower limit is 1. Example of other
the variable S and TEN respectively. limits is DIM intGrade (0 to 5) as Integer.
The third memory location of the array A colon may be used instead of "To" in
N, for example, can be referred to by X(3) the DIM statement. Example: DIM in-
while the first location of array TEN can be tGrade (0: 5) as integer.
referred to be TEN(1). The 3 or 1 in the pa- 3 The arguments in a DIM statement must
rentheses are called the array subscripts. be numbers, not variables.
The variable, which represents the array sub- 4 An element of an array is specified by its
scripts, is known as the subscripted variable. subscript value.
The subscripted variable is also called control 5 Array can be passed to a subroutine or a
variable because it controls the entire array function, with empty parentheses and
subscripts. commas used to indicate the dimension
of the array.

Data types
Data type Suffix Dimensional state

Integer % INTEGER
Long integer & LONG

45
Single - precision number 1 or Nothing SINGLE
Double - precision number # DOUBLE
String $ STRING

• Integer and long integer are whole num- to an array element for which space has not
bers; the difference is that integer uses been reserved.
(short), while long integer uses (long).
• Single – precision numeric uses E- nota- Example: To store the days of the month of
tion (1 -7 digits) January of a given year, an array of 31 ele-
• Double – precision numeric uses D – ments can be used. The first element will
notation (8 and above digit) hold 1; the second element will hold 2; the
• X% = integer data type third element will hold 3; etc.
• X& = long integer data type The number of elements for which space
• Sum# = double precision data type must be reserved can be specified by the
• Sum = single precision data type programmer using a DIM (dimension) state-
• Sum! = single precision data type ment. The DIM statement allocates storage
• COUNT$ = string data type space for an array. It can be followed by a
list of arrays to be dimensioned separated by
Declaring an array: The dim state- commas.
ment The general format to declare one dimen-
An array can be declared either by public or sional array is as follows:
dimension statement (DIM statement). The Line# DIM array (limit), array (limit),…..
public statement declares an array that can be • Where # is the statement line number.
used throughout an application. The dimen- • The first array (limit) is the name of the
sion statement (DIM statement) declares an first array and number of spaces to re-
array that can be used only in a local proce- serve.
dure. DIM statement sets the maximum size • The second array (limit) is the name of
of an array. An array can be dimensioned to the second array and number of spaces to
have as many elements as the memory al- reserve.
lows. Each of the limit is an integer that repre-
The BASIC interpreter does not automati- sents the maximum number of storage loca-
cally know how many elements the array will tions required for a particular array.
contain. Unless told otherwise, it makes pro- Another form of the general syntax of the
vision for a limited number. The interpreter DIM statement is:
is designed to assume that an array will have DIM[SHARED]variable[(subscripts)][As
no more than ten elements. It reserves space type],variable[(subscripts)][As type]…..
for ten elements in the array. And if ten spa- Where:
ces are automatically reserved, but there are • SHARED specifies that variables are
less than ten elements in the array, reserved shared with all SUB.
spaces are left unused, or wasted. The pro- • FUNCTION procedures in the module.
grammer cannot write a statement that refers • Variable is the name of an array or vari-
able.
46
• Subscripts is the dimensions or sizes of clared. The present of the percent sign identi-
the array, expressed as follows: fies 1% as an integer.
• Where lower = lower bound of the array In the first DIM statement, we have an
subscripts. The default lower bound is array task of subscript 1 to n where n is a nu-
zero. meric variable with a value. The declaration
• Upper = the upper bound of array sub- for static array, e.g. Student$(1 To 200), and
scripts Scores (1 To 200) are declared with array sub-
• As type declares data type of variables scripts as constants.
(INTEGER, LONG, SINGLE, DOUBLE,
STRING, or a user defined). Example 4
Write a program to read in the names of 20 stu-
Note: The items in square brackets are op- dents and print them on the screen.
tional.
Solution
Example 3: Declare an array to score 200 stu- CLS
dents’ names. DIM stdname$(1 To 20) ‘array to hold
students’
Solution: DIM student$(200) names
Or ‘Read names of students
DIM students$(1 To 200) FOR 1%=1 TO 20
INPUT ‘Enter name of student:’, st name$(1%)
The first form of the solution presupposed NEXT 1%
the default lower bound of the array, which CLS
is zero and the upper bound, is 200 unless the ‘print their names on the screen
OPTION BASE is set to 1 at the beginning of FOR 1%=1 TO 20
the program. PRINT stdname$ (1%)
The second form of the solution; howev- NEXT 1%
er, is recommended since the lower and up- END
per bounds of the array are clearly specified
in the declaration. Example 5
An array with more than a variable with Write a program to enter names of students to a
the same DIM statement can be used. As the maximum of 300. You might have less number of
syntax shows, each array is separated with a students and the program should stop receiving
comma from the next. names if the names already entered are up to 300.
Hence, the following declarations are
valid: Solution
DIM Student$(1 TO 200), Scores (1 To 200), DIM stdname$(1 TO 300) ‘assume a max,
Task (1 To n) of 300 students
DIM Counters (1 To 100) AS INTEGER, Value 1% = 0: k% = 0 ‘initialize 1%
AS LONG, and 1% and k%
DO
In the second DIM statement, Counters is 1% = 1% + 1
declared as an integer array of 100 elements, INPUT ‘Enter students’ name:’, stdname$
Value is declared as a variable (not an array) IF stdname$ = “ ” THEN EXIT DO
of type LONG integer and 1% is also de- Stdname$ (1%) = stdname$: k% = 1%
47
LOOP WHILE 1 %< 300 Operations on array
‘output the entered names
For 1% = 1 TO K% The basic operations on array are:
PRINT stdname$ (1%) 1 Input on array (Reading data into an ar-
NEXT 1% ray)
END 2 Output on array (Printing from an array)
3 Arithmetic on array (Computing with ar-
ray)
One-dimensional array
Reading data into an array
A dimension is a direction in which you can
vary the specification of an array’s elements. In reading data into an array FOR/NEXT
An array can be one dimensional or multi- loop are efficient method.
dimensional. The number of dimensions an
array has is called its rank. Example 6: Read two lists of three numbers into
One-dimensional array is a list of items separate arrays, A and B. The loop will execute
or a table that consists of one row of items or five times.
one columns of items. 10 DIM A(3), B(3)
The format for a one-dimensional array 20 FOR N = 1 TO 3
is: ArrayName (x) 30 READ A(N)
A two-dimensional array is under multi- 40 NEXT N
dimensional arrays. It can also be called a 50 DATA 2, 4, 6,
rectangular array. It is a list or tables of items 60 DATA 5, 10, 15
that is made up of rows and columns. Where The value of N is 1 in the first time
one subscript represents the rows and the through this loop.
other subscripts represents the columns. When line 30 is executed; the computer
The format for two-dimensional array is: reads two numbers from the data list.
The number 2 is stored in A(1). The num-
ArrayName (x, y) or Dim arrayName (num1,
ber 5 is stored in B(1).
num2) as datatype.
The second time through the loop, while
While for the three-dimensional array the
N equals to 2, the next two numbers in the
general format is: ArrayName (x, y, z).
data list are stored in A(2) and B(2).
The final array will look thus:
Examples of one-dimensional array A B
1 DIM A(20) stands for A(1),A(2), A(3),…, 2 4
A(20) 6 5
2 DIM R(100) stands for R(1), R(2), R(3),…, 10 15
R(100)
The following examples consist of one row Computing with arrays
of elements, each of which is referred to by
using only one subscript (control variable). To compute the average of array A and B, the
They are stored under a single array name, numbers are added, then the result is divided
i.e. a single column of data. by 2. This is done for each of the three posi-
tions in the array. The loop to be used is:
48
70 FOR V = 1 TO 3 Example 8
80 LET AVE (V) ={A(V) + B(V)}/2 Calculate the average of a one dimensional array
90 NEXT V with 100 numeric values.
The first time through the loop, V equals to 1.
Line 80 adds A(1), which is 2, to B(1), which is Solution
4, and divides the result by 2. The answer is 3. DIM A(100)
This value is stored in the first position FOR X = 1 TO 100
of a new array, AVE (1). This process is done READ A (X)
three times until the average is computed NEXT X
three times. FOR V = 1 TO 100
LET AVE (V) = {A (V)}/2
Printing from an array NEXT V
END
In printing the results of the calculations, the
program segment below can be used. Example 9
100 PRINT “A”, “B”, “AVE” Calculate the area of 10 different rectangles with
110 FOR P = 1TO 5 and without the WHILE – END statement.
120 PRINT A(P), B(P), AVE(P)
Solution
130 NEXT P
CLS
140 END
REM program to calculate the area of rect-
angles
Basic programs INPUT “variable l” L
Example 7 INPUT “variable b” B
State data in a vector of 10 integers with and INPUT “variable h” H
without a FOR-NEXT statement. INPUT “variable a” A
WHILE n ≤ 10 DO
Solution A = l*b*h
Input variables x ( i ), v = vector, i = 1, 10, PRINT A
p=0 END
FOR I ≤ 10
I=i+p Example 10
V=I Output the sum of the first 100 integers.
NEXT Go to line 3
Solution
Output P/PRINT V
Input i, I = 100, sum = 100
END
FOR i ≤ 100
Without FOR – NEXT statement I=i+1
Input variable x (i), v = vector, I = 1, 10, p = 0 NEXT line 3
WHILE i ≤ 10 Sum = I + Sum
I=i+p PRINT Sum
V=I END
PRINT x (v)
END

49
Example 11 • The format for two-dimensional arrays is:
Output the value elements of a given array. ArrayName (x, y) or Dim arrayName
(num1, num2) as datatype. While for the
Solution three-dimensional array the general for-
Input x (i), i = 1, n mat is: ArrayName (x, y, and z).
FOR i ≤ n • A colon may be used instead of “To” in
I=i the DIM statement.
NEXT line 2 Example: DIM intGrade (0: 5) as Integer.
PRINT x ( I ) • The three basic operations on array are
END input, output and arithmetic operations.

Summary
Review questions
This chapter has taught the following:
• An array is a list of variables with the Multiple choice questions
same data type and name. It is either (in- 1 A list of variables with the same data type
tegers or floats) where one variable is and name is called _____________.
used only when we work with a single A an array
item. B an integer
• The subscript also called an (index). In- C an index
side the parenthesis is the position of the D a statement
element within the array. 2 Individual variables of an array are re-
• An array can be declared either by public ferred to as _____________.
or dimensional statement (DIM state- A subscripts
ment). The public statement declares an B elements
array that can be used throughout an ap- C numbers
plication. D constants
• The dimensional statement (DIM state- 3 The arguments in a DIM statement must
ment) declares an array that can be used be numbers, not variables.
only in a local procedure. True or False? _____________
• An array can be one dimensional or 4 A two-dimensional array is an example
multi-dimensional. The number of dimen- of multi-dimensional arrays. It can also
sions an array has is called its rank. be called a _____________ array.
• One-dimensional array is a list of items A circular
or a table that consists of one row of items B triangular
or one column of items. The format for C rectangular
one dimensional array is: ArrayName D diagonal
(x). 5 An array can be one-dimensional or
• A two-dimensional array is under multi- multi-dimensional; the number of dimen-
dimensional arrays. It can also be called a sions an array has is called its _________.
rectangular array. It is a list or tables of A class
items that is made up of rows and col- B rank
umns. C member

50
D group

Essay-type questions
1 What is a one–dimensional array?
2 a) State five properties of an array?
b) List the three operations on an array?
3 State the general format to declare one
dimension array?
4 a) Write a program that reads 10 values
into array score of 10 elements?
b) Write a program to output the sum of
the first 100 integers?
5 Write a program to display the standard
deviation of 100 sets of numbers already
stored in an array.

51
Chapter

7
High-level languages

Learning objectives
At the end of this chapter, you should be able to:
• define high-level languages;
• state examples of high-level languages;
• classify given high-level language as interpreted or compiled;
• identify the features of some high-level language;
• recognise the format of the high-level language;
• state advantages of high-level language over machine lan-
guage and low-level language.

Introduction High-level languages

Computer languages are artificial languages High-level languages are basically symbolic
developed by humans for computer opera- languages that use human language (English
tions. They contain codes that are instructions or other languages), syntax, words and/or
to be executed on computers. Just as the type mathematical symbols rather than mnemon-
of language to use as a medium of commu- ic codes. Each instruction in the high level
nication between two people depends on so language is translated into many machine
many factors including, the type of language language instructions, thus showing one-to-
the other party understands, the language many translation.
understanding of the speaker, the area where High-level language, HLL, is a computer
communication will take place, the purpose language that provides a certain level of con-
of communication, etc. so is the choice of cept from the underlying machine language
which computer language to use depends on through the use of declarations, control state-
the type of computer the program is to run ments, and other syntactical structures. High-
on, the type of program it is, and the exper- level languages are closer to human languag-
tise of the programmer. The term computer es, and further from machine languages. In
language covers a wide variety, from binary- contrast, assembly languages are considered
coded machine language to low level lan- low-level because they are very close to ma-
guage to high-level languages. chine languages.

52
High-level languages were developed Advantages of high-level languages
mainly to overcome the difficulty of writing
programs (programming) using assembly There are several reasons why programmers
languages. High-level languages are easier prefer to use high-level languages in writing
to use than machine and assembly languages programs. These include the following:
because their commands are closer to natural 1 High-level languages are easier to use:
human language. When compared to machine and assem-
Examples of high-level language in- bly languages, high-level languages are
clude ALGOL, LIST, PROLOG, SNOBOL, easier to use because their commands are
Pascal, Ada, BASIC, Dbase, C, C++, COBOL, closer to natural human language.
FORTRAN, Java, FoxPro, Perl, Java and Py- 2 High-level languages do not require a
thon. particular CPU (non-CPU-specific). Un-
like machine language, they contain gen-
Programming language (PL) eral commands that can work on differ-
ent processors.
This is the term used to refer to high level lan- 3 Programs written in a high-level lan-
guages, such as Pascal, Ada, BASIC, Dbase, guages can be translated into any ma-
C, C++, COBOL, FORTRAN, Java, FoxPro, chine language, if there exist suitable
etc. Each language has a unique set of words translators; therefore, they can run on
that it understands (keywords), and a special any computer.
syntax for organising program instructions. a) They are user-friendly.
b) They require less time to write.
General features of high-level lan- c) They are easier to learn.
guages d) They are not machine-based like ma-
chine language but are rather prob-
The general features of high-level languages lem-oriented.
which distinguish it from other program-
ming languages include the following:
1 High-level languages deal with variables, Disadvantages of high-level lan-
arrays, objects, subroutines and func- guages
tions, loops, complex arithmetic or Bool-
ean expressions, and other abstract rath- There are several reasons why programmers
er than dealing with registers, memory might choose not to use high-level languages
addresses and call stacks. in writing programs. These include the fol-
2 High-level languages focus on usability lowing:
over optimal program efficiency. 1 High-level languages require translation
3 High-level language refers to the higher into machine language by a translator;
level of abstraction from machine lan- therefore, if the appropriate transla-
guage. tor is not available no job will be per-
4 High-level languages do not have lan- formed.
guage elements that translate directly 2 Valuable time is used in translation.
into a machine’s native codes. This is in 3 At times, the object code generated by a
contrast to low-level assembly languages, translator might be inefficient compared

53
to an equivalent assembly language pro- a) C
gram. b) Pascal
c) PL/I (Programming Language, Ver-
Classification of high-level lan- sion 1)
guages
3 Business data processing
High-level languages can be classified based These languages are used for maintain-
on several criteria. Sometimes, some high ing data processing procedures and files
level languages might share certain charac- handling problems. A report generator is
teristics with each other, and there could still used to select specific record fields or
be some certain features that some share with ranges of records, and to make the output
another language. As a result, a particular attractive. They include:
language might be found in more than one a) RPG (Report Program Generator)
class. b) COBOL, (Common Business Orient-
ed Language).
Types of high-level languages
4 Artificial intelligence
Many languages have been developed for These languages are used in research
achieving different varieties of suitable appli- and academic circles for building expert
cations (tasks): some are for specific purposes systems. An expert system is a computer
(specialised), others are for general purposes. program that applies artificial-intelli-
Classification of high-level language ac- gence methods to problem-solving. They
cording to their application includes the fol- include:
lowing: a) LISP (LISt Processing)
b) PROLOG (PROgramming in LOGic)
1 Scientific and computation-formula-
type processing 5 String and list processing
These languages are oriented towards These are used for string manipulation
the computational procedures for solving including search for patterns, inserting
mathematical, statistical and scientific and deleting characters. They include:
problems. They include: a) LISP (List Processing)
a) BASIC (Beginners All Purpose Sym- b) Prolog (Program in Logic).
bolic Instruction Code)
b) FORTRAN (Formula Translation) 6 Object oriented programming language
c) APL (A Programming Language) In Object Oriented Programming, OOP,
d) PL/I (Programming Language, Ver- the computer program is divided into
sion 1) objects. OOP languages have a property
e) ALGOL (Algorithmic Language) known as inheritance. Inheritance allows
an object to take on the characteristics
2 General purpose and functions of other objects to which it
These languages are used for all purposes. is functionally connected. They include:
They can be used for different applica- a) C++
tions such as: b) Java

54
7 Visual programming language the languages where the source code is pro-
These are designed for building Win- cessed by a software program called a com-
dows-based applications. They allow a piler. This converts the source code into an
programmer to think in terms of collec- object code, which can then be run directly or
tions of cooperating objects as an alterna- indirectly by a computer operating system.
tive to the usual lists of commands. Class- Here, all statements are translated prior to
es of objects can inherit features from any execution.
other classes of objects, thereby making Programmers write source codes, us-
the task of the programmer easier. They ing high level programming languages that
include: people can understand by computer. That
a) Visual Basic is, computers cannot directly execute source
b) Visual Java codes, but need a compiler to translate these
c) Visual C instructions into a low level language called
machine code.
Interpreted and compiled lan- Compiled languages tend to be faster
guages than interpreted languages because they are
more efficient than interpreted languages.
Computers do not understand high level lan- Application software is compiled and trans-
guages such as C, BASIC, C++, Java, Python, lated into machine language before it is sold.
PHP, etc. Rather, they understand machine Examples include C++, C and Fortran.
language (generally known to be lower level
language). As a result, higher-level language Hybrid languages
needs to be translated to machine language Hybrid languages are those languages that
that the computer understands. The comput- combine the qualities of both compiled and
er only sends the finished machine language interpreted languages. Examples are Python
code to the user. and Java.
Java can be compiled into bytecode
Interpreted languages which is run by an interpreter referred to as a
Interpreted languages are high level lan- virtual machine. Since Java source code itself
guages that are translated and executed does not have an interpreter, it is reasonable
statement by statement. In these languages, to consider Java to be a compiled language.
the source code is processed by a software
program called an interpreter. It reads in the Low-level language
text and immediately acts upon the instruc-
tions defined by the text. In other words, an This is a computer programming language
interpreter is a language that interprets writ- that uses machine code, or that can be said to
ten programs. BASIC, LISP and APL are ex- be machine-dependent. Since the computer
amples of interpreted languages. cannot understand high level language di-
rectly, it can only understand and execute in-
Compiled languages structions given in the form of machine lan-
Compiled languages are languages writ- guage, i.e. binary digits of 0 and 1. There are
ten and then run through a compiler which two types of low level languages:
checks the syntax and compresses it into a 1 Assembly language
binary executable. Compiled languages are 2 Machine language
55
1 Assembly language codes (just like high level language) be-
Assembly language, also called symbolic lan- fore the computer can run it.
guage, was developed to overcome some of
the many difficulties of machine language. 2 Machine language
Here, operation codes and operands are This language was the first type of program-
specified in the form of alpha-numeric sym- ming language to be developed for the com-
bols called mnemonic instead of binary dig- puter. It is the most basic and lowest level of
its of 0’s and l’s. These mnemonic can have a programming language. Machine language
maximum of up to 5 letter combinations, e.g. is basically the only language which the com-
SUB for subtraction, ADD for addition, MPY puter can understand.
for multiplication, START and END. Computer inventors and manufacturers
Assembly language can sometimes be design a computer to obey just one language
very difficult and needs constant practice to called machine language (or machine code),
master. The instruction of assembly language also called binary digits of 0s, and 1s. 0 stands
is eventually converted to machine codes by for the absence of an electric pulse and 1 for
a language translator, so that the computer
the presence of an electric pulse. The comput-
can execute it.
er is basically designed to recognise electric
pulses (signals), hence it can understand ma-
Advantages of assembly language
a) Assembly language is faster to imple- chine language.
ment for the computer when compared Advantages of machine language
with high level language.
a) The computer understands and imple-
b) It is easier to understand and use when
ments the language directly, unlike high
compared to machine language.
level language.
c) Debugging is easier as it is easy to locate
and correct errors when compared to ma- b) It makes fast and efficient use of the com-
chine language. puter.
d) The language is easily modified. c) It requires no translator to translate the
e) It uses easy to remember terms called codes, unlike high level language.
mnemonics.
Disadvantages of machine language
f) The use of assembly language allows a
programmer interact directly with the a) It is machine-dependent and as a result,
hardware. a programme written (in machine codes)
for an Intel microprocessor cannot run on
Disadvantages of assembly language a Motorola microprocessor.
a) It is also machine-dependent, just like b) All memory addresses and operation
machine language. codes have to be remembered.
b) It requires the knowledge of hardware in c) Debugging can be very tedious and dif-
order to know which hardware is suit- ficult.
able.
c) It requires constant practice (by the pro- Advantages of high-level langu-
grammer) to understand. age over low-level language
d) It is a difficult language when compared
with high level language. High-level language is often preferred to
e) It also requires translation into machine low-level language because of several rea-

56
sons which include the following: 3 Data division: This illustrates all the data
1 High-level languages make complex pro- used in the program.
gramming simpler, while low-level lan- 4 Procedure division: This contains the
guages tend to produce more efficient procedures that state the actions of the
codes. program.
2 High-level languages are not machine-
dependent, while low-level languages are Other features of COBOL
machine-dependent. 1 Earlier versions do not support local vari-
3 Low-level languages are preferred to high- ables, recursion, dynamic memory alloca-
tion, or structured programming con-
level languages when factors such as
structs.
speed, control and preference are consid-
2 It allows identifiers up to 30 characters in
ered.
length.
4 Each statement in low-level language
3 It has over 400 reserved words called
usually corresponds to a machine in-
keywords, e.g. ACCEPT, MERGE, TA-
struction. Statements in high-level lan- BLE, ADD, NEXT, THEN and MODE.
guage usually require further translation 4 It introduced the concept of copybooks.
into a machine code. 5 It provides ‘named conditions’ that are
declared as sub-items of other items.
Features of some high level lan-
guages Examples of COBOL program
COBOL Program to display ‘Thank You’:
Below are some basic features of some high
IDENTIFICATION DIVISION.
level languages.
PROGRAM-ID. THANK YOU.
PROCEDURE DIVISION.
COBOL language DISPLAY ‘THANK YOU’.
COBOL (COmmon Business-Oriented Lan-
STOP RUN.
guage) is a high-level language used in busi-
ness, finance, and administrative applica-
BASIC language
tion.
It is a compiled language. Programs writ-
BASIC (Beginner’s All-purpose Symbolic
ten with COBOL are split into four divisions,
Instruction Code) is a family of high-level
namely: identification, environment, data,
programming languages designed in 1964 by
and procedure. It was developed in 1959.
John George Kemeny and Thomas Eugene
Kurtz, at Dartmouth College in New Hamp-
Features of COBOL language shire, USA.
1 Identification division: This indicates the
Features of BASIC language
name of the program and contains all
other documentation(s) the programmer
1 Arrays in BASIC could contain integers,
would want to add.
floating points or string variables. BASIC
2 Environment division: This indicates the
dialects have also sprung up in the last
computer(s) being used, and the files used
few years, including Bywater BASIC and
in the program for input and output.
True BASIC.

57
2 It is a general-purpose programming lan- Control program
guage.
3 It allows advanced features to be added 1 IF ... THEN ... ELSE: used to perform
for experts. comparisons or make decisions.
4 It does not require an understanding of 2 FOR ... TO ... {STEP} ... NEXT: repeats a
computer hardware. section of code a given number of times.
5 It shields the user from the operating sys- A variable that acts as a counter is avail-
tem. able within the loop.
6 It is an interactive language. 3 WHILE ... WEND and REPEAT ...
UNTIL: repeats a section of code while
Dialects of BASIC include: Altair BASIC · the specified condition is true. The condi-
Applesoft BASIC · Atari BASIC · Atari ST tion may be evaluated before each itera-
BASIC · BASIC Programming · Color BASIC · tion of the loop, or after.
Commodore BASIC · Dartmouth BASIC · 4 DO ... LOOP {WHILE} or {UNTIL}: re-
Family BASIC · G-BASIC · GFA BASIC · GW- peats a section of code Forever or While/
BASIC · HP BASIC for OpenVMS · TI-BASIC Until the specified condition is true . The
(calculators) · Tiny BASIC · Turbo-Basic XL · condition may be evaluated before each
UBASIC · Vilnius BASIC, AutoIt · BlitzMax · iteration of the loop, or after.
Chipmunk Basic · FreeBASIC · Gambas · GL- 5 GOTO: jumps to a numbered or labelled
Basic · PowerBASIC · ProvideX · REALbasic · line in the program.
Run BASIC · StarOffice Basic · Tibbo BASIC · 6 ON ... GOTO/GOSUB: chooses where to
Visual Basic · Visual Basic .NET jump based on the specified conditions.
See Switch statement for other forms.

Some BASIC statements Example of BASIC program


1 PRINT: displays a message on the screen A program that multiplies a number can be
or other output device. written as:
2 INPUT: asks the user to enter the value of
a variable. 10 INPUT “ENTER A NUMBER,” X
3 TAB or AT: sets the position where the 20 Y=X*2
next character will be shown on the 30 PRINT “MULTIPLE OF THAT NUMBER
screen or printed on paper. IS,” Y
4 LET: assigns a value to a variable.
5 DATA: holds a list of values which are Pascal language
assigned sequentially using the READ
This is a compiled, structured and procedural
command.
programming language designed by Niklaus
6 REM: holds a programmer’s comment;
Wirth Pascal in 1967-71.
often used to give a title to the program
and to help identify the purpose of a giv-
en section of code.

58
Features of Pascal programming guages developed by human beings for
the computer operations. They contain
1 Pascal programming was built upon codes that are instructions to be executed
ALGOL language. on a computer.
2 It has simplified syntax. • High-level languages are basically sym-
3 It is a compiled language. bolic languages that use human language
4 It adds data types and structures. (English or other languages), syntax,
5 It is a purely procedural language and in- words and/or mathematical symbols
cludes the traditional array of ALGOL. rather than mnemonic codes.
6 It is a compiled and structured language. • Examples of high-level languages are
7 Pascal Influenced other languages like ALGOL, LIST, PROLOG, SNOBOL, Pas-
Ada, Component Pascal, Java, Modula, cal, Ada, BASIC, Dbase, C, C++, COBOL,
Modula-2, Oberon, Oberon-2, Object Pas FORTRAN, Java, FoxPro, Perl, Java and
cal and Oxygene. Python.
8 It is based on so-called structured pro- • Features of high level languages are that
gramming. they deal with variables, arrays, objects,
subroutines and functions, loops, com-
Example of Pascal program – Program to add plex arithmetic or Boolean expressions,
two numbers. and other abstract rather than dealing
program operators program; with registers, memory addresses and
call stacks.
{$APPTYPE CONSOLE} • Some advantages of high-level languages
are that they are easier to use; they do not
uses SysUtils; require a particular CPU (non-CPU-spe-
cific); programs written in high-level lan-
var number1, number2, Result : integer;
guages can be translated into many ma-
chine languages, if there exist suitable
begin
translators and therefore they can run on
Writeln (‘Please type in your first num-
any computer; they are user-friendly;
ber’);
they require less time to write; they are
Readln (number1);
easier to learn; they are not machine-
Writeln (‘Please type in your second num-
based like machine languages.
ber’);
• Some disadvantages of high-level lan-
Readln (number2);
guages are that the languages require
translation into machine languages by
Result := (number1 + number2);
a translator and therefore if the appropri-
Readln;
ate translator is not available no job will
end.
be performed; valuable time is used in
translation, at times the object code gen-
Summary erated by a translator might be inefficient
compared to an equivalent assembly lan-
This chapter has taught the following:
guage program.
• Computer languages are artificial lan-
• Categories of high-level languages in-

59
clude: scientific and computation-For- Review questions
mula-type processing, general purpose,
business data processing, artificial in- Multiple choice questions
telligence, string and list processing, ob- 1 Which of the following is a computer lan-
ject oriented programming language, guage?
visual programming language. A Mnemonics
• Interpreted languages are high-level B Machine language
languages that are translated and execut- C Interrupt
ed statement by statement. In these lan- D All of the above
guages, the source code is processed by a
2 Which of the following will be run direct-
software called an interpreter. An inter-
ly by the computer?
preter is a language that interprets writ-
A Java
ten programs. BASIC, LISP and APL are
B Machine language
examples of interpreted languages.
C High-level language
• Compiled languages are languages writ-
D Low-level language
ten and then run through a compiler
3 Which of the following will require an
which checks its syntax and compresses
it into a binary executable. interpreter?
They are the languages in which A Java
the source code is processed by a B Machine language
software program called a compil- C High-level language
er: it converts the source code into D Low-level language
an object code which can then be run 4 Which of the following will require a
directly or indirectly by a computer oper- translator?
ating system. Examples are C++, C and A Java
Fortran. B Machine language
• Hybrid languages are those languages C Assembly level language
that combine the qualities of both com- D Low-level language
piled and interpreted languages. Exam- 5 Which of the following languages is
ples are Python and Java. used in writing scientific programs?
• There are two types of low level lan- A FORTRAN
guages: assembly language and machine B Machine language
language. C COBOL
• Assembly language, also called sym- D High-level language
bolic language, was developed to over- 6 Which of the following languages is
come some of the many difficulties of used in writing busings programs?
machine language. A FORTRAN
• Machine language is basically the only B Machine language
language which the computer can under- C COBOL
stand. Computer inventors and manufac- D PROLOG
turers design a computer to obey just
one language called machine language
(or machine code) also called binary dig-
its of 0s and 1s.

60
7 An interpreted language is one of the fol-
lowing.
A PASCAL
B machine language
C BASIC
D PROLOG
8 A compiled language is one of the follow-
ing.
A PASCAL
B machine language
C BASIC
D PROLOG
9 One of the advantages of high-level lan-
guage is that ________________.
A it is faster
B it is a human language
C it is directly understood by the com-
puter
D it is an uncommon language
10 The major advantage of high-level lan-
guage is that ________________.
A it is faster
B it is a human language
C it cannot be directly understood by
the computer processor
D It is an uncommon language

Essay-type questions
1 a) Define high-level language.
b) List three examples of high-level lan-
guages.
2 Write briefly on the following:
a) Low-level language
b) Machine language
c) Assembly language
3 Classify HLL into compiled and inter-
preted language.
4 State advantages and disadvantages of
high-level language over machine lan-
guage.
5 State three features of each of the follow-
ing: BASIC, COBOL and Pascal languag-
es.

61
Chapter

8
Overview of number systems

Learning objectives
At the end of this chapter, you should be able to:
• list digits in the number bases;
• convert from one number base to another;
• add and subtract in the number base; and
• identify the representation of negative number in binary.

Number systems Number bases

A computer is an electronic device which ac- There are three types of number bases:
cepts input data and converts it into binary 1 Binary - base 2
(or base two) formats, stores them temporar- 2 Octal - base 8
ily or permanently, processes the data and 3 Hexadecimal - base 16
either stores the result of the processing or Denary of decimal (base 10) numbers are not
sends it out in format output from its mem- of much use in digital electronics.
ory.
The reason this system is so important Place values
is that it is the most simple system to imple-
ment in practice, using the electronic technol- The number system used worldwide in
ogy available today. It is relatively easy to mathematical notation today is the decimal
detect very quickly if a circuit is switched on system, which is a base 10 system.
or off. These two digital states can be given As in other number systems, the position
various names: True/false, high/low, yes/ of a symbol in a base 10 number denotes the
no, 1/f, on/off. The I and f notation natu- value of the symbol in terms of increasing
rally leads to the use of binary numbers (base value of the base. That is in the decimal sys-
2), octal (base 8) and hexadecimal (base 16) tem, the quantity represented by any of the
are also used since they provide a condensed ten symbols used—0 1 2 3 4 5 6 7 8 and 9—de-
number notation. pends on its position in the number.

62
Thus, the number 40 763 is an abbreviation e.g. 1 1112, 1 000 1012.
for: In base eight, eight digits are needed to
(4 × 104) + (0 × 103) + (7 × 102) + (6 × 101) + represent octal decimal, i.e. 0, 1, 2, 3, 4, 5, 6, 7,
(3 × 106) e.g. 1428, 6728, 4678.
40 000 + 0 + 700 + 60 + 3 In base sixteen, sixteen digits are needed
Note: ao = 1 to represent hexadecimal, i.e.
Based on the calculation above, in 1 2 3 4 5 6 7 8 9 A(10) B(11) C(12) D(13)
40 763 3 stands for units E(14) F(15).
6 stands for 60 units Examples of hexadecimal FCE 16 1BB716.
7 stands for 700 units
0 stands for 000 units Note
4 stands for 4 000 units If no subscript is used, then it is usual to as-
In base two, there are two digits 0, 1 – suf- sume that base ten (10) is being applied.
fice to represent a number in binary system

Conversion of binary to decimal


1 Convert 1 100 1012 to decimal (use place value).
(1 × 26) + (1 × 25) + (0 × 24) + (0 × 23) + (1 × 22) + (0 × 21) + (1 × 20)
= 64 + 32 + 0 + 0 + 4 + 0 + 1
= 101
2 Convert 1 100 1012 to decimal (use place value).
(1 × 27) + (1 × 26) + (1 × 25) +(0 × 24) + (0 × 23) + (1 × 22) + (0 × 21) + (1 × 20)
= 128 + 64 + 32 + 16 + 8 + 4 + 0 + 1
= 253

Conversion of octal to decimal


1 Convert 6648 to decimal. 2 Convert 71278 to decimal.
(6 × 82) + (6 × 81) + (4 × 80) (7 × 83) + (1 × 82) +(2 × 81) + (7 × 80)
= 384 + 48 + 32 = 3 584 + 64 + 7
= 464 = 3 671

Conversion of hexadecimal to decimal


1Convert ABC16 to decimal.
(A × 162) + (B × 161) + (C × 100)
Note: A = 10 B = 11 C = 12 D = 13 E = 14 F = 15
∴ (10 × 162) + (11 × 16) + (13 × 1)
= 2 560 + 176 + 13
= 2 749

2 Convert 2 4 9 F16 to decimal.


(2 × 163) + (4 × 162) + (9 × 161) + (F × 160)
= 8 192 + 1 024 + 144 + 15
= 9 375

63
Conversion of decimal to other bases is simple because of the strong relationship
To write a given base 10 number n as a base – between binary octal, and hexadecimal.
b number, divide (in the decimal system) n by 23 = 8
b, divide the quotient by b, until the quotient
This implies that three (3) digits of binary
0 is obtained. The successive remainders are
is equivalent to 1 digit of octal. To change a
the digits in the base b expression for n.
binary number directly to octal, split up the
binary number into groups of three, starting
Example 1
at the right hand side of the number. Next,
a) Express 59 in base 2. Divide the number
write down the octal equivalent for each
59 by 2 as shown below.
group of three binary digits.
2 5 9
2 8 R 1
Example 2
1 4 R 0
Change 1 111 000 1102 to octal.
7 R 0
1 111 000 110 (Group into 3 digits
3 R 1
from right)
1 R 1
1 7 0 6 (octal digit for each
0 R 1
group)
Ans = 111 0012
Therefore 1 111 000 1112 = 17068
Binary and hexadecimal
b) Express 942 in base 8.
24 = 16
8 9 4 2
This implies that 4 digits of binary are
1 1 7 R 6
equivalent to 1 digit of hex.
1 4 R 5
The principles are very similar to hexa-
1 R 6
decimal. Here, 4 binary digits instead of
0 R 1
three will be used.
Ans = 1 6568
Example 3
a) Change 1 111 000 1102 to hexadecimal.
c) Express 5 942 in base 16.
11 1 100 0 110 (Group into 4 digits
16 5 942
from right)
3 7 1 R 6
2 12(B) 6 (hex digit for each group)
2 3 R 3
Therefore 1 111 000 1102 = 2B616
1 R 7
0 R 1
b) Evaluate the following:
Ans = 1 73616
i) Change 3B4A into binary.
ii) Change 36778 into hexadecimal.
Conversion between hex, octal and iii) Change BED into octal.
binary numbers iv) Change 1 000 110 111 100 to octal and
To convert binary numbers into hex, first
hexadecimal.
convert the binary to base 10 and then con-
vert this base (10) ten number into hex, using
the methods described earlier in this chap-
ter. There is another method. The method

64
Solution Table 8.1 shows the conversion of decimal to
a) Change 3B4A16 into binary. binary, octal and hexadecimal.
3 B 4 A (split up hex
numbers) Table 8.1
11 1 011 0 100 1 010 Binary digits
representing Decimal Binary Octal Hexadecimal
hex digits
0 0 000 00 00
∴ 3B4A16 = 11 101 101 001 0102 1 0 001 01 01
2 0 010 02 02
b) Change 3 6778 into hex.
3 0 011 03 03
Change octal to binary:
3 6 7 78 4 0 100 04 04
11 110 111 111 5 0 101 05 05
∴ 3 6778 = 11 110 111 1112
6 0 110 06 06
Group into 4 digits from the right.
11 110 111 111 7 0 111 07 07
3 B F 8 1 000 010 08
∴ 3 6778 = 3B F16 9 1 001 011 09
10 1 010 012 A
c) Change B E D16 into octal.
Same method for question (2) is 11 1 011 013 B
B E D (split up hex no) 12 1 100 014 C
1 011 1 110 1 101 (Binary digits
13 1 101 015 D
representing
hex digits) 14 1 110 016 E
15 1 111 017 F
101 111 101 101 group into 3 digits 16 10 000 020 10
from right
17 10 001 021 11
5 7 5 5
∴ BED10 = 5 7558 18 10 010 023 12
19 10 011 023 13
d) Change 1 000 110 111 1002 to octal and
20 10 100 024 14
hexadecimal.
To change to octal:
1 000 110 111 1002
Arithmetic operation in number
1 0 6 7 4
systems
= 10 6748
1 Arithmetic operations in the binary sys-
To change to hexadecimal: tem.
1 0001 1011 11002 The basic rules are: 1 + 1 = 10, and 1 × 1 =
1 1 B C 1. Zero plays its usual role: 1 x 0 = 0 and
= 11BC 1 + 0 = 1, addition, subtraction, multipli-

65
cation are done in a fashion similar to that of decimal system as shown below:
a) Addition
i) 110 1002 ii) 10 0112 iii) 111 0102
+ 101 1012 + 1 0102 + 11 0112
1 100 0012 11 1012 1 1 0 1 12

b) Subtraction
i) 11 111 1012 ii) 111 0112 iiii) 1 1102
– 100 1102 – 10 1012 – 1012
1 100 0012 100 1102 1 0012

c) Multiplication
i) 1 0112
ii) 101 1012
× 112 × 1012
1 011 101 110
+ 1 011 + 0 000 00
100 0012 10 111 0
11 100 1102

d) Division
i) 11 100 0012 ÷ 1012 ii) 10 1012 ÷ 112

101 1012 1112


1012 11 100 001 112 10 101
– 101 – 11
1 000 1002
– 101 – 11
101 11
– 101 – 11
0 0
= 101 1012 = 1112

2 Arithmetic operation in octal


Arithmetic operations are done in a fashion similar to that of decimal.
a) Addition
4 48 2 7 68
+ 5 68 + 3 58
1 2 28 3 3 38

66
b) Subtraction
1 4 68 2 6 0 1 48
– 4 78 – 3 2 68
7 78 2 5 4 6 68

c) Multiplication
1 3 68 1 1 28
x 3 48 x 5 48
5 7 0 4 5 0
4 3 2 + 5 6 2
5 1 1 08 6 2 7 08

d) Division
Evaluate i) 260 0328 ÷ 2468 ii) 1068 ÷ 78

1 0378 128
2468 260 032 78 106
– 246 – 7
1 203 16
– 762 –16
2 212 0
– 2 212 = 128
0
= 1 0378

3 Arithmetic operations in hexadecimal


The method is the same as above.
a) Additional
i) A D 4 ii) F C E
+ 1 F O + B 2 5
C C 416 1 A F 316

b) Subtraction
i)
F 6 A B ii) 4 7 8 B
– B E D – A 2 6
E A B E 3 D 6 5

67
c) Multiplication
i) 2 7 9 A ii) A O B
× 7 516 × 1 3 9
1 3 4 0 2 5 A 6 3
1 1 4 3 6 I E 2 1
1 2 7 7 6 216 A O B
C 4 7 7 316

d) Division
The radix-minus-one complement
BE3 17 A radix is simply the posh name for base.
i) A7 7C115 ii) 12 19E Hence, if we are working in binary then ra-
72D 12 dix-minus-one becomes 2 – 1 = 1, i.e. the one’s
941 7E complement. To obtain the one's complement
922 7E of a binary number, each digit is subtracted
from 1.
115 0
115
Example 1
0 The one's complement of 110 011 is 001 100.
If we are working with decimal numbers
Representation of negative num- then the radix-minus-one becomes 10 – 1 = 9,
bers i.e. the nine's complement.
To obtain the nine's complement of a den-
Negative numbers are essential, and any ary number, each digit is subtracted from 9.
computer not capable of dealing with them
would not be particularly useful. Example 2
There are several methods which can be The nine's complement of 4 689 is:
used to represent negative numbers in bina- 9 999
ry. One of the most common methods is com- 4 689
pliment. 5 310 = 5 310

Complementation The radix complement


Complementation is a way of representing In binary, this would become the two's com-
numbers (particularly in binary), that enables plement.
us to subtract these binary numbers, by using To obtain the two's complement, we sim-
the process of addition. This means that we ply add 1 to the one's complement.
find the complement of the number we wish i.e. the two's complement of 110 011 is:
to subtract, then add it to the original number 001 100
instead. + 1 ⇒ 001 101
001 101
There are two important methods of
complementation:
In denary, this would become the ten's
1 The radix-minus-one complement
compliment.
2 The radix complement
68
To obtain the ten’s complement we sim- b) Radix complement
ple add -1 to nine's complements. Two’s complement of 101 101
i.e. the ten’s compliment of 4 689 is: 1’s +1
i) 1 001 101 → 0 110 010 → 0 110 011
5 310 1’s +1
ii) 111 101 → 000 010
→ 000 011
+ 1
9’s +1
5 311 = 5 311 iii) 347 → 652 → 653
Example 3
a) Find the radix-minus one complement of the Example 4
following: Add the following numbers together using com-
i) 1 011 0012 plement.
ii) 101 111 1012 a) 17 + (-14)
iii) 10 0112 b) –4 + (-9)
iv) 101 110 0112
v) 7 634 Solution
vi) 456 a) Find the binary number.
vii) 33 142 17 => 10 001
viii) 2 347 14 => 1 110
b) Find the radix complement of the following: Since -14 is a negative number you will
i) 1 001 101 find the two’s complement.
ii) 111 101 Note: The binary must be in multiples of 4
iii) 347 ∴ 00 001 110
iv) 5 261 11 110 001 change 1 to 0, and 0 to 1
Add one to 1’s complement
Solution 0 001
a) A radix-minus-one = 2 – 1 = 1 is comple- + 1
ment 1 010
i) 1 111 111 ii) 111 111 111
– 1 011 001 – 101 111 101 Add the binary representation of 17 and
1 100 110 010 000 010 -14 together.
00 010 001 (pad with zero in order
iii) 11 111 iv) 111 111 111 + 11 110 010 to meet up 8 digit.)
– 10 011 – 101 110 011 00 000 011
01 100 010 001 100 = 112

B radix-minus-one = 10 – 1 = 9 b) –4 and –9
v) 9 999 vi) 999
– 7 634 – 456 Solution
2 365 543 Find the binary of the numbers;
4 = 0 100
vii) 99 999 viii) 9 999 9 = 1 001
– 33 142 – 2 347
66 857 7 652

69
Find the complements; • In base two, there are two digits: 1 and 0.
+1
4 = 1 011 1
→ 100 In base eight, there are eight digits which
+1 are 0, 1, 2, 3, 4, 5, 6, 7; In base sixteen,
9 = 0 110 0
→ 111
there are sixteen digits
which are, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C,
Add the numbers together;
D, E and F.
1 100
• If no subscript is used, then it is
+ 0 111
assumed that base ten (100) is being ap-
10 011 = 0 011 (which is
plied.
equivalent to –13)
• Conversion of number base to decimal
is used, using place values factors.
Explicit sign methods • There is a strong relationship between
binary, octal and hex and decimal.
This is also called sign and magnitude meth-
16 = 2 × 2 × 2 × 2 = 24
od. It is unlike complement where the nega-
8 = 2 × 2 × 2 = 23
tive numbers are taken care of implicitly. The
• Four digits of binary is equivalent to two
explicit sign method is very easy to under-
digits of hexadecimal, while four digits
stand; it is simply an ordinary binary number
of binary equivalent to 1 digit of octal
with one extra digit placed in front to repre-
• Negative numbers are represented by
sent the sign.
two’s compliment which is derived by
1 is used for negative numbers and
changing the (binary) one to zero, and
0 is used for positive numbers.
zero to one. Then, one is added to the
result.
Example
• Explicit sign method is simply an or-
Express +17 and –17 using the explicit sign
dinary binary number with one extra
method and 8 bit.
digit placed in front to represent the sign.
‘I’ is used for negative numbers and ‘o’ is
Solution
used for positive numbers.
17 = 10 001 (in binary)
0 010 001 (using 7 bits for the actual number)
∴ + 17 = 00 010 001
Review questions
–17 = 10 010 001
Essay-type questions
Summary 1 Give a detailed explanation of the num-
ber system.
This chapter has taught the following:
2 Explain the following:
• The two digital states of an electronic
a) Binary
technology are ON/OFF, 1/0, True/
b) Octal
False.
c) Denary
• The three commonly used number bases are:
d) Hexadecimal
Binary – base 2
3 Explain the difference between two's
Octal – base 8
compliment and explicit sign.
Hexadecimal – base 16

70
4 a) Convert the following binary num- b) Convert the following hexadecimal
bers into denary: numbers into binary and octal.
i) 1 011 ii) 100 111 101 i) FFB4 iii) FBCA
iii) 11 111 101 iv) 1 011 000 ii) 279 iv) ABE
b) Convert the following denary num-
bers to binary:
i) 21 ii) 216 iii) 897
iv) 689 v) 753
5 Convert the following base ten numbers
into binary, octal and hexadecimal, mak-
ing use of the repeated division method.
a) 379 b) 824
c) 12 d) 317
6 Evaluate in base 2:
a) 1 011 + 1 110
b) 10 011 + 10 011 – 101 011
c) 1 111 – 1 011
d) 10 110 × 1 011
e) 1 001 011 101 ÷ 1 110
7 Work out the following arithmetic:
a) 146 + 4148 d) 1 257 + 3168
b) 3 264 + 5248 e) 12 × 45
c) 435 – 228 f) 334 × 6
8 Evaluate:
a) AD + 4B216 d) 236C + 27D16
b) CIBA + A7C16 e) BBC × 13
c) F4BA – BCD16 f) F008 × 24
9 a) Represent the following decimal
numbers, using 8-bit two's compli-
ment representation.
i) –4 ii) –23 iii) –14
iv) 39
b) Add the following numbers together
using two’s compliment.
i) –12 and –14 iii) 34 and –13
ii) –37 and +20 iv) –14 and –6
10 a) Represent the following decimal
using a 8-bit explicit sign representa-
tion.
i) 16 iii) 96
ii) 28 iv) 118

71
Chapter

9
Data representation

Learning objectives
At the end of this chapter, you should be able to:
• define data representation;
• list methods of data representation; and
• represent data in different character sets.

Introduction 8-bits bytes) that can be handled by the


machine in one chunk.
A computer is basically a processor of infor-
mation. Method of data representation

Information = data + structure 1 Binary coded decimal.


2 Extended binary coded decimal inter-
The computer machine understands electri- change code (EBCDIC )
cal pulses since it deals will light. Hence, 3 American standard coded for informa-
data representation led to the birth of binary tion interchange (ASCII)
systems. Comprehensive mastery of the way
data is manipulated is stored in memory led Binary coded decimal
to the study of data representation. It ia a system of using binary numbers for
Binary systems have just two states: usu- decimals numbering system, in which each
ally ‘on and off’ or ‘1’ and ‘f’. The reason this digit of the decimal is converted into a binary
system is so important is that it is the sim- number.
plest system to implement in practice using For example, let us represent 6 481 in
the electronic technology available. BCD.
The following words are associated with Each digit is written as it appears in the
the binary system: decimal number i.e
1 Bit – Binary digit 6 4 8 1
2 Byte – A convenient number of binary 0 110 0 100 1 000 0 001
digits, originally 8, 16, 32 or 64. It is now Each digit is then coded as
used exclusively to mean 8 bits. 6 4 8 1
3 Word – The number of bytes (usually 0 110 0 100 1 000 0 001
72
Note that BCD codes are not used for arith- ues to alphabetic, numeric, punctuation and
metic calculation. transmission – control characters. It uses 8
bits for coding, thus allowing 256 possible
Extended binary coded decimal in- characters. Although EBCDIC is not widely
terchange code (EBCDIC) used with microcomputer, it is well known
This is a coding scheme developed by IBM and internationally recognised, primarily
for use with its computers, as a standard as an IBM code for the corporation’s main-
method of assigning binary (numeric) val- frames and minicomputers.

Table 9.1

Character Digit zone Character Code digit zone


A 1 100 0 001 Q 1 101 1 000
B 1 100 0 010 R 1 101 1 001
C 1 100 0 011 S 1 110 0 010
D 1 100 0 100 T 1 110 0 011
E 1 100 0 101 U 1 110 0 100
F 1 100 0 110 V 1 110 0 101
G 1 100 0 111 X 1 110 0 111
H 1 100 1 000 Y 1 110 1 000
I 1 100 1 001 Z 1 110 1 001
J 1 101 0 001 O 1 111 1 000
K 1 101 0 010 1 1 111 0 001
L 1 101 0 011 2 1 111 0 010
M 1 101 0 101 3 1 111 0 011
N 1 101 0 101 4 1 111 0 100
O 1 101 0 110 5 1 111 0 101
P 1 101 0 111 6 1 111 0 110
7 1 111 0 111
8 1 111 1 000
9 1 111 1 001

From the table above, we can see that the EBCDIC code is an extension of BCD.
American Standard Coded for Information Interchange (ASCII).
ASCII is a code that is internationally recognised and was developed by the American
National Standards Institute in 1963. The ASCII code is an 8-bit binary code although most
systems do not make use of the eighth bit under normal operating modes. The eighth bit
can be used for parity checking but otherwise a maximum of 128 codes is possible with the
remaining 7 bits.
However, there is an extended ASCII set which makes use of the remaining numbers from

73
8 f to F F. These cannot be used at the same time as parity.

Table 9.2

Hex Chr Hex Chr Hex Chr Hex Chr


00 NOL 10 DLE 20 SP 30 0
01 SOH 11 DC1 21 ! 31 1
02 STX 12 DC2 22 “ 32 2
03 ETX 13 DC3 23 £ 33 3
04 EOT 14 DC4 24 $ 34 4
05 ENQ 15 NAK 25 % 35 5
06 ACK 16 STN 26 $ 36 6
07 BEL 17 ETB 27 ” 37 7
08 BS 18 CAN 28 ( 38 8
09 HT 19 EM 29 ) 39 9
0A LF 1A SUB 2A N 3A :
fB VT 1B ESC 2B + 3B ;
fC FF 1C FS 2C , 3C <
fD CR 1D GS 2D - 3D =
fE SO 1E RS 2E . 3E >
fF SI 1F US 2F ’ 3F ?

40 @ 50 P 60 c 70 P
41 A 51 Q 61 a 71 q
42 B 52 R 62 b 72 r
43 C 53 S 63 c 73 s
44 D 54 T 64 d 74 t
45 E 55 U 65 e 75 u
46 F 56 V 66 f 76 w
47 G 57 W 67 g 77 x
48 H 58 X 68 h 78 y
49 I 59 Y 69 i 79 z
4A J 5A Z 6A j 7A
4B K 5B [ 6B k 7B i
4C L 5C / 6C l 7C
4D M 5D ] 6D m 7D
4E N 5E 6E n 7E ÷
4F O 5F 6F o 7F DEL

74
Character set Essay type questions
This is a grouping of alphabetic, numeric and 1 List three methods of data representation
other characters that have some relationship that you know.
in common. 2 Binary systems have two states; name
Character sets are set of letters, numbers these states.
and symbols. They include: 3 Write short notes on each of the follow-
1 Alphabetic characters, e.g. A, B, …< ing:
2 Numeric characters, e.g. 0 1 2 3 4 5 6 7 8 9 a) Extended binary coded decimal inter-
3 Special characters, e.g. ? N @ # $ % ^ S ( change code.
) - + ! ; “ . < > , / \ [ ] , ! space b) Byte
Note: A complete set of letters, numbers c) Word
symbols and control codes can be used by the 4 Represent the following numbers in
computer. binary coded decimal.
a) 548 b) 6 619 c) 3 225
Summary d) 4 167
5 a) What are character sets?
This chapter has taught the following: b) Give six examples of special charac-
• Bit means binary digit. ters.
• Byte is a combination of bits.
• BCD – Using binary numbers for deci-
mals numbering system in which each
digit of the decimal is converted into a bi-
nary number.
• EBCDIC – It uses 8 bits for coding, thus
allowing 256 possible characters.
• ASCII - This is an 8-bit binary code, although
most systems do not make use of the
eighth bit under normal operating modes.

Review questions

Answer True (T) or False (F)


1 A computer is basically a processor of
information. ________
2 Binary system has just one state ‘1’.
_________
3 Bit is a combination of words. ________
4 Byte is a combination of alphabetic and
numeric characters. ________
5 Word is the number of bytes that can be
handled by the machine. ________

75
Chapter

10
Security and ethics

Learning objectives
At the end of this chapter, you should be able to:
• state sources of security breaches in computer network;
• state preventive measures against security breaches; and
• state issues of legal importance to consider when using ICT.

Introduction Computer network security

Security is so important that a lot of finan- Computer network security involves the au-
cial resources are being committed into it by thorisation of access to data and information
government, non-government organisations in a computer network, which is controlled
and even private bodies. This is so because by the network administrator. Network secu-
replacement of lost documents can some- rity consists of the provisions and guidelines
times be difficult or at times impossible. Pos- adopted by the computer network adminis-
sible threats that result from lack of network trators to check and scrutinise unauthorised
security include the destruction of computer network access, alteration, abuse, or denial
hardware and software and the loss, modifi- of the computer network and accessible- net-
cation, theft, unauthorised use, observation, work resources.
or disclosure of computer data. As a result of
this, techniques are developed to safeguard Computer network security ethics
information and information systems stored
on computers that are on a network. Computer network security ethics refer to a
Every trade and profession has ethics, kind of professional ethics in which computer
principles and codes that guide the way network professionals apply codes of ethics
things are done and transactions are carried and standards of good practice within their
out. This chapter explains the security and profession. Other names relating to computer
ethical issues that relate to computer net- network security ethics are ‘cyberethics’ and
working. ‘Internet ethics’.

76
Computer ethical issues 7 Globalisation: Globalisation is a
term used to signify a global society in which
1 Computers in the workplace: When in- economic, political, environmental, and cul-
formation technology is introduced into a tural events in one part of the world is quickly
workplace, it is important to consider likely related to people in other parts of the world.
impacts upon health, safety, environment Computer ethics now has a broader and even
and job satisfaction of the workers who will more important field, which might reason-
use it. ably be called ‘global information ethics’ or
2 Computer crime: Computer crime per- ‘globalisation’. This simply means that there
petrated by ‘hackers’ who are thousands of are mutually agreed standards of conduct,
miles away, and viruses that are infused into and there are efforts to advance and defend
the computer are issues of ethical concern. human values.
Computer crime can be controlled by
enforcing privacy and confidentiality, ensur- Sources of computer network se-
ing that data and programs are not modified curity breaches
without proper authority, and controlling ac-
cess to resources. There are many factors that will compromise
computer security, leading to computer in-
3 Privacy and anonymity: The simplicity security. Computer insecurity refers to the
and effectiveness with which computers and concept that a computer system is always
computer networks can be used to gather, exposed to attack and as a result, constant
store, search, compare, retrieve and share battle between those looking to improve se-
personal information make computer tools curity, and those looking to evade security.
a threat to anyone who wishes to keep vari-
ous sensitive information such as medical re- Sources of security breaches
cords, salary packages, etc. out of the public
domain or out of the hands of those who are 1 Malware: This refers to harmful soft-
perceived as potential threats. There should wares such as viruses or Trojans designed
be provisions to take care of these issues. to cause damage to the computer.
2 Poorly implemented network: This is
4 Intellectual property: This is an ethical when the network is not properly in-
issue that concerns the intellectual property stalled or managed to take care of all the
rights that is connected with software owner- causes of security breaches.
ship and other patents. 3 Lack of information and communica-
tion technology (ICT) policy: ICT pol-
5 Professional responsibility: Compu- icy helps to take care of all issues relating
ter professionals are engaged in a variety of to ICT including computer networks.
professional relationships with other people Sometimes the problem is lack of imple-
which include: employer to employee, pro- mentation of the good policy that is in
fessional to professional and professional to place.
society relationship. 4 Carelessness: This could come in the
form of exposing vital information to In-
ternet users without proper screening.

77
5 Computer hacker: It refers to someone operating systems include software-
who secretly invades others’ computers, based firewalls to protect against threats.
checking and thereby tampering with the 2 Installing anti-virus software or an in-
programs or data stored on them. trusion prevention system (IPS) that
6 Direct attack on the network: The net- helps detect and inhibit the action of
work can be physically attacked, thereby malware (viruses or Trojans designed to
destroying the information and function- cause damage) is another measure
alities. against computer network security
breaches.
3 User authentication – This is commonly
done by administering a username and a
password (called one-factor authentica-
tion). At times, this is done with a secu-
rity token or ‘dongle’, an ATM card, or a
mobile phone (called two-factor authen-
tication), or something the user ‘is’ is also
used, e.g. a fingerprint or retinal scan
(called three-factor authentication).
4 Encryption – This is the communication
between two hosts, using a network may
be encrypted to maintain privacy.
5 Exercising care in opening e-mails.
6 When using a wireless connection, use a
Fig. 10.1 Some network security threats robust password.
7 Use of sites with web certificate.
Preventive measures against com- 8 Exercising physical security precautions
puter network security breaches to employees.
9 Preparing a network analyser or network
Some of the preventive measures against monitor and use it when needed.
computer network security breaches are as 10 Implementing physical security manage-
follows: ment like closed circuit television for en-
1 Firewall is created to enforce access poli- try areas and restricted zones.
cies such as what services are allowed to 11 Security fencing to mark the organisa-
be accessed by the network users. A fire- tion’s perimeter.
wall is a mechanism or a set of devices 12 Fire extinguishers for fire-sensitive areas
intended to authorise or deny network like server rooms and security rooms.
transmissions, based upon a set of rules.
It is frequently used to protect networks Legal issues
from unauthorised access while permit-
ting legitimate data signals to access the Legal issues in network security and ethical
network. Many routers that pass data be- related matters relate to all the matters aris-
tween networks and personal computer ing from any infringement and the position
of the law in any such case. Different coun-

78
tries have different laws and sanctions for in- puter and Internet related crimes espe-
fringement. Common legal issues are: cially with regards to the virtual space.
1 Copyright issues: Copyright is meant Examples are identity theft and Internet
to protect intellectual property. It is a fraud.
branch of law granting authors the exclu- 9 Hacking: This is gaining unauthorised
sive license to reproduce, distribute, per- access to resources with the intention to
form, or display their creative works. cause harm.
2 Intellectual property law: This involves
creative works that have economic value Summary
and are protected by law. Intellectual
property laws reward the inventors of This chapter has taught the following:
most types of intellectual property by • Techniques have been developed to safe-
preventing others from copying, per- guard information and information sys-
forming, or distributing those works tems stored on computers. Possible
without permission. threats that result from lack of network
3 Ownership rights: This is related to in- security include the destruction of com-
tellectual property rights as it protects puter hardware and software and the
ownership right of authors of such items loss, modification, theft, unauthorised
as text, images, audio, video, etc. use, observation, or disclosure of com-
4 Patent: This is a legal document grant- puter data.
ed by the government, giving an inven- • Computer network security involves the
tor the right to exclude others from mak- authorisation of access to data and infor-
ing, using, selling, offering to sell, or im- mation in a computer network, which is
porting an invention for a specified num- controlled by the network administrator.
ber of years. Patent periods differ from • Computer network security ethics refers
country to country; for example, in USA to a kind of professional ethics in which
patents last for 20 years. computer network professionals apply
5 Trademark: This is any word, phrase or codes of ethics and standards of good
symbol used by manufacturers or sellers practice within their profession.
to name their goods and distinguish • Computer ethical issues include: com-
them from the goods of others. It helps puters in the workplace, computer
consumers identify goods they have used crimes, privacy and anonymity, intellec-
and enjoyed in the past. tual property, professional responsibility,
6 Web content: This is usually subjected globalisation, etc.
to existing law of the host country. • Sources of security breaches include:
7 Piracy: This is the use of copyrighted malware, poorly implemented network,
material without permission. It involves lack of information and communication
the taking and using of copyrighted or technology (ICT) policy, carelessness,
patented material without authorisation computer hacker, Direct attack on the
or without the legal right to do so. Ex- network.
amples of piracy are software piracy, au- • Preventive measures against computer
dio works piracy and video works piracy network security breaches include the
8 Cybercrimes: These include all the com- following: creating firewall, installing

79
anti-virus software or an intrusion pre- A Poorly implemented network
vention system, user authentication, en- B Computer programmer
cryption techniques, when using a wire- C Trade mark (ICT) poor ICT imple-
less connection, using a robust password mentation
and exercising physical security precau- D All of the above
tions, etc. 5 Which of the following is not related to
• Legal issues in network security and ethi- computer network security?
cal related matters relates to all the mat- A Poorly implemented network
ters arising from any infringement and B Computer hacker
the position of the law in any such case. C Trade mark (ICT) patent
This includes: copyright issues, intellec- D Pirates
tual property law, web content, piracy, 6 The basic determinant of computer net-
cybercrimes, hacking, etc. work among the following is_________.
A Network operating system
B Computer hacker
Review questions C Trade mark (ICT) patent
D Computer operating laws
Multiple choice questions 7 Computer security can be related to the
1 _____________ is a mechanism or set of following except _____________.
devices intended to authorise or deny A poorly implemented network
network transmissions based upon a set B computer hacker
of rules. C computer aids
A Anti-virus D computer programmer
B Worms 8 Computer network security ethics refer
C Firewall to _____________.
D Gatechecks A poorly implemented network
2 ________________ is frequently used to B matters that relate to all the matters
protect networks from unauthorised arising from any infringement and
access, while permitting legitimate data the position of the law
signals to access the network. C computer programmer
A Firmware D to a kind of professional ethics in
B Firewall which computer network profession-
C Antivirus als apply codes of ethics and stan-
D Network OS dards of good practice within their
3 Which of the following leads to security profession
breaches? 9 Preventive measures against computer
A Poorly implemented network network security breaches include the
B Computer hacker following except _____________.
C Lack of information and communica- A creating firewall
tion technology (ICT) policy B installing anti-virus software or an in-
D All of the above trusion prevention system
4 Which of the following is considered a C user authentication
legal issue in network security? D software sales

80
10 Globalisation is a term used to__________.
A signify a global society in which eco-
nomic, political, environmental, and
cultural events in one part of the
world is quickly related to people in
other parts of the world
B refer to a kind of professional ethics
in which computer network profes-
sionals apply codes of ethics and
standards of good practice within
their profession
C apply preventive measures against
computer network security breaches
D instal anti-virus software or an intru-
sion prevention system
E apply user authentication.

Essay-type questions
1 Define network security.
2 a) Explain the ethical issues in network
security.
b) List four sources of security breaches.
3 State six preventive measures against
security breaches.
4 Explain the following terms:
a) Piracy
b) Hacking
c) Cybercrime
5 Audu, Uchenna and Mojisola share a
computer account. Audu notices that
Uchenna has made a silly mistake in her
www pages that really annoys him.
Should he fix the mistake for her? Give
reasons for your answer.

81
Model examinations questions C Herman Hollerith
D Lady Ada Lovelace
Test 1 9 Which of the following is not among the
1 _____________ is always referred to as in- family of computers when data repres-
put/output device. entation is taken into consideration?
2 The physical part of the computer sys- A Minicomputer
tem that can be touched and kicked about B Analog
is called _____________. C Digital
3 The most notable feature(s) of the first D Hybrid
generation computer is (or are) _________. 10 The special-purpose electronics machine
A vacuum tube that combines the characteristics of both
B transistors the digital and analog computer is called
C mouse _____________.
D ICS A super computer
4 All are input devices except the B analog
_____________. C sigital
A keyboard D hybrid
B printer 11 Computers can be used in all areas
C mouse except _____________.
D joystick A education
5 The foremost benefit derivable from com- B communication
puterisation is _____________. C military
A accuracy D none of the above
B speed 12 Where actual processing of data takes
C reliability place in a computer system is called
D versatility _____________.
6 The first programming instruction was A ALU
written by_____________. B CPU
A Joseph Jaigvard C control unit
B Ada Lorelace D registered
C Blaise Pascal 13 The two types of software are __________.
D Charles Babbage A system and application software
7 The world acclaimed father of computer B system and application packages
is _____________. C application software and application
A Charles Babbage packages
B Joseph Jacquard D systems and utility software
C Blaise Pascal 14 RAM means _____________.
D John Napier A Random Alternative Memory
8 _______________ invented the punched B Read Access Memory
card. C Random Access Memory
A Blaise Pascal D Random Actual Memory
B Joseph Jacquard

82
15 _______________ are secondary storage 22 The following are spreadsheet applica-
media, they are used in storing data and tion packages except _____________.
information away from the computer so A Microsoft Word
as to serve as back-up. B Lotus 1-2-3
A Input devices C Microsoft Excel
B Output devices D Supercal
C External storage devices 23 The first character you enter in Microsoft
D Main Memory Excel to indicate formulae is __________.
16 The raw fact about a place or a person is A +
known as _____________. B =
A output C /
B data D !
C procedure 24 Which of the formulae below finds the
D information total in a specified range of cells in a
17 GIGO means _____________. worksheet?
A Garbage-in, garbage-out A = ≤ (A1:A10)
B Get-in, get-out B =SUM (A1:A10)
C Garbage-inside, garbage-outside C = A1:A10
D Get-inside, get-outside D = AVERAGE (A1:A10)
18 UPS means _____________. 25 _________________ is used to retrieve an
A Upper Power Supply already stored document file in Microsoft
B Universal Power Supply Word.
C Universal Power Supply A Ctrl + S
d) Uninterrupted Power Supply B Ctrl + P
19 A pictorial representation of a computer C Ctrl + O
command is referred to as _____________. D Ctrl + /
A icon 26 Under which menu would you find the
B path option to insert a clipart?
C mouse A File
D file B Insert
20 The following are word processing appli- C Edit
cation packages except _____________. D Font
A Microsoft Word 27 The feature that allows you to check
B Word Perfect whether a word is spelt correctly is
C Wordstar _____________.
D Power Point presentation A spell checking
21 A key on the computer keyboard that B entering text
is used to produce alternative characters C saving and retrieving
– lower and upper cases is the _________. D all of the above
A tab key 28 Which of the following can be added to
B capslock your presentation?
C shift key A Sound
D space bar B Graphics

83
C Video d) Bluetooth
D All of the above 36 The following are examples of high level
29 Moving slides can take place in_________. languages except _____________.
A Normal view A COBOL
B slide sorter view B VISUAL
C custom animation C DIVISION
D outline D FORTRAN
30 An advantage of computer in education 37 The name given to the patterns of binary
is that _____________. digits that are used by the computer
A it helps in calculating to perform its specific task is called
B it makes teaching more attractive _____________.
C allows us to us CAM A machine language
D none of the above B machine code
31 Windows is an example of _____________ C translator
operating system. D machine code
A Do command-driven 38 The following are types of register ex-
B DOS cept _____________.
C Menu-driven operating system A accumulator
D None of the above B decoder
32 The key that is used to move five charac- C memory address
ter spaces at once is the _____________. D none of the above
A Space bar 39 A program that takes the object code and
B Delete key loads it into the computer’s main
C Tab key memory in the correct place is called the
D Enter key _____________.
33 In the windows operating system envi- A assembler
ronment, the computer screen is referred B carrier
to as _____________. C software
A WindowXP D loader
B Desktop 40 Express +13 and –13 using the explicit
C Icons sign method and 8 bits. _____________
D Enter-key A 00 001 101 and 00 011 101
34 An example of a pointing device is the B 00 001 101 and 10 001 101
_____________. C 1 001 101 and 011 001 101
A joystick D 1 101 101 and 11 001 101
B mouse 41 Convert BAC16 to binary. _____________
C touch screen A 101 010 111 010
D keyboard B 101 110 101 100
35 _____________ is an image capturing de- C 1 001 001 000
vice. D 100 001 111 100
A Scanner 42 Evaluate 1 000 + 101. _____________
B Video A 1 101
C Camera B 011

84
C 1 010 49 These diagrams ( , , ) are ex-
D 11 001 amples of _____________.
43 Find the nine's compliment of 2 674. A a pseudo code
_____________ B an organisation chart
A 7 326 C a flow chart
B 3 324 D none of the above
C 7 325 50 BIT stands for _____________.
D 8 436 A Binary integral digit
44 BCD stands for _____________. B Binary digits
A Block Character Division C Be intelligent
B Binary Coded Decimal D All of the above
45 A vast international network of comput-
ers or a global network of computers that
communicate using a common language
is called _____________.
A Intranet
B LAN
C Topology
D Internet
46 The ability of the computer machine to
combine sounds, images, graphics video
and texts in a single presentation is re-
ferred to as _____________.
A multimedia
B computer system
C central Processing Unit
C UPS
47 The first page you hit at your first lunch
on the Internet is called the _____________.
A home page
B Internet Service Provider (ISP)
C user network
D webpage
48 A computer in a LAN that serves as an
access point to the network and shares
all the resources in the network is called a
_____________.
A workstation
B server
C prototype
D link

85
Index

Andreesen, Mac, 15 wide area network, 3


arrays, 44-45 wireless local area network, 3
array subscripts, 45 demerits of, 9
computing with, 48-49 classification, 1-2
declaring , 46-48 storage area network, 3-4 see (system area
element, 44 network, server area network, small area
index, 44 network)
one-dimensional array, 48 classification based on organisation scope,
operations on, 48 4-5
printing from, 49 benefits of, 8-9
properties of, 45-48 computer language
rank, 48 compiled, 55
reading data into, 48 hybrid, 55
interpreted, 55
BASIC program, 45-50, 58 computer language (high level), 52-61 see
BASIC programming, 44-55 see also (array) (programming language )
BASIC statements, 58 advantages of over low level languages, 56-
57
cables, 19 , 20-21 advantages of, 53-54
and connectors, 19-27 BASIC language, 57-58
audio jack, 20 classification of, 54
digital optical audio, 20 Cobol language, 57
displayport connector, 21 features of, 57-59
HDM connector, 21 general features of, 53
RCA connector, 20 Pascal language, 58-59
Codd, Edgar, 30 types of, 54-55
communications protocol, 6 computer networking security, 76 , ethic, 76
complementation, 68-70 computer security breaches
computer language (low level), 55-56 legal issues , 78-79
computer networks see (network) preventive measures against, 78
definition of, 1 sources of, 77-78
desktop area network, 4 computer security, 76 , and ethics, 76-80
home area network, 4 connectors, 20-21, 26
local area network (LAN), 3 female, 23-24
metropolitan area network (MAN), 3 male, 23
personal area network, 4

86
data cables, 21-23 Lee, Timothy Berners, 15
eSATA cable, 22
fire wire IEE 1384, 22 master-slave, 1
monitor cables, 21 Microsoft Office Access, 30-35
printer cables, 22 creating table design view , 32
S-video cable, 22 query, 34
universal series bus (USB), 23 report, 34-35
data representation, 72-75 types of relationship, 31-32
method of,72-75
binary coded decimal, 72-73 negative numbers , representation of, 68
character set, 75 network cables, 24-26
extended binary coded decimal coaxial, 25
interchange code(EBCIC), 73-74 Ethernet crossover cable, 25
data, 28-36 optical fibre cable, 24-25
database organisation, 30-31 patch cable, 25
hierarchical database structure, 30 telephone cable, 25
network database, 30 twisted pair cable, 24
relational database structure, 30 network connection, 2
database packages, 28-29 area, 2
database, 28-36 logical, 2
computer, 30-31 peer-to-peer, 2
field size, 31 client-server, 2-3
field types, 31 network devices, 9-11
field, 29, 31 bridge, 10
form, 29 hub, 9
objects, 29 modem, 9
query, 29-30 network interface card (NIC), 11
record, 29 node, 11
table, 29 repeater, 9
types of relationship, 31-32 router, 10
switch, 10
Ethernet, 4 network operating system, 3
European Organization for Nuclear Research, 15 network topology, 6-8
explicit sign methods, 70 bus network topology, 6-7 see (Linear
topology) 6,
graphics, 37 see (picture, image) hierarchical star topology, 8
CorelDraw, 37-43 hybrid topology, 8
closing and existing, 42 mesh network topology, 7-8
drawing of objects, 42 star network topology, 7
features in, 37-38 network transmission media, 5-6
opening, 38-39 wired technologies, 5
setting up a page in, 39 wireless technologies, 5-6
simple designs in, 42 global area network (GAN), 6
some tools in a tool box, 39-40 infrared communication, 6
packages, 37 microwave, 55 see (terrestrial
microwave)
hyperlinks, 5 transmission satellite, 6
hypertext markup language (HTML), 15 wireless LAN, 6
wireless transmission, 6

87
networking, 1-3
number bases, 62
number systems, 62-71
arithmetic operation in, 65-68

place values, 62-65


protocol, 15

transmission media, 1

uniform resource locator (URL) , 15 see also


(web page)

virtual machine, 55

web browser, 14, 15


web server, 14, 15
website, 14, 15, navigation through using
website addresses, 16-17
wireless connector, for desktop computers, 4
world wide web, 14-18 see (www, web, w3)
benefit of 17
history of, 15
protocol, 15-16

88

You might also like