You are on page 1of 42

CSC101: INTRODUCTION TO COMPUTER SCIENCE LECTURE

NOTE

COURSE CONTENTS

1. The Computer Industry: History and Generations of Computers, careers and


Ethics- mrs Deola
2. Computers and Digital Basics: Digital Devices, Digital Data Representation,
Digital Processing- Mrs Deola
3. Computer Hardware: Personal Computer Basics, Microprocessors and Memory,
Storage Devices, Input and Output Devices, Hardware Security.- Dr Olatunji
4. Computer Software: Software Basics, Installing software and upgrades,
software piracy, application software, System software, Introduction to
Artificial Intelligence.- Tope-Oke
5. Operating Systems and File Systems / Management: Operating Systems
Basics, Today’s Operating Systems, File basics, File Management.-Dr obajimi
Stephen
6. Introduction to Computer Networking: LAN, WAN, Networks building blocks,
wired and wireless networks. Dr Abiola
7. The internet, internet services and security and the Web, E-mail, Search
Engines, E- commerce.-Dr Badeji
8. Digital media, HCI, Digital ownership- Tope -Oke
9. Introduction to Computer Programming: Programming Basics and Types,
introduction to Problem solving and Algorithm, Flowchart, Pseudocode and
using Visual Development Environment.Mr Femi Sanya

The Computer Industry: History and Generations of


Computers, Careers and Ethics
Digital revolution is an ongoing process of social, political and economic change that
brought about digital technology, such as computers and internet. The digital
revolution became significant factor in the 1980’s as computers and other digital
devices became popular and as the internet opened global communications.

1
The term digital revolution was probably coined as a parallel to the term industrial
revolution, and in that sense it promises to bring about a similar level of social and
economic change.

The digital revolution is ongoing because new digital innovations challenging the
status quo bringing adjustment to traditions, lifestyles and legislation is emerging
every day.

Digital Electronics
Digital electronic makes use of electronic circuits to represent data. In the 1940’s
and 1950’s, engineers began to develop digital electronic devices and refine the
electronic components that are used in building them. Transistors and integrated
circuits called computer chips were the key factors in making electronic devices.
They are smaller in size and less expensive.

Examples of digital computers are portable media players such as iPods, digital
cameras, camcorders, cell phones, radios and televisions, global positioning systems
(GPSs), DVD and CD players, e-book readers and arcade games.

History of Computers
The first digital computer was built by engineers during World War II for breaking
codes and calculating ballistic missile trajectories. By 1950’s, a few computers were
being used for business data processing applications such as payroll and inventory
management. Businesses adopted computers with increasing enthusiasm as benefits
for cutting cost and managing mountains of data.

In 1960’s, digital revolution was beginning to transform organization but had little
effect on ordinary people who worried that impersonal data processing machine were
reducing people to numbers. In 1976, when personal computers became available,
software applications for personal computers begin to gain ground such as Apple II.
In 1982, as the variety of software increased, consumer interest grew. Also
computer ownership increased at a gradual pace until the mid 1990’s.

Another phase of digital revolution materialized when the Internet was opened to
public use.

2
The Internet: this is a global computer network originally developed as a military
project, then handed over to the National Science Foundation for research and
academic use. In 1995, companies such as AOL and CompuServe began to offer
Internet access and e-mail to a quickly growing list of subscribers when commercial
internet use was first allowed.

E-Mail: this is a form of electronic communication for the masses.

Bulletin boards: this allows members to post comments and questions that can be
read and responded to by others. This is the first online social scenes, although
postings and responses were sometimes days apart. Hostile or provocative postings
led to flame wars which later subsided when moderators stepped in.

Chart Group: this is where people exchange typed messages in real time. It offered
more compelling environment than bulletin boards and it still remain popular today
e.g. WhatsApp.

Blogs (Web Logs): these are personal journals posted online for general public
access; E.g. commentary by the author as well as links to additional information.

Online Social Networks: this is a platform to interact with friends, example is


Facebook. To become a member, you have to register or fill out a questionnaire to
create your virtual identity and identify a list of friends. You can then choose to
interact with your friend or with friends of those friends.

Internet allows people to share resources as well as interact.

Computer Network: this is a group of computers linked by wired or wireless


technology to share data and resources.

Wireless Network: a wireless network is a computer network that uses wireless data
connections between network nodes. Also wireless networks are computer networks
that are not connected by cables of any kind. They offered more advantages by
avoiding the costly process of introducing cables into buildings or as a connection
between different equipment locations.

3
Examples of wireless networks include cell phone networks, wireless local area
networks (WLANs), wireless sensor networks, satellite communication networks, and
terrestrial microwave networks.

The World Wide Web (WWW): is a collection of linked documents, graphics and
sounds that can be accessed over the internet. The emergence of web changed the
centuries old business models, revolutionized the flow of information and created a
new virtual world. Web adds content and substance to internet, without the web, the
internet would be like a library without any books or railroad without any trains.
From storefronts to online magazines to multiplayer games, the web has made
internet access a compelling digital technology for just about everyone.

Cyberspace: this is a term that refers to entities that exist largely within computer
networks. It is the imaginary (unreal)/hypothetical environment in which
communication over computer networks occurs. The web defines much of the
landscape of cyberspace ad its graphics and sounds make things seem real.

Digitization: it is the process of converting text, numbers, sound, photos and video
into data that can be processed by digital devices. This has really helped in the
digital revolution. People can easily download digital music, images and video from the
internet.

Convergence: this is a process by which several technologies with distinct


functionalities evolve to form a single product; for example a single device having
cell phone, portable media player, camera, PDA and computer with a single charger.

In conclusion learning about digital technology is not just about circuits and
electronics, nor only about digital gadgets such as computers and portable music
players. Digital technology permeates the very core of modern life. Understanding
how this technology works and thinking about its potential can help you comprehend
many issues related to privacy, security, freedom of speech and intellectuals
property. It will help you become a better consumer and give insights to local and
world events.

4
Generations of Computers

Each generation of computer is defined by a significant technological development


that changes fundamentally how computers operate – leading to more compact, less
expensive, but more powerful, efficient and robust machines.

1940 – 1956: First Generation – Vacuum Tubes


These early computers used vacuum tubes as circuitry and magnetic drums for
memory. As a result they were gigantic, literally taking up entire rooms and very
expensive. They generated a lot of heat, use great deal of electricity and
subsequently generated a lot of heat which caused ongoing breakdowns.

These first generation computers relied on ‘machine language’ (which is the most
basic programming language that can be understood by computers). These computers
were limited to solving one problem at a time. Input was based on punched cards and
paper tape. Output came out on print-outs. The two notable machines of this era
were the UNIVAC and ENIAC machines – the UNIVAC is the first ever commercial
computer (used for the calculations of the 1950 US national census) which was
purchased in 1951 by a business – the US Census Bureau.

1956 – 1963: Second Generation – Transistors


The replacement of vacuum tubes by transistors (discrete solid state electronic)
saw the advent of the second generation of computing. Although first invented in
1947, transistors were not used significantly in computers until the end of the 1950s.
They were a big improvement over the vacuum tube, despite still subjecting
computers to damaging levels of heat. However they were hugely superior to the
vacuum tubes, making computers smaller, faster, cheaper and less heavy on
electricity use. They still relied on punched card for input/printouts.

The language evolved from cryptic binary language to symbolic (assembly) languages
which allowed programmers to specify instructions in words. About the same time
high level programming languages were being developed (early versions of COBOL
and FORTRAN). Transistor-driven machines were the first computers to store
instructions into their memories – moving from magnetic drum to magnetic core
‘technology’. The early versions of these machines were developed for the atomic
energy industry.

1964 – 1971: Third Generation – Integrated Circuits


By mid sixties discrete electronic components were replaced by integrated circuits
which combined tens or hundreds of functional units on one chip. Transistors were
5
now being miniaturized and put on silicon chips (called semiconductors). This led to a
massive increase in speed and efficiency of these machines. These were the first
computers where users interacted using keyboards and monitors which interfaced
with an operating system, a significant leap up from the punch cards and printouts.
This enabled these machines to run several applications at once using a central
program which functioned to monitor memory.

As a result of these advances which again made machines cheaper and smaller, a new
mass market of users emerged during the ‘60s.

1972 – 2010: Fourth Generation – Microprocessors


The emergence of fourth generation of computers was brought about by
microprocessor, as thousands of integrated circuits were built onto a single silicon
chip. This revolution can be summed in one word: Intel. The chip-maker developed
the Intel 4004 chip in 1971, which positioned all computer components (CPU, memory,
input/output controls) onto a single chip. What filled a room in the 1940s now fit in
the palm of the hand. The year 1981 saw the first ever computer (IBM) specifically
designed for home use and 1984 saw the Macintosh introduced by Apple.
Microprocessors even moved beyond the realm of computers and into an increasing
number of everyday products.

The increased power of these small computers meant they could be linked, creating
networks; which ultimately led to the development, birth and rapid evolution of the
Internet. Other major advances during this period have been the Graphical user
interface (GUI), the mouse and more recently the astounding advances in lap-top
capability and hand-held devices.

2010 (present and beyond)- : Fifth Generation – Artificial Intelligence


Computer devices with artificial intelligence are still in development, but some of
these technologies are beginning to emerge and be used such as voice recognition.

AI is a reality made possible by using parallel processing and superconductors.


Leaning to the future, computers will be radically transformed again by quantum
computation, molecular and nano technology.

The essence of fifth generation will be using these technologies to ultimately create
machines which can process and respond to natural language, and have capability to
learn and organize themselves.

6
Computer and Digital Basics

What is computer science? – This is the study of the principles and use of
computers. Computer science is the study of the theory, experimentation, and
engineering that form the basis for the design and use of computers.

Computer Science is the study of computers and computational systems

Digital Devices

What is computer? – an electronic device which is capable of receiving information


(data) in a particular form and of performing a sequence of operations in accordance
with a predetermined but variable set of procedural instructions (program) to
produce a result in the form of information or signals.

A computer is a device that can be instructed to carry out arbitrary sequences of


arithmetic or logical operations automatically.

A computer is a programmable machine designed to perform arithmetic and logical


operations automatically and sequentially on the input given by the user and gives
the desired output after processing.

A computer is a multipurpose device that accepts input, processes data, stores data,
and produces output, all according to a series of stored instructions

➢ Computer input is whatever is typed, submitted, or transmitted to a computer


system
➢ Computer Output is the result produced by a computer
➢ Data refers to the symbols that represent facts, objects, and ideas.
Computers manipulate data in many ways, and this manipulation is called processing.
In a computer, most processing takes place in a component called the Central
Processing Unit (CPU). The CPU of most modern computers is a microprocessor
which is an electronic component that can be programmed to perform tasks based
on data it receives.

Data storage

7
A computer stores data so that it will be available for processing.
➢ Memory is an area of a computer that temporarily holds data waiting to be
processed, stored, or output.
➢ Storage is the area where data can be left on a permanent basis when it is not
immediately needed for processing.
➢ A file is a named collection of data that exists on a storage medium
➢ Computer program is a series of instructions that tells a computer how to carry
out processing tasks e.g. software
➢ Software are programs that sets up a computer to do a specific task. Computer
runs two main software, they are application software and utility/system
software
➢ Application software is a set of computer programs that helps a person carry
out a task. They are sometimes referred to as apps, especially in the context
of handheld devices.
➢ System software main purpose is to help the computer system monitor itself
in order to function efficiently e.g. Operating system (OS).

Characteristics of Computers
The characteristics of computers that have made them so powerful and universally
useful are speed, accuracy, diligence, versatility and storage capacity.
➢ Speed: The speed at which information becomes available is higher: computers
can process data much more quickly than a human. This means that a computer
can produce more timely information.
➢ Accuracy: The computers are generally accurate. Errors that may occur can
almost always be attributed to human error (inaccurate data or poorly designed
system), software error (faulty instructions/programs written by the
programmer) and hardware package errors (faults or breakdown in the equipment
itself).
➢ Diligence: Unlike human beings, computers are highly consistent. They do not
suffer from human traits of boredom and tiredness resulting in lack of
concentration. Computers, therefore, are better than human beings in performing
voluminous and repetitive jobs.
➢ Versatility: Computers are versatile machines and are capable of performing any
task as long as it can be broken down into a series of logical steps. The presence
of computers can be seen in almost every sphere – Railway/Air reservation, Banks,
Hotels, Weather forecasting and many more.
➢ Storage Capacity: computers can store large volumes of data. A piece of
information once recorded (or stored) in the computer, can never be forgotten
and can be retrieved almost instantaneously.

8
Types of Computers
There are four types of computers and they include: mainframe, mini-computers,
micro-computers and super-computers.
Super computers – a computer is called supercomputers if at the time of
invention is the fastest. Supercomputers are very expensive and are employed
for specialized applications that require immense amounts of mathematical
calculations (number crunching). For example, weather forecasting, scientific
simulations, (animated) graphics, fluid dynamic calculations, and nuclear energy
research. The renowned manufacturer is Cray Research.
Mainframe computers – Mainframe is a very large and expensive computer
capable of supporting hundreds, or even thousands, of users simultaneously. They
are generally used by government and businesses such as banks that have very
large volumes of data processing to perform and have special security needs.
Example IBM Z9 109.

The main difference between a supercomputer and a mainframe is that a


supercomputer channels all its power into executing a few programs as fast as
possible, whereas a mainframe uses its power to execute many programs
concurrently. In some ways, mainframes are more powerful than supercomputers
because they support more simultaneous programs. But supercomputers can execute
a single program faster than a mainframe.

Mini - Computers, now often called "Mid-Range" Computers – is a midsize


computer that has the capability of supporting from up to 200 users
simultaneously. They are smaller than mainframe computers, less expensive and
less powerful that were able to provide adequate computing power for small
businesses. Examples IBM with its AS400, ICL and DEC.
Micro - Computers, now commonly called Personal Computers (PC) – is also known
as single board computers. They are the cheapest class of computers and can
operate under normal condition, e.g. IBM, APPLE, Hewlett Packard, Dell and
Toshiba.

Types Mini computer Micro computer Mainframe computer


Cost Less expensive Least expensive Very expensive
Speed Faster than micro Not as fast as other The fastest, can
computer computers. execute up to 100MIPs
Memory In the range 128kb to High capacity in the 4kbytes
Capacity 256 range of MB to GB
Size Mid-sized Portable/smallest The biggest
9
Uses For small businesses Individual use Government and large
scale businesses

Workstation
It is a type of computer used for engineering applications (CAD/CAM), desktop
publishing, software development, and other types of applications that require a
moderate amount of computing power and relatively high quality graphics
capabilities.
Workstations generally come with a large, high-resolution graphics screen, at large
amount of RAM, built-in network support, and a graphical user interface. Most
workstations also have a mass storage device such as a disk drive, but a special type
of workstation, called a diskless workstation, comes without a disk drive. The most
common operating systems for workstations are UNIX and Windows NT. Like
personal computers, most workstations are single-user computers. However,
workstations are typically linked together to form a local-area network, although
they can also be used as stand-alone systems.
Note: In networking, workstation refers to any computer connected to a local-area
network. It could be a workstation or a personal computer.

Personal Computer (PC)


It can be defined as a small, relatively inexpensive computer designed for an
individual user. All are based on the microprocessor technology that enables
manufacturers to put an entire CPU on one chip. Businesses use personal computers
for word processing, accounting, desktop publishing, and for running spreadsheet and
database management applications. At home, the most popular use for personal
computers is for playing games and recently for surfing the Internet.

Today, the world of personal computers is basically divided between Apple


Macintoshes and PCs. The principal characteristics of personal computers are that
they are single-user systems and are based on microprocessors. However, although
personal computers are designed as single-user systems, it is common to link them
together to form a network. In terms of power, there is great variety. At the high
end, the distinction between personal computers and workstations has faded. High-
end models of the Macintosh and PC offer the same computing power and graphics
capability as low-end workstations by Sun Microsystems, Hewlett-Packard, and DEC.

Uses of PC
i. It is used to produce documents like memos, reports, letters and briefs
ii. It is used to calculate budgets and accounting tasks
10
iii. it can analyze numeric function.
iv. it can be used for electronic mails
v. it can help making schedule and plan projects

Advantages of PC
i. it has faster speed for processing data
ii. it is versatile, it can be used in any establishment
iii. it can deal with several data at a time
iv. it is capable of storing several data
v. operation is less fatigue
vi. Network is possible, able to link two or more computer together.

Disadvantages of PC
i. it is costly to maintain
ii. it is very fragile and complex to handle
iii. it requires special skill to operate
iv. it can lead to unemployment when used mostly in less developed countries
v. Some cannot function properly without the aid of cooling system for example
air condition or fan in some locations.

Actual personal computers can be generally classified by size and chassis / case. The
chassis or case is the metal frame that serves as the structural support for
electronic components. Every computer system requires at least one chassis to house
the circuit boards and wiring. The chassis also contains slots for expansion boards.
If you want to insert more boards than there are slots, you will need an expansion
chassis, which provides additional slots. There are two basic flavors of chassis
designs–desktop models and tower models–but there are many variations on these
two basic types. After this era then come the era of portable computers that are
computers small enough to carry. Portable computers include notebook and
subnotebook computers, hand-held computers, palmtops, and PDAs.

Types of Personal Computers


Explained below are the types of personal computers.
Tower model
The term refers to a computer in which the power supply, motherboard, and mass
storage devices are stacked on top of each other in a cabinet. This is in contrast to
desktop models, in which these components are housed in a more compact box. The

11
main advantage of tower models is that there are fewer space constraints, which
makes installation of additional storage devices easier.

Desktop model
A computer designed to fit comfortably on top of a desk, typically with the monitor
sitting on top of the computer. Desktop model computers are broad and low, whereas
tower model computers are narrow and tall. Because of their shape, desktop model
computers are generally limited to three internal mass storage devices. Desktop
models designed to be very small are sometimes referred to as slimline models.

Notebook computer
Notebook computer is an extremely lightweight personal computer. Notebook
computers typically weigh less than 6 pounds and are small enough to fit easily in a
briefcase. Aside from size, the principal difference between a notebook computer
and a personal computer is the display screen. Notebook computers use a variety of
techniques, known as flat-panel technologies, to produce a lightweight and non-bulky
display screen. The quality of notebook display screens varies considerably. In terms
of computing power, modern notebook computers are nearly equivalent to personal
computers. They have the same CPUs, memory capacity, and disk drives.
However, all this power in a small package is expensive. Notebook computers cost
about twice as much as equivalent regular-sized computers. Notebook computers
come with battery packs that enable you to run them without plugging them in.
However, the batteries need to be recharged every few hours.

Laptop computer
This is a small, lightweight, portable computer -- small enough that it can sit on your
lap. Nowadays, laptop computers are more frequently called notebook computers. It
comes with battery packs that enable you to run them without plugging them in.
However, the batteries need to be recharged every few hours.

Subnotebook computer
A portable computer that is slightly lighter and smaller than a full-sized notebook
computer. Typically, subnotebook computers have a smaller keyboard and screen, but
are otherwise equivalent to notebook computers.

Personal Digital Assistant (PDA)


This is a handheld device that combines computing, telephone/fax, and networking
features. A typical PDA can function as a cellular phone, fax sender, and personal
organizer. The most popular PDA are those that are specifically designed to provide
PIM (personal information manager) functions, such as a calendar and address book.
12
Unlike portable computers, most PDAs are pen-based, using a stylus rather than a
keyboard for input. This means that they also incorporate handwriting recognition
features. Some PDAs can also react to voice input by using voice recognition
technologies. PDAs are also called palmtops, hand-held computers (Smartphones,
MP3 players) and pocket computers.

Smartphones
This is used to make and receive phone calls. It is also used to connect to the
Internet, to check email, and to maintain an electronic appointment book.

Digital Data Representation

Data representation refers to the form in which data is stored, processed, and
transmitted.
Digital data is text, numbers, graphics, sound, and video that has been converted
into discrete digits such as 0s and 1s.
Analog data is represented using an infinite scale of values.
Numeric data consists of numbers that might be used in arithmetic operations e.g.
annual income or age. Numeric data is represented using binary number system called
base 2 (i.e. 0s and 1s).
Character data is composed of letters, symbols and numerals that are not used in
arithmetic operations e.g. name, address etc.
ASCII, EBCDIC and Unicode are several types of codes that digital devices employ
to represent character data.

• Computers interpret every signal as “on” or “off”


• 1 (“on”) and 0 (“off”) referred to as bits or binary digits.
• Bit (binary digit) is the smallest unit of digit.
• 8bits = 1 byte, each byte represents a unique characters.
• Kilobyte (KB) = one thousand bytes
• Megabyte (MB) = one million bytes
• Gigabyte (GB) = one billion bytes
• Terabyte (TB) = one trillion bytes

Digital Processing
Programs and instruction sets

13
Computer programmers create programs that control digital devices. These
programs are usually written in a high level programming language such as C, Basic,
COBOL or Java.
Programming language use limited set of command words to form sentence-like
statement designed as step by step directive for the processor chip. This human
readable version of program is called source code. Source code has to be converted
into a digital format before the processor can use it.

The procedure for translating source code into 0’s and 1’s (object code) can be
accomplished by a Compiler or Interpreter.
A compiler converts all the statements in a program in a single batch, and the
resulting collection of instruction called object code is placed in a new file.

An interpreter converts and executes one statement at a time while the program is
running.

A microprocessor is hardwired to perform a limited set of activities, such as


addition, subtraction, division, counting and comparisons. This collection of
preprogrammed activities is called an instruction set. This instruction set is
designed to be general purpose so that programmers can use it in creative ways for
the wide variety of tasks performed by all kinds of digital devices.

Machine Language is a list of codes for a microinstruction set (0’s and 1’s) and can
be directly executed by the processor’s circuitry. A set of machine language
instructions for a program is called machine code. Machine code has two parts: the
opcode and operands.
An Opcode (operation code) is a command word for an operation such as add, compare
or jump.
The operand for an instruction specifies the data, or the address of the data for
the operation.

Processor Logic
The circuitry in a computer that controls the manipulation of data is called the
central processing unit, or CPU (often referred to as merely the processor).

A CPU consists of two parts: the arithmetic/logic unit, which contains the circuitry
that performs operations on data (such as addition and subtraction), and the control
unit, which contains the circuitry for coordinating the machine's activities.

14
Figure 1: ALU operation
The control unit fetches the ADD instruction, then loads data into the ALU’s
registers where it will be processed

For temporary storage of information, the CPU contains cells, or registers, that are
conceptually similar to main memory cells. These registers can be classified as either
general-purpose registers or special-purpose registers.

General-purpose registers serve as temporary holding places for data being


manipulated by the CPU. These registers hold the inputs to the arithmetic/logic
unit's circuitry and provide storage space for results produced by that unit.

To perform an operation on data stored in main memory, the control unit transfers
the data from memory into the general-purpose registers, informs the
arithmetic/logic unit which registers hold the data, activates the appropriate
circuitry within the arithmetic/logic unit, and tells the arithmetic/logic unit which
register should receive the result.

For the purpose of transferring bit patterns, a machine's CPU and main memory are
connected by a collection of wires called a bus. Through this bus, the CPU extracts
(reads) data from main memory by supplying the address of the pertinent memory
cell along with an electronic signal telling the memory circuitry that it is supposed to
retrieve the data in the indicated cell. In a similar manner, the CPU places (writes)
data in memory by providing the address of the destination cell and the data to be
stored together with the appropriate electronic signal telling main memory that it is
supposed to store the data being sent to it.

In short, the data must be transferred from main memory to registers within the
CPU, the values must be added with the result being placed in a register, and the
result must then be stored in a memory cell. Based on this design, the task of adding
two values stored in main memory involves more than the mere execution of the
addition operation. Indeed, the complete process of adding two values stored in
memory is summarized by the five steps listed below:
15
Step 1. Get one of the values to be added from memory and place it in a
register.
Step 2. Get the other value to be added from memory and place it in another
register.
Step 3. Activate the addition circuitry with the registers used in Steps 1 and 2
as inputs and another register designated to hold the result.
Step 4. Store the result in memory.
Step 5. Stop.

The whole execution process is as follows: the control unit inside the CPU has two
special purpose registers: the instruction register and the program counter. The
instruction register is used to hold the instruction being executed. The program
counter contains the address of the next instruction to be executed; thereby
serving as the machine's way of keeping track of where it is in the program.

The control unit performs its job by continually repeating an algorithm that guides
it through a three-step process known as the machine cycle/instruction cycle-this
refers to the process in which a computer executes a single instruction.

The steps in the machine cycle are fetch, decode, and execute (Figure 2). During the
fetch step, the control unit requests that main memory provide it with the
instruction that is stored at the address indicated by the program counter. Since
each instruction in our machine is two bytes long, this fetch process involves
retrieving the contents of two memory cells from main memory. The control unit
places the instruction received from memory in its instruction register and then
increments the program counter by two so that the counter contains the address of
the next instruction stored in memory. Thus the program counter will be ready for
the next fetch.

With the instruction now in the instruction register, the control unit decodes the
instruction, which involves breaking the operand field into its proper components
based on the instruction's op-code. The control unit then executes the instruction
by activating the appropriate circuitry to perform the requested task. The example
is presented in Figure 3.

16
Figure 2a: The Machine Cycle or Instruction Cycle

Figure 2b: Machine or Instruction Cycle

Figure 3: The Control Unit

17
The control unit’s instruction pointer indicates M1, a location in memory. The control
unit fetches the “Add two numbers” instruction from M1. This instruction is then
sent to the ALU. The instruction pointer then changes to M2. The processor fetches
instruction located in M2, moves it to a register and executes it.

Computer Hardware
Computer hardware is the collection of physical parts of a computer system. This
includes the system unit and peripherals. Computer hardware is what you can
physically touch. Components of computer hardware are discussed as follows:

• Keyboard: a computer keyboard is one of the primary input devices that can
be use to input letters, numbers, and other symbols into a computer. It is
similar to those found on electric typewriters, but with some additional keys.

• Mouse: a computer mouse is a small handheld device which is moved across a


mat or flat surface to move the cursor on a computer screen. It is an Input
Device to Control On-Screen Objects.

• Hard disk drive: a hard disk drive is the main storage device on a personal
computer system. It is usually mounted inside the computer’s system unit and
can store billions of characters of data.

• CD and DVD drives: a CD driver is a storage device that uses laser technology
to work with data on computer or audio CDs. A DVD drive can work with data
on computer CDs, audio CDs, computer DVDs or DVD movie disks.
We have read only devices that cannot be used to write data onto disk. They
are typically used to access data from commercial software, music and movie
CDs or DVDs. Writable CD and DVDs drives however can be used to store and
access data.

• Other storage: personal computers sometimes include a floppy disk drive,


which is a low-capacity storage device once found on virtually all computers.
Floppy disks are disappearing as USB flash storage devices become more
popular.

• Sound System: the sound system for a personal computer can output digital
music, digitally recorded speech and a variety of sound effects. System
sounds are designed to draw your attention to various messages and events. A

18
computer’s sound card sends signals to speakers which can be eternal devices
or built into the system unit.

• Display System: a PC display system consists of two parts: Circuitry called a


graphic card, converts raw digital data into images that can be shown on a
display device. Display devices often called computer screens or monitors
present visual output such as documents, photos and videos.

• Network and Internet access: many PC systems include built-in circuitry for
wired or wireless connections to a computer network. Internet connection
requires a modem; Modems establishes an internet connection using a
standard telephone line which are often built into the system unit while
Modems for cable, satellite and other types of internet access are usually
separate components.

• Printer: it’s an output device that produces computer generated text or


graphical images on paper.

• System unit: this is the case that holds the central processing unit, the
computer’s main circuit/system boards; primary memory and storage devices.
It can also be defined as the electronic components used to process and
temporarily store data and instructions.
Central Processing Unit
This is the part of a computer in which operations are controlled and executed. The
CPU has three essential sets of transistors that work together in processing digital
data: a control unit, an arithmetic logic unit, and registers.
• The control unit directs the flow of data and instructions within the processor
and electronic memory.
• The arithmetic logic unit (ALU) contains programmed transistors that perform
mathematical and logical calculations on the data.
• The registers are special transistors that store data and instructions as they
are being manipulated by the control unit and ALU. New microprocessors also
have additional high-speed memory called cache, on the chip to store frequently
used data and instructions.

Various performance features of the CPU that determine the efficiency of the
machine cycle are: clock speed, word size, front-side bus, instruction set and
processing techniques.

19
Clock speed: this is the rate at which the CPU carries out its basic instructions. It
is measured in Hertz (mega hertz or giga hertz). One hertz is one cycle per second.
Word Size: this refers to the number of bits that a processor can manipulate as a
unit in one machine cycle. A processor with 64bit word size has 64bits register,
processes 64bits data at a time and is referred to as 64bit-processor.
Front side bus: this refers to circuitry that transports data to and from the
microprocessor.
Instruction set: this is the collection of preprogrammed activities such as addition,
subtraction, division and multiplication. Example is reduced instruction set (RISC);
RISC chips eliminate complex embedded microcode instructions and replace them
with a simpler set of instructions for executing the most common commands used by
the processor. These common commands are combined to carry out the less
frequent, more complex processing tasks. This results in faster overall processing
of routine operations.
Processing Techniques: there are three methods, they are
Serial processing-this is an execution of an instruction at a time.
Parallel processing- this is an execution of multiple instructions at the same time
Pipelining: this is an execution of an instruction before the completion of another.

System Board
The system board (also called the motherboard) is the main circuit board, or the
electrical foundation of the computer. In addition to CPU, RAM, and ROM chips, the
system board contains the following:
• Expansion slots to add memory and hardware devices
• Special purpose chips that convert analog signals to digital format
• Video card to control the display monitor
• Power supply
• I/O interface ports to capture and send data to peripheral devices
Multimedia computers are equipped with many built-in devices, but often a developer
may want additional hard drives, a DVD burner, or a second video board, for example.
Many computers have expansion slots to add these hardware components; others
have limited or no expansion capability at all. An alternative to adding devices
directly on the system board is to plug external devices into an interface port.

Primary Storage/Memory

20
Primary storage is also known as internal storage or memory. It is used to store
programs and data currently being processed by CPU. There are three types of
primary storage – RAM, ROM and Cache.

RAM:-this is also known as Random Access Memory. It is a temporary holding area


for data, application program, instructions and the operating system. It is volatile,
that is data can easily be lost when light goes off. RAM provides the fast, electronic
access to data and instructions required for processing by the CPU. Programmer can
read from it and also write into it.

It is the waiting room for the computer’s processor. It holds raw data waiting to be
processed stored, displayed or printed as well as the program instruction for
processing that data. It holds the result of processing until they can be stored more
permanently on disk or tape.

Examples of RAM Capacity:


We have 256MB, 512MB, 2GB and so on. The amount of RAM your computer used
depends on the software you use.
RAM speed is often expressed in nanoseconds or megahertz. 1 nanosecond (ns) is 1
billion of a second. Lower nanosecond ratings are better because the RAM circuitry
can react faster to update the data it holds. For example 8ns RAM is faster than
10ns RAM. Ram speed can also be expressed in MHz (million of cycle per second);
just the opposite of nanoseconds, higher MHz ratings means faster speeds e.g.
533MHz RAM is faster than 400MHz RAM.

In today’s PC, SDRAM (Synchronous Dynamic RAM) which is fast and relatively
inexpensive are used. Also RDRAM (Rambus Dynamic RAM) which is more expensive
than the former and usually found in high-performance workstations.

ROM:- also known as Read-Only Memory is the permanent storage location for a set
of instructions the computer uses. ROM is a special form of nonvolatile electronic
storage that contains frequently used instructions for the CPU. These commands are
hardwired or embedded in the chip by the manufacturer; they can be read, but not
changed. The instructions perform essential system checks and load the operating
system (OS) from disk storage into RAM. ROM is activated when the power is on.
The embedded instructions do not disappear when the power is off, unlike RAM
storage.

ROM is needed as well as RAM because when the RAM loses its data or information
when light/power goes off, ROM contains a small set of instruction called the ROM
Bios (basic input /output system). These instructions tell the computer how to access
21
the hard disk find the operating system and load it into RAM. After the OS is loaded,
the computer can understand your input, display output, run software and access
your data.

Cache:- this is a special high-speed memory chip on the motherboard or CPU. It


stores frequently and recently accessed data and commands, this reduces the time
it takes to locate and transport data from RAM.

Differences between ROM and RAM


ROM RAM
ROM is nonvolatile RAM is volatile
ROM is cheaper than RAM RAM is very expensive
The contents of ROM are always known The contents are not known
and can be verified
ROM cannot be updated or corrected RAM can be updated and corrected
ROM serves as permanent data storage RAM can serve as temporary data
storage

Secondary Storage/Storage Devices


This is an optional attachment, which is cable –connected to the CPU. Secondary is
nonvolatile. It is a permanent form of storage. A data storage system has 2
components:
A storage medium: the disk, CD, DVD paper or other substance that contains data.
A storage device: mechanical apparatus that records and retrieve data from
storage medium e.g. floppy disk drives, hard disk drives, tape drives, CD drives, DVD
drives and flash drives.

Storage Technology for Personal Computers


Examples of Storage Technology for Personal Computers are magnetic, optical and
solid state devices.

Magnetic disk and tape technology: Examples are floppy disk, hard disk and
magnetic tape. They stores data by magnetizing microscopic particles on a disk or
tape surface. The particles retain their magnetic orientation until that orientation
is changed, thereby making disks and tape fairly permanent but modifiable storage
media.

Data stored on magnetic media such as floppy disk can be unintentionally altered by
magnetic fields, dust mold, smoke particles, heat and mechanical problems

22
associated with such storage device. Placing a magnet on a floppy disk is a sure way
of losing data saved on it.

Magnetic media gradually lose their magnetic charge, resulting in lost data.
Therefore it is recommended that data on magnetic media should be refreshed
every two years by recopying it.

Optical Storage Technology: they use laser technology to read and write data on
specially coated reflective discs; examples are- CD (Compact Disc), DVD (Digital
Video/Versatile Disk).

CD (Compact Disc) technology: was originally designed to hold 74 minutes of


recorded music. The original CD standard was adapted for computer storage with
capacity for 650MB of data. Later improvement increased the capacity to 80minutes
of music or 700MB of data.

DVD (Digital Video or Digital Versatile Disk) technology: this is a variation of CD


technology that was originally designed as an alternative to VCRs (video cassette
recorder), but was quickly adopted by the computer industry to store data.

The initial DVD standard has 4.7GB (4,700MB) of data storage (about 7x as much
capacity as a CD). With the improvement we have, a double layer DVD which has two
recordable layers on the same side and can store 8.5GB of data. An HD-DVD can
store 15GB per layer on a single side; a Blu-ray DVD (BD) has 25GB capacity per
layer.

NOTE:
CD and DVD as optical media stores data as microscopic light and dark spots on the
disk surface. The dark spots are called pits and lighter, non pitted surface areas of
the disk are called lands.

CD and DVD drives contain a spindle that rotates the disk over a laser lens. The laser
directs a beam of light toward the underside of the disk. The dark pits and lights on
the disk surface reflect the light differently. As the lens reads the disk, these
differences are translated into the 0s and 1s that represent data.

Categories of Optical Technologies


Optical technologies are grouped into 3 categories namely: read-only, recordable and
rewritable.

23
• Read-only (ROM): it stores data permanently on a disk, which cannot be
subsequently added to or changed e.g. CD-ROMs, CD-Das, DVD-Video, DVD-
ROMs
• Recordable (R): it uses a laser to change the color in a dye layer sandwiched
beneath the clear plastic disk surface. The laser creates dark spots in the
dye that are read as pits. The change in the dye is permanent, so data cannot
be changed once it has been recorded.
• Rewritable (RW): it uses phase change technology to alter a crystal structure
on the disk surface. Altering the crystal structure creates patterns of light
and dark spots similar to the pits and lands on a CD. The crystal structure can
be changed from light to dark and back again many times, making it possible
to record and modify data much like on a hard disk.

Several CD and DVD formats for PC


• CD-CA (Compact Disc Digital Audio): commonly known as audio CD. Music is
typically recorded on audio CDs by the manufacturer but cannot be
changed by the consumer.
• DVD-Video (Digital Versatile Disc Video): this is the format for commercial
DVDs that contain feature –length films.
• CD-Rom (Compact Disc Read Only Memory): this is for storing data. Data
is stamped on the disk at the time it is manufactured. Data cannot be
added, changed or deleted from these disks.
• DVD-ROM (Digital Versatile Disc Read Only Memory): like CD-ROMs, the
data on these disks is permanent, so you cannot add or change the data.
• CD-R (Compact Disc Recordable): disks store data using recordable
technology. The data on a CD-R cannot be erased or modified once you
record it. However, most CD-R drives allow you to record your data in
multiple sessions. For example you can store two files on a CD-R disk today,
and add data for a few more files to the disk at a later time.
• DVD+R or DVD-R (Digital Versatile Disk Recordable): disks store data using
recordable technology similar to a CD-R, but with DVD storage capacity.
• CD+RW or CD-RW (Compact Disc Rewritable): disks store data using
rewritable technology. Stored data can be recorded and erased multiple
times, making it a very flexible storage option.
• DVD+RW or DVD-RW (Digital Versatile Disk Rewritable): disks store data
using rewritable technology similar to CD-RW, but with DVD storage
capacity.

24
Solid State Storage Technology: this stores data in erasable, rewritable circuitry
rather than on spinning disks or streaming tape. Examples are; USB flash drive,
memory cards and the built-in memory used in MP3 players, digital cameras, and
mobile phones.

Solid state storage is portable and provides fairly fast access to data. It is an ideal
solution for storing data on mobile devices and transporting data from one device to
another. It is durable that is impervious to vibration, magnetic fields or extreme
temperature fluctuations.

Types of Solid State Storage


Various types of solid state storage mechanism are compact flash, multimedia,
secure-Digital (SD) and smart-Media.

Some solid state has a memory card that can be inserted into the computer to
download MP3 music file and store them. That card can be removed from computer
and inserted into a portable MP3 player, so that favourite tunes can be listened to
while moving.

There is also USB flash drive such as Sony’s Microvault, ScanDisk cruzer or the
Kingston Traveler. It is a portable storage device that is plug into a computer’s USB
port using a built-in connector. Also called thumb drives, pen drives, jump drives and
key chain drive. Files stored on a USB flash drive can be opened, edited, deleted and
run just as though those files were stored on magnetic or optical media. Software
can be run on them too. Its capability ranges from 16MB to 8GB, they have maximum
data transfer speeds of about 100Mbps but mostly operate in the range of 18-
28Mbps.

The criteria to compare storage devices are as follows:


• Versatility: this is how devices can access data from several different media.
For example; a floppy disk can access only floppy disk, whereas a DVD drive
can access computer DVDs, DVD movies, audio CDs, computer CDs and CD-Rs.
• Durability: susceptibility to damage from mishandling or other environmental
factors such as heat or moisture. CDs and DVDs are more durable than
harddisks.
• Speed: access time is the time it takes a computer to locate data on a storage
medium and read it. Fast storage devices are preferred over slow storage
devices. A drive with 6ms (ms-milliseconds) access time is faster than a drive
with an access time of 11ms. Access time is the best for random access

25
devices. Random access (direct access) is the ability of a device to jump
directly to the requested data. Example of random access devices are floppy
disk, hard disk, DVD, CD and solid state drives. A tape drive must use slower
or sequential access by reading through the data from the beginning of the
tape.
• Capacity: storage capacity is the maximum amount of data that can be stored
on a storage medium, and it is measured in KB, MB, GB or TB. Storage capacity
is directly related to storage density: the amount of data that can be stored
in a given area of a storage medium, such as the surface of a disk. The higher
the storage density, the more data is stored.
• Data Transfer Rate: this is the amount of data a storage device can move
per second from the storage medium to the computer. For example, a Cd-ROM
drive with a 600KBps data transfer rate is faster than one with a 300KBps
transfer rate.

Input and Output Devices


Input Devices
These devices are used to enter information and instructions into a computer for
storage or processing. An input device is any hardware device that sends data (in
form of sound, video, images, numbers and text) to a computer, allowing you to
interact with and control the computer. Examples are: keyboard, mouse, pointing

26
devices (track balls, touch pads and touch screens), scanner, microphones, sound
recorders, cameras and graphical tablets.

Output Devices
These devices accept output from the data processing device and convert it into a
form suitable for use by the computer's human operators in audio or video form.
An output device is any device used to send data from a computer to
another device or user. Examples include monitors (LCD-liquid crystal display, LED-
light emitting diodes and CRT-cathode ray tube), projectors, speakers, headphones
and printers (non impact-laser and inkjet, impact-dot matrix).

Hardware Security
Hardware security is all about keeping our computers save from either hackers or
theft. We can keep our computer save by:
• Installing Firewall.
• Installing Antivirus Software.
• Installing Anti-Spyware Software.
• Using of Complex and Secure Passwords.
• Check on the Security Settings of the Browser.
• By not leaving our computer unattended to.
• By using hardware security module (HSM). HMS is a physical computing device
that safeguards and manages digital keys for strong authentication and
provides cryptoprocessing. These modules traditionally come in the form of a
plug-in card or an external device that attaches directly to a computer or
network server.
• Protection against power surge.
Power surge is a sudden increase or spike in electrical energy, affecting the current
that flows to electrical outlets. Power surges can originate from a number of
sources: downed power lines, power grid switching by electric company, faulty wiring
and large appliances like refrigerators and air conditioners powering on and off.
Lightening or electrical storms can cause extremely large power surges and
consequently pose a real threat to your computer equipments.

Computers can be protected against power surge by plugging into a surge


strips/surge protector/surge suppressor instead of directly into a wall outlet. All
devices should be switched off/turned off.

27
A surge strip/surge protector/surge suppressor is a device that contains electrical
outlets protected by circuitry that blocks surges and spikes.

A UPS (uninterruptible power supply) is a device that not only provides surge
protection but also furnishes the computer with battery backup power during a
power outage.

COMPUTER SOFTWARE
Computer software is the set of programs that makes the hardware perform a set
of tasks in particular order/is a set of instructions given to computers telling it what
to do, how to do it and when to do it. Hardware and software are complimentary to
each other. Both have to work together to produce meaningful results. Computer
software is classified into two broad categories; system software and application
software.

Application software:
Software that can perform a specific task for the user, such as word processing,
accounting, budgeting or payroll, fall under the category of application software.
Word processors, spreadsheets, database management systems are all examples of
general purpose application software.

Types of application software are:


❖ Word processing software: The main purpose of this software is to produce
documents. MS-Word, Word Pad, Notepad and some other text editors are
some of the examples of word processing software.
❖ Database software: Database is a collection of related data. The purpose of
this software is to organize and manage data. The advantage of this software
is that you can change the way data is stored and displayed. MS access, dBase,
FoxPro, Paradox, and Oracle are some of the examples of database software.
❖ Spread sheet software: The spread sheet software is used to maintain
budget, financial statements, grade sheets, and sales records. The purpose of
this software is organizing numbers. It also allows the users to perform simple
or complex calculations on the numbers entered in rows and columns. Example
is MS-Excel.
❖ Presentation software: This software is used to display the information in
the form of slide show. The three main functions of presentation software is
editing that allows insertion and formatting of text, including graphics in the

28
text and executing the slide shows. The best example for this type of
application software is Microsoft PowerPoint.
❖ Multimedia software: Media players and real players are the examples of
multimedia software. This software will allow the user to create audio and
videos. The different forms of multimedia software are audio converters,
players, burners, video encoders and decoders.

System Software:
System software consists of a group of programs that control the operations of a
computer equipment including functions like managing memory, managing peripherals,
loading, storing, and is an interface between the application programs and the
computer. MS DOS (Microsoft’s Disk Operating System), UNIX are examples of
system software.
- They facilitate optimum use of hardware,
- They provide good environment to write, decode and debug other programs,
- They serve as interface between the hardware and application systems.

System software

Loaders and Operating Utility Language


editors software Routine processor

Computer Language
Computer language or programming language is a coded syntax used by computer
programmers to communicate with a computer/ is the set of specialized words,
symbols and commands that the computer understands. They are used to
communicate with the computer system. The language enables a computer user to
dictate what commands the computer must perform to process data. These
languages can be classified into following categories.
1. Machine language
2. Assembly language
3. High level language

29
Machine Language/Low Level Language
Machine language or machine code is the native language directly understood by the
computer’s central processing unit or CPU. This type of computer language is not
easy to understand, as it only uses a binary system (0s and 1s), an element of
notations containing only a series of numbers consisting of one and zero, to produce
commands.

Assembly Level Language


Assembly language is a symbolic language comprises of alphanumeric, that is symbols
and numeric code. Assembly Level Language is a set of codes that can run directly
on the computer’s processor. This type of language is most appropriate in writing
operating systems and maintaining desktop applications. With the assembly level
language, it is easier for a programmer to define commands. It is easier to
understand and use as compared to machine language.

High Level Language


High Level Languages are user-friendly languages which are similar to English with
vocabulary of words and symbols. These are easier to learn and require less time to
write. They are problem oriented rather than ‘machine’ based. Program written in a
high-level language can be translated into many machine languages and therefore can
run on any computer for which there exists an appropriate translator.

Compiler & Interpreter


These are the programs that execute instructions written in a high-level language.
There are two ways to run programs written in a high-level language. The most
common is to compile the program; the other method is to pass the program through
an interpreter.
a. Assembler:
This is the program that is used to converting assembly language into machine code.

b. Interpreter
An interpreter translates high-level instructions into an intermediate form, which it
then executes/ this is a program that read, translates and executes each statement
in HLL sequentially (statement by statement).

c. Compiler
A compiler is a special program that processes statements written in a particular
programming language called source code and converts them into machine language
30
or “machine code” that a computer’s processor uses at once. Compiler translates high
level language programs directly into machine language program. This process is
called compilation.

Comparison of compiler and interpreter


S/N Interpreter Compiler
1 Takes time for program to run Faster and easier to run
2 Easier to debug because error Harder to debug
messages are easier to trace
3 It is cheaper Expensive
4 Occupy less memory space Occupy more memory space

Operating System
An operating system is a software component of a computer system that is
responsible for the management of various activities of the computer and the
sharing of computer resources. An operating system enables user interaction with
computer systems by acting as an interface between users or application programs
and the computer hardware. Some of the common operating systems are LINUX,
Windows,etc.

Functions of Operating Systems


- Resource sharing
- Input and output handling
- Filing system
- Protection and error handling
- Program control
- Memory management.

Utility Program
This is also known as general purpose program because they are used for applications
in general.
Functions
- File copying
- File organization
- File maintenance
- Sorting
- Disc copying and formatting.

31
Loaders
Before an instruction is executed, it must have been placed in the primary memory
(RAM/ROM), it is the loaders that places segment into an appropriate location in the
memory
Editors
The primary function of editor is to convert input into a particular format of output
based on the editing commands.
Functions:
- Insert
- Delete and,
- Modify
Types of Editors
Text Editors Linkage Editors
This is closely associated with This is a piece of system software. It
application packages. It solves the works on object program during program
problem of “cut and paste”. Changing compilation, resolving undefined
data files and format of the data references, linking to get several object
programs.

Computer Security
Security has always been an overriding concern of human kind. For many
organizations, information plays a very important role in running business. Therefore,
it becomes necessary to safeguard information from reaching the illegal hands.
When data takes the shapes of digital form, a different security procedure is
required. This branch of security is called computer security.

Information technology has also some loopholes associated with it, like the
possibility of stealing of vital information and intentionally implanting destructive or
malicious programs on the other's computer system. The motive behind such
activities is to slow down the pace of an organization and harm it economically. We
shall discuss now about these malicious programs which are often called virus, worms,
Trojan horse, logic bomb, spyware and so on.

Virus: this is a set of program instructions that attaches itself to a file, reproduces
itself and spreads to other files. They can replicate themselves only on host
computer. They have the ability to lurk in a computer for days or months quietly
replicating themselves. When this replication takes place unknowingly, it is easily
infected files to other people’s computer.

32
There are types of computer virus
Time bomb- these are viruses that deliver their payloads on a specific date and at
a particular time. It will cause the computer to lose its functionality.
Worm: Worms are constructed to infiltrate on the legitimate data processing
programs and alter or destroy the data. Worm programs often use network
connections (such as holes in browsers, OS, e-mail attachment and so on) to spread
from one computer system to another system, thus, worms attach system that are
linked through communication lines.

Trojan horse: this is a computer program that masks itself, pretending to be


performing one function but actually doing something else. They do not spread like
worms; they are standalone programs that masquerade as useful utilities or
applications which victims downloaded and install unaware of their destructive
nature.

Spyware: this is a computer program the secretly gathers personal information


without the victims knowledge, usually for advertising and other commercial
purposes. Once installed, it starts monitoring web-surfing and purchasing behaviour,
and then sends a summary back to one or more third parties. Like Trojan, it can
monitor keystrokes and relay passwords and credit card information to
cybercriminals.

Preventive Measures against computer virus


✓ This can be achieved by installing antivirus software. Anti-virus software falls
into two categories: Scanners and Integrity checkers.
A scanner is a program that will detect the virus by checking the files on the disk,
the boot sector of the disk and programs in the memory by looking for the signature
of the virus. The signature is a piece of program code that is unique to the virus.
It is very necessary to update regularly the virus scanner that you have bought. This
is essential because new viruses are constantly appearing.
Integrity checkers work using simple checksums or complicated algorithms or
cryptographic checksums which check if a file has been modified.

✓ Also avoid opening suspicious e-mail attachments


✓ Avoid clicking pop-up ads-to make the ads go away, right click the ad’s taskbar
button and select the close option
✓ Avoid unsavory websites
✓ Obtain software only from reliable sources, and before running it use security
software to scan for malware.

33
Computer Network
This is a group of computers (nodes) that are connected together via a transmission
channels (links) to communicate and share resources such as files, printers, scanners
e.t.c. Network uses network media such as cables to carry network data, network
adapter hardware to translate data between the computer and the network media;
a network operating system to enable the computer to recognize the network and
the network protocol to control network communications.

Advantages of Computer Network


- To share hardware resources
- To share software resources
- For sharing of information
- To preserve or protect information
- To increase efficiency.

Disadvantages of computer network


- Security issues: This major drawback, if a computer is on the network, the
hackers can get unauthorized access by using varying tools. Therefore in a big
organization, it is advisable to use strong network security software to
prevent security issue.
- Rapid spread of virus: virus gets spread on a network easily because of the
connectivity of workstation. Such spread can be dangerous especially in a large
database.
- Expensive: It is very expensive to set up especially at the initial stage.

Classification of Network
Network is classified as follows:
i. According to geographical coverage
ii. According to functional relationship
iii. According to connection methods
iv. According to internetworks

A. According to Functional Relationship (Computer Architecture)


There are two major type of classification; peer-to-peer and client server.

Client/Server Model

34
In a client/server relationship, client computers request resources and information
from a central, usually more powerful, server computer.

Advantages of C/S
- Centralized so the resources and data securely are controlled through the server
- Scalability: any or all elements can be replaced individually as needs increase.
- Flexibility: now technology can be integrated into the system.
- Interoperability: all components work together in client/server.
- Accessibility: server can be access remotely across multiple platforms.

Disadvantages of C/S
- It is more expensive because it requires initial investment in the dedicated
server.
- Maintenance is very expensive because it requires good maintenance for efficient
operations.
- When the server goes down operations will cease on all networks.

Peer-to-Peer Network (P2P)


It is also known as workgroup or adhoc network. This is a network in which resource
sharing, processing and communication are decentralized. In P2P, computers share
resources and information equally. There are no powerful central computers
(servers) sharing information and resources.

Advantages of P2P Disadvantages of P2P


- They are inexpensive to set up - Only practical in small organization
- Easy to configure with fewer resources - There is no central repository for
files

Network software controls the traffic flow of data travelling through the network.

Stand alone computer is a personal computer not connected to any network.

Workstation is a personal computer connected to the network.

Network adapter (network interface card/NIC/Network card): serves as an


intermediary between the computer data low, and the network in order to connect
to the network.

35
B. According to Geographical coverage
Geographical classifications of networks are as follows
- Local-Area Network (LAN): A computer network that spans a relatively small
area. Most LANs are confined to a single building or group of buildings.
However, one LAN can be connected to other LANs over any distance via
telephone lines and radio waves. A system of LANs connected in this way is
called a wide-area network (WAN).
- Metropolitan Area Network (MAN): a data network designed for a town or
city. In terms of geographic breadth, MANs are larger than local-area
networks (LANs), but smaller than wide-area networks (WANs). MANs are
usually characterized by very high-speed connections using fiber optical cable
or other digital media.
- Wide-Area Network (WAN): A computer network that spans a relatively
large geographical area. Typically, a WAN consists of two or more local-area
networks (LANs). Computers connected to a wide-area network are often
connected through public networks, such as the telephone system. They can
also be connected through leased lines or satellites. The largest WAN in
existence is the Internet.
- Personal Area Network (PAN): A PAN is a network that is used for
communicating among computers and computer devices (including telephones)
in close proximity of around a few meters within a room. For examples,
scanner, printers, telephones and personal digital assistants.
- Campus Area Network (CAN): this is a network that connects two or more
lands but it is limited to a specific geographical area such as college, campus
and industrial complex.
- Global Area Network (GAN): this is a model or supporting mobile
communication across an arbitrary number of wireless L.A.Ns, satellite
coverage area and so on. The core challenges is handling user configuration
from one local government area to the other.

C. According to Connection Method


Computer networks can be classified according to the hardware technology that is
used to connect individual devices on the network –wireless and wired.
Wired used cable, fibre optics, twisted pair and coaxial cable.
Twisted pair is categorized into two: shielded twisted pair (STP) and unshielded
twisted pair (UTP). The advantage of STP over UTP is that STP has reduced
electromagnetic interference known as noise.

36
• Network Media: this is a highway or subway of a city allowing data to move
from one computer to another i.e. it is the path the signal travels from one
place to another
When choosing media type, the choice must be based on protocol, topology of the
network, distance, environment, security and speed

• Topology: The geometric arrangement of a computer system. Common topologies


include a bus, star, and ring. Hybrids of these are star bus & star ring.
• Protocol: The protocol defines a common set of rules and signals that computers
on the network use to communicate.
• Data transfer rate (DTR): this is the amount of digital data being transmitted
from one place to the other at a given time. It is also known as bandwidth. It is
expressed in bit per seconds (bps).

Types of Media
There are two types of network media, namely bounded and unbounded network
media.

Bounded Media (wired): they use physical conductor metal wire in which electricity
flows/ a glass or plastics strands through which pulses of light flows. For example:
twisted copper cable (UTP&STP), coaxial cable and fibre optic.

Unbounded Media (wireless): they use electromagnetic signals that are transmitted
through the air with radio, microwave and infrared radiations.

Some Definitions
• Signal: this is an electromagnetic communication that is being transmitted
across a network media.
• Noise: this is an electromagnetic interference that disrupts signals. It slows
a network performance and reduces its reliability.
• Attenuation: this is the degradation or reduction of signals as it travels
across the network medium. It is usually caused by the accumulation of noise
or fading strength of the signal.

D. According to Inter-Network Connection


This classification is into three:- internet, intranet and extranet

Internet: it is known as network of networks that consists of smaller, domestic,


academic, business and government networks, which together carry various

37
information and services such as electronic mail, online chat, file transfer and
interlinked web pages and other resources of the World Wide Web.

World Wide Web (WWW) is a graphical environment that allows the display of
texts and pictures on “your” screen/when browsing through the software called web
browser.
It operates on a technology of hypermedia that is the usage of hyperlink.

Hyperlink: this is a part of the text and graphics on the webpage that when clicked
on it takes you to a different page within the websites or another webpage.

The address of the website is usually given by URL (universal resource locator)

Intranet: an Intranet is a private network that is contained within an enterprise. It


is a private computer network that uses Internet protocols and network connectivity
to securely share part of an organization's information or operations with its
employees. Sometimes the term refers only to the most visible service, the internal
website.
The main purpose of an intranet is to share company information and computing
resources among employees.

Extranet: an extranet is a private network that uses Internet protocols, network


connectivity, and possibly the public telecommunication system to securely share
part of an organization's information or operations with suppliers, vendors, partners,
customers or other businesses.

An extranet can be viewed as part of a company's Intranet that is extended to users


outside the company (e.g.: normally over the Internet).

38
Introduction to Computer Programming

Basic steps in programming


• Understand the problem
• Analyze the problem
• Design the problem: this is done by use of an algorithm.
- Algorithm is a step by step method of solving a given problem at a given
time/a stepwise refinement of a solution to a problem. This is done using
flowchart or Pseudocode.
- Flowchart is the diagrammatic representation to a problem.
- Pseudocode is a way to design a solution to a problem in the computer
world or real world.
- Schema is a sketch used to guide people in solving a particular problem.
- HIPO- Hierarchical Input Processing Output is a design method in
which a solution to a problem can be derived.
• Coding-translate the steps of solving the problem to codes using specific
programming language.
• Testing-inputting data into the program whether it will get the desired
results.
• Debugging-correction of errors in the code. Bugs are errors to be removing
while running (compiling/interpreting) the codes. There are two types of
error-syntax and semantic error
- Syntax error: error that occurred when the rules of the language is not
followed.
- Semantic error: this is an error due to invalid program logic that
produces incorrect results when instructions are executed.
An expression is anything that evaluates into value. It combined both the operand
and operators. Operands are the values, while the operators trigger solutions to the
value.

Types of operators

Arithmetic operators such as addition, subtraction, division and multiplication

Relational operators such as < > == <= >=

Logical operators such as AND, OR, NOT, NOR and XOR

Assignment operator such as =

39
Characteristics of an Algorithm
- It must not be ambiguous
- It must be input and output specified
- It must be reliable
- Finiteness (can be determined)
- It must have high level of accuracy (precise)
- It must be efficient

Algorithm can be written using two ways: (1) using natural language like English,
French and (2) so on and using programming language.

Examples
1. Algorithm to find area of a circle: area = 𝜋𝑟 2 , data = PI, radius
Area can be represented in three ways
AREA = PIXRADIUSXRADIUS
AREA = PI X RADIUS^2
AREA = PIXRADIUS**2
1.0 START THE ALGORITHM
2.0 ENTER THE VALUE OF PI AND RADIUS
3.0 COMPUTE AREA = PIXRADIUSXRADIUS
4.0 DISPLAY AREA
5.0 STOP THE ALGORITHM

OR

1.0 START
2.0 INPUT RADIUS, PI
3.0 LET AREA= PIXRADIUS^2
4.0 OUTPUT AREA
5.0 STOP.
2. Write an algorithm that will compute the perimeter of a rectangle (P=2(L+B))
1.0 START
2.0 INPUT L,B
3.0 LET PERIMETER = 2X(L+B)
4.0 OUTPUT PERIMETER
5.0 STOP

40
FLOWCHART
This is the diagrammatic representation to a problem.
Description of the name and meaning of the flowchart symbol are presented in the
table below:

S/N FLOWCHART MEANING /FUNCTION

Terminal/Terminator/Start and End Symbol


1 (It marks the starting and ending point of a
program, and usually contains “Start” or
“End”)

Decision/Conditional Symbol (It indicates a


2
point where the outcome determines the
next step to take)

Document Symbol (It represents a step that


3
results in a document, or represents data
that can be read from the document)

Procedure/Subroutine Symbol (It is a


predefined process used to invoke a
4 subroutine or interrupt a program)

Direct Data symbol (It represents data


that is directly accessible such as data
5
stored on disk drive.

Arrow/Flow symbol (It is a connector that shows the


6 relationship between each step in writing a program)

Write an algorithm that will find the sum of even between 1 and 50

STEP 1: START THE ALGORITHM THAT WILL FIND AREA AND PERIMETER OF A
RECTANGLE

41
STEP 2: WRITE IN THE LENGTH OF THE RECTANGLE

STEP 3: WRITE IN THE BREADTH OF THE RECTANGLE

STEP 4: FIND THE AREA OF A RECTANGLE

STEP 5: FIND THE PERIMETER OF THE RECTANGLE

STEP 6: DISPLAY THE AREA OF THE RECTANGLE

STEP 7: DISPLAY THE VALUE OF THE PERIMETER

STEP 8: END THE ALGORITHM

Draw a flowchart that will find the sum and average of even numbers between 1 and 50

START
START

LET LENGHT = L

LET BREADTH= B

AREA =L XB

PER IMETER= 2L X2B

PRINT PERIMETER

PRINT AVERAGE

END

42

You might also like