COE121 - Class - Notes - Lecture 1 and 2
COE121 - Class - Notes - Lecture 1 and 2
AND
APPLICATION
COE 121
1
DISCLAIMER
THIS DOCUMENT DOES NOT CLAIM ANY ORIGINALITY AND CANNOT BE
USED AS A SUBSTITUTE FOR PRESCRIBED COURSE TEXTBOOKS. THE
INFORMATION PRESENTED HERE IS A COLLECTION FROM VARIOUS SOURCES
THAT INCLUDES BOOKS AS WELL AS FREELY AVAILABLE INTERNET
MATERIAL.
2
COE 121 : INTRODUCTION TO COMPUTERS AND APPLICATIONS
OBJECTIVES
The main objective of the course is to prepare students to be able to relate the
use of computers and their respective courses as well as use them in their
day-to-day work (computer Literacy). During the course, the student will be
expected to develop knowledge of how the computer is organized to perform
its work and use the computer in running various basic applications.
This will be achieved through systematic instructional material and practical
assignments.
The student will be expected to take responsibility of the course and the
instructor will provide essential facilitation, guidance in undertaking the
course so as to achieve its objectives.
LEARNING RESOURCES
There are many learning materials that are available for this course. They
include books, and online materials, Help and support on all Windows
operating systems menu, articles and others. The student will be required to
do wide study on relevant and appropriate materials from the library or
online resources. Some resources that are recommended for this course that
will be found useful include:
Recommended Software.
4
INTRODUCTION TO COMPUTERS
Topics
What is a Computer?
It can also be defined as an electronic device that accept data and instructions,
stores them temporarily in its memory awaiting processing, automatically
executes/obeys the sets of the issued instructions to produce information from
the input raw data.
What is a System?
A system is the entire set of components, both computer related, and non-
computer related, that provides a service to a user. Or a system is a group of
related parts/components that work together as a unit to realize a common
goal/function.
What is Data?
Data is simply the basic facts or raw facts including numbers and words, given
to a computer during the input operation.
5
What is Information?
a) Business Applications
Computers are used to reduce inventory costs, analyse new markets, analyse
the performance of sales people, make sophisticated financial analysis,
determine production costs, forecast labour needs, and eliminate production
bottlenecks.
The typical business procedures that utilize computers include the following:
(i.) Accounts receivables: To maintain and process records on money
owed to a companyby customers or clients.
(ii.) Accounts payables: To maintain and process records on money
owed by the company to vendors.
(iii.) Payroll: To maintain employee payroll records and process payroll
checks.
(iv.) Inventory control: To maintain records on items or goods on hand,
on quantities ordered, and in general to maintain inventory files by
producing purchase orders on out-of –stock items, o determine
economic order quantities
(i) Banking.
Banks use computers to process the huge amount of checks and credit
cards transactions that take place daily.
The Automated teller machines allow the banking transactions to be
carried out day and night. The customer uses a plastic card and selects
the transactions by pressing a series ofbuttons.
Electronic Funds Transfer (EFT): This is the automatic recording of
account transactions and money transfers. However, no money actually
exchanges hands.
(ii) Retailing.
(iii) Manufacturing.
b) Office Automation
d) Healthcare
e) Sports
Used to analyse and design new plays, make draft picks, scheduling
competitors etc.
g) Education
Computer aided instructions (CAI) is used to help the students learn other
subjects. Multiple-choice questions appear on the screen for a student to
answer. If the student answers correctly, the computer responds
appropriately and asks another question. CAI helps in teaching all the
subjects.
In what has been called a “smart house”, computers are used to help
occupants live healthy and safe by performing many tasks automatically to
help manage the household. These may include waking them up in-case of
intruders coming.
Characteristics of Computers
The following are the features that make a computer a good tool for
information processing.
b) Speed: It works at a very high speed in taking in data and outputting the
information. Computers can process millions of instructions per second
10
Week 2: Learning objectives
1. Classify computers: by type of data accepted, by size, by purpose, by use and by computer
generations.
2. Define computer hardware and give examples.
3. Explain what each part of hardware does.
4. Define peripheral devices and give examples
5. Define computer input devices, give examples and explain their functions.
6. Explain the processing unit of the computer :- central processing unit,
7. Differentiate between the ALU, control and the internal Memory and what they do in a
computer.
8. Differentiate between ROM, RAM and cache types of memory.
Topics
Classification of computers
Computer hardware: - input devices, central processing unit,
storage devices and output devices.
TYPES OF COMPUTERS
a) Digital Computers
b) Analogue Computers
c) Hybrid
These are the computers that have the combined features of digital and
analogue computers. Both the digital and the analogue features are built
within the same processor.
2. Classification by Purpose
3. Classification by Size
a) Mainframe Computer
b) Mini – Computers
c) Micro – Computers
d) Super Computers
4. Classification by Use
5. Classification by Generation
The first electronic computers were made in 1940’s. Since then a series of
radical breakthroughs in electronics have occurred. The computer
generations are the stages in the evolution of electronic circuitry, hardware,
software, programming languages and other technological developments.
These include:
1) First Generation.(1940- 1956) – Vacuum Tubes
These computers used vacuum tubes as their electrical switching devices.
Their CPU speeds were very low. The input devices were paper tapes or
punched cards. Electronic typewriters, programmed to type by a paper tape
or punched card reader were used for printing reports. They had between
1K and 4K of RAM. The computers received its instructions in machine
language or electrical on/off signals. There were no programming
languages.
They utilized keyboards and video display monitors. The first light pen was
used as an input device for drawing on the face of the monitor. High-speed
printer came into use.
RAM grew from 4K to 32K, making it possible for the computer to hold more
data and instructions. Use of magnetic tapes and disks was introduced to
replace permanent storage on computer cards.
The IBM 1401 didn’t have an operating system; instead it used a special
language called Symbolic Programming System (SPS) to create programs.
This generation marked the common use of high- level languages.
FORTRAN (1957) was used for scientific purposes and COBOL (1961) for
business purposes. There were also improvements in system software.
Almost every computer had its unique operating system, programming
language and application software.
13
Started with the introduction of IBM 360 in about 1960s which used
integrated circuits (a number of electrical components on a single slice of
silicon) termed as hybrid integrated technology where separate transistors
and diodes were inserted into circuits.
Revision Questions:
14
COMPUTER ARCHITECTURE
SECONDARY MEMORY
OR
AUXILLIARY STORAGE
OUTPUT
INPUT MAIN DEVICES
DEVICES MEMORY
CONTROL Key:
Data Flow
ARITHMETIC /
LOGIC UNIT
Command
Flow
Peripheral Devices
These are equipment that are used with the computer but are not integral
part of it. They include printers, keyboards, monitors, mice, disk drives.
15
Input Devices
a) Keyboard
Users input data to a computer by pressing the keys on the keyboard. As the
user enters the data on the Keyboard it displays on the screen. It has several
keys such as:-
This is a small lightweight device that easily fits in the palm of your hand.
Software programs designed to use mouse display a mouse pointer on the
screen. The pointer may be an arrow, small rectangle, an I-beam or even a
hand with a pointed finger.
To move the pointer, you gently slide the mouse around the mouse pad.
Mouse has a language of its own.
E.g.
Point - to move a pointer o a desired spot. Click - press and release the
left hand button.
Double click - press and release button twice as quickly as possible.
Drag - press and hold the right mouse button while moving the pointer
to another location.
Drop - release the mouse button after dragging.
c) Trackball
d) Scanners
CPU Architecture
The CPU consists of one or more integrated circuits. In microcomputer the
CPU is a single integrated circuit called a micro-processor.
The CPU has two main parts; the arithmetic logic unit (ALU) and the control unit
(CU).
The ALU performs arithmetic operations such as addition, subtraction,
division and multiplication. It also performs logical operations such as
comparing two numbers. It uses registers to hold the data that is being
processed. In ALU, the results of an arithmetic or logical operation is held
temporarily in the accumulator.
The CU (Control Unit) - directs and coordinates processing and places it in
a special instruction register. The CU then interprets the instruction to find
out what needs to be done. According to its interpretation, the control unit
sends signals to the data bus to fetch data from RAM, and to the ALU to
perform a process.
CPU Performance
Clock rate
A computer contains a system clock that emits pulses to establish the timing
for all system operations. The “system clock” is not the same as “real-time
clock” that keeps track of the time of day.The system clock sets the speed for
data transport and instruction execution. The clock rate set by the system
clock determines the speed at which the computer can execute an instruction.
The time to complete an instruction circle is measured in megahertz (MHz).
Word Size
This refers to the number of bits the CPU can manipulate at a time. e.g.
CPU with 8 - bit word size is referred to as an 8 -bit processor.
Cache
This is a special high-speed memory that give the CPU more rapid access to
data. As you begin a task, the computer anticipates what data the CPU is
likely to need and loads or caches this data into the cache area. The CPU
then takes the data from cache instead of fetching it from RAM, which takes
longer. Therefore more cache means faster processing.
17
Instruction Set Complexity
Output Devices
Output is the data that has been processed into useful form/information that
can be used by a personor a machine.
Most outputs are in form of reports or graphics. The most used output
devices are printer and monitors
1. Printers
Types of Printers
3) Laser Printers
Limitations
Expensive colour
Cannot print multi-part forms
More expensive to operate
Others
4) Daisy wheel printers
5) Thermal printers
6) Chain printers
7) Band printers
It lets you see the information you are exchanging with the computer. They
can be either monochrome or colour. Monochrome display only two colours,
either black and white or green and black. The size is measured diagonally
(like TV) in inches e.g. 14”. Inside the monitor is a video display adapter,
which is an expansion card that translates the signal, processed by the CPU
into a format that the monitor can display.
3. Plotters
Used to produce high-quality line drawing, such as building plans, charts or
circuit diagrams. The two types are (a) pen plotters - create image on a sheet
of paper by moving the paper under the tip of pen (b) electrostatic plotters.
5. Voice Output
19
Consist of spoken words that are conveyed to the user from the computer.
The data that produces voice output is usually created in one of two ways:-
a) A person can talk into a device that will encode the words in digital
pattern. The digital data is then stored on a disk. It can later be
translated back from digital data into voice.
20
The System Unit
The system unit also known as a base unit, is the main body of a desktop
computer of the computer system.
Computer Storage/Memory
Primary Memory
This is an area in the computer system unit that temporarily holds data before
and after it is processed. For example, when you enter a document, the
characters you type usually are not processed right away. They are held in
RAM until you tell the software to carry out process such as printing.
RAM comes in the form of IC chips often called modules or sticks. They can
be plugged directly into the computer’s motherboard and hold the electronic
signals for the binary codes that represent the data. RAM is volatile i.e. if the
computer is turned off or the power goes out, all the data stored in RAM
instantly and permanently disappears.
The most common form of RAM is Dynamic Random Access Memory
(DRAM) which has many tiny capacitors and transistors which are paired to
create a memory cell. The capacitor holds the bit information in the form of
binary codes i.e. 0’s and 1’s. The transistor acts as a switch that lets the
control circuitry on the memory chip to read the capacitor and change its
state. The other type is static RAM (SRAM) which can only retain its
21
contents as long as electrical power is applied to the chip. If the power is
turned off or lost temporarily, its contents will be lost forever. DRAM, on the
other hand, has an extremely short data lifetime-typically about four
milliseconds. This is true even when power is applied constantly, DRAM
controller is to therefore used to periodically refresh the data stored in the
DRAM. By refreshing the data before it expires, the contents of memory can
be kept alive for as long as they are needed. So DRAM is as useful as SRAM
after all.
The contents of RAM are necessary for the computer to process any data.
The CPU receives instructions from RAM, uses the data in RAM for
processing and keeps the results of processing temporarily in RAM until they
are needed again or stored on disk.
RAM capacity
The storage capacity of RAM is measured in megabytes (MB) or
Gigabytes (GB). Most recent micro-computers have between 128 MB – 8
GB of RAM. The amount of RAM your computer needs depends on the
software you use.
Virtual Memory
When you turn on your computer, the CPU receives electrical power and is
ready to begin executing instructions. But because the computer was turned
on, RAM is empty with no instructions for CPU to process. This is when
22
ROM finds its use.
When you turn on your computer, the CPU performs a series of steps by
following instructions stored in ROM. This series of steps is called the boot
process.
Masked read- only - memory (MROM)- were hard-wired devices
that contained a pre-programmed set of data or instructions. These kind
of ROMs are known as masked ROMs and they are the cheap type of
ROM to manufacture.
Programmable read-only memory (PROM) - acts the same as ROM
when it is part of the computer. I.e. it can only be read but its contents
cannot be altered. However the data or programs are not stored in the
memory when they are manufactured. Instead it can be loaded with
special programs during installation.
Erasable Programmable read-only memory (EPROM) - their data
can be erased using special ultraviolet light device that destroys the bit
settings within the memory.
Electrically Erasable Programmable read-only memory
(EEPROM) - is programmed and erased electrically. It can be erased
and reprogrammed about ten thousand times. Both erasing and
programming take about 4 to 10 ms (milli second). In EEPROM, any
location can be selectively erased and programmed. EEPROMs can be
erased one byte at a time, rather than erasing the entire chip and is
programmed and erased electrically. It can be erased and
reprogrammed about ten thousand times. Both erasing and
programming take about 4 to 10 ms (milli second). In EEPROM, any
location can be selectively erased and programmed. Hence the process
is flexible but slow.
CMOS Memory
This is a type of memory which is more permanent than RAM but less
permanent than ROM which is used to store boot data such as the number
of hard disk tracks and sections. CMOS require very little power to retain
its contents and as such can be powered by a battery. To change CMOS
data, you usually run a CMOS configuration, or set up program during
booting.
Cache Memory
The speed of CPU is extremely high compared to the access time of main memory.
Therefore the performance of CPU decreases due to the slow speed of main memory.
Cache memory acts as a buffer between the CPU and main memory. It is used to hold
those parts of data and program which are most frequently used by CPU. The parts of
data and programs are transferred from disk to cache memory by operating system,
from where CPU can access them.
Advantages: Cache memory is faster than main memory, consumes less access time as
compared to main memory, stores program and data that can be executed within a
short period of time
Disadvantages : Cache memory has limited capacity and is very expensive.
23
Auxiliary/ Secondary Memory
Secondary memory is much larger in size than main memory but is slower. It
normally stores system programs, instruction and data files. It can also be
used as an overflow/virtual memory in case the main memory capacity has
been exceeded. Secondary memories can not be accessed directly by a
processor. First the data / information of secondary memory is transferred to
the main memory and then that information can be accessed by the CPU.
Characteristics :
Non-volatile memory - Data is not lost when power is cut off
Reusable - The data stays in the secondary storage on permanent basis until it
Cost - It is much lesser expensive to store data on a tape or disk than primary
memory
1) Hard Disk
This is where most of the computer data is stored especially the programs
and personal files. It consists of one or more rigid metal platters coated with
a metal oxide material that allows data to be magnetically recorded on the
surface of the platter.
2) Floppy Disks/Diskettes/Floppies/Disks
3) Magnetic Disk
This is used for medium and large computers. They are similar to the
devices used in PC’s but have larger capacities.
24
Week 3: Learning objectives
1. Define software, classify and give examples of each.
2. Understand the functions of an operating system.
3. Outline characteristics of an operating system.
4. Understand the concept of service/utility programs in computer systems.
5. Explain how computers store data in memory
6. Explain various data representation coding schemes:-
o Decimal – base 10
o Binary – Base 2
o Octal – base 8
7. Hexadecimal – Base 16Convert numbers from decimal to binary and binary to decimal
8. Convert numbers from decimal to octal and octal to decimal.
9. Convert numbers from octal to binary and binary to octal.
10. Perform binary arithmetic operations.
Topics
COMPUTER SOFTWARE
Definition:
Software refers to a group/set of instructions that enables the hardware to
function. It is the collection of computer programs, procedures and
documentation that performs different tasks on a computer system. It
actually tells the computer what to do and how to do it.
Software may be installed into the computer through any of following ways.
(i) It may be build into the computer circuit in the form of firmware.
(ii) It may be loaded into the computer from a secondary storage device such
as flash disk or hard disk drives
(iii) It can also be typed into the computer with the aid of the keyboard and
programming tools
Types of Software
Applications software
Systems software
25
Application Software
This is software that directs the computer to perform user specific task. It
performs a group of coordinated functions, tasks, or activities for the benefit
of the user. They can be categorised based on purpose as follows:
-There will be lots of user support i.e. books, user guides, online help and
discussion forums on the Internet
Examples:
Specific software are highly specialized software that are designed to handle
specific tasks. They're more limited in what they can do, but they usually
perform much better than a general purpose program in a specific task. For
example, TurboTax (a tax preparation package) is a special purpose
application. Sure, it adds and subtracts numbers like a spreadsheet, but you
can't use it to plan your monthly budget. It does only one thing - prepare tax
returns. Other examples of special purpose application software are web
browsers, calculators, media players, calendar programs etc.
Examples :
Multimedia Software: They allow users to create and play audio and video
files. They are capable of playing media files. Audio converters, audio
players, burners, video encoders and decoders are some forms of multimedia
software. Examples of this type of software include Real Player and
Windows Media Player
Bespoke Software
-
- the software will work exactly how they want it to wo
27
-the software will only have the features that they specifically need in their
business.
-it takes a long time to develop such a system, between a few months to years
System Software
These are the programs that monitor and control the operations of a
computer. They run the computer system by performing a variety of
fundamental tasks such as:-
BIOS-boots computer by checking all hardware (Power on self test-
POST) and loading of important OS files into main memory .
Performing operations such as retrieving, loading, executing and
storing application programs.
Storing and retrieving files.
Performing a variety of system utility functions.
Examples include; Operating system, Utility programs, Programming
software etc
What is BIOS?
BIOS stands for Basic Input/Output system which is small program that
comes pre-installed in the computer. It works together with Complementary
Metal-Oxide Semiconductor (CMOS) to handle a essential processes of
checking the computer hardware and booting.
Some of the major functions of BIOS are:
Operating System
Task Management: The function of the operating system that controls the
running of many tasks. It manages one program or many programs within a
computer system simultaneously. That is, this function of operating system
manages the completion of users' tasks. A task management program in an
operating system provides each task and interrupts the CPU operations to
manage tasks efficiently. Task management may involve a multitasking
Multiprogramming/Multitasking OS
Allow more than one program to be run at the same time. The CPU
switches back and forth between programs. E.g. the computer could be
performing a complex spreadsheet calculation at the same time downloading
29
a file from another computer while the user is writing a memo.
Multiprocessing
Computers that have more than one CPU are called multiprocessors. A
multiprocessing operating system co-ordinates the operating of
multiprocessor computer. They have an advantage that if one CPU fails,
work can be shifted to the remaining CPUs. The ability to continue
processing when a major component fails is called fault tolerance.
2) Minicomputer OS’s
e.g. - UNIX
- VMS for XAX (virtual address extension) computers
Utilities Software
Data Recovery: As the name implies, data recovery programs are used to
recover data. Since disk drives or other hardware may fail, these utilities are
essential to recover da
Data Compression programs: They make the data more compact, reducing
Programming Software
It is the type of software that is used for creating other software. Another
name for programming software is Integrated Development Environment
(IDE). An IDE normally consist of a source code editor, a translator
(compiler or interpreter) and a debugger. - Editor: It is a programming tool
that is used for creating and modifying application programs. It helps the
computer user to enter, search, delete, replace, copy and insert text or
sections of a text in a desired position.
Translators
These are the software that converts the source code/programs to their
object code/programequivalence.
Types of translators
Device drivers
Device drivers are computer programs that allow higher level computer
programs to communicate and interact with a hardware device. All hardware
devices have the devices drivers that communicate with them through the
computer bus to which the hardware is connected. Drivers are hardware
31
dependent and operating system specific. Some specific categories of device
drivers are Logical Device Drivers (LDD) which are written by the
Operating System vendors Physical Device Drivers (PDD) which are written
and implemented by the hardware vendor. To solve device driver crises,
Microsoft has created the Windows Drivers Foundation (WDF) which
collects and keeps all device drivers as a database
Questions
DATA REPRESENTATION
All digital computers use some variation of binary numbering system for
representation of characters. The binary numbering system has only two
digits 0 and 1. 1 denotes the presence of electrical pulse and 0 denotes the
absence of such a signal.
Number Systems
Decimal System
This consists of ten digits 0 –9. Each digit has a digit value 0 to 9. Because
the decimal system is used almost universally, basic arithmetic performed by
a person in one country is easily understood by a person in another country.
103 102 101 100 10-1 10-2 10-3 10-4 ............. Power
4th 3rd 2nd 1st 1st 2nd 3rd 4th .............. Position
1000 100 10 1 0.1 0.01 0.001 0.0001 ........ Value
Since the positional increment is a power of 10, the value 10 is known as the
base or radix of the number.
For example
632.85 = 6 x 102 + 3 x 101 + 2 x 100 + 8 x 10-1 + 5 x 10-2
= 600 + 30 + 2 + 0.8 + 0.05
Binary System:
This is a base two number system since it uses only two digits 0 and 1
called the binary digits. Its lowest digit is 0 and the highest digit is 1 – one
less than the base of 2. Internally, the computer uses binary number system
since the two digits 1 and 0 represent the two electrical states, on and off.
In binary number system, each of the position is a power of the base (2) and
these powers begin at 0 and increases by 1 as we move left in the number.
. . . 22 21 20 Power
23
...4 3 2 1 Positional Value
...8 2 2 1 Value
Machine language uses binary number system to provide instructions for the
CPU. It is the most basic language for the computer. It requires no
translation to be understood. Binary numbers tend to be much longer than
their decimal equivalents.
Programmers, who work in assembly language and in high-level languages
that enable programmes to reach down to the machine level, find it
cumbersome to work with binary numbers. For this reason, two other
33 and the hexadecimal system (base 16) –
systems, the octal system (base 8)
are used primarily because they make it convenient to abbreviate binary
numbers.
Octal System:
34
Week 4: Learning objectives
1. Convert decimal numbers to hexadecimal and hexadecimal to decimal.
2. Convert binary numbers to hexadecimal and hexadecimal to binary.
3. Understand the concept of an operating system.
4. Give the functions of an operating system
5. Name examples of operating systems and their evolution.
6. Explain the concept of data communications and computer networks.
7. Identify and explain various model of computer networks
8. Identify and advantages and disadvantages of various network structures.
9. Define a computer virus and give examples.
10. Explain the sources and spread of computer viruses.
11. Explain the effects and control of computer viruses.
Topics
Data representation:- hexadecimal,
Introduction to operating systems, types, functions of OS.
Basic computer data communications and networks.
Computer viruses, spread, effects and control.
Hexadecimal Systems:
This is a base 16 number system that uses 16 symbols; the digits 0 to 9, then
the letters A to F to represent the numbers 10 to 15. The number 16 is also 10
an integral power of 2 that is, 1610 , 24 . Thus, one hexadecimal digit has a
value equivalent to that of a group of four binary digits and vice versa.
Counting in Hexadecimal is thus as:-
Decimal 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
Hexadecimal 0 1 2 3 4 5 6 7 8 9 A B C D E F
a) Decimal to Binary
Suppose we want to convert the decimal number 57 to its binary
equivalent. There are two methods that we can follow.
35
Method 1:
Begin by writing the positional values of the columns right to left until we
reach a column whose positional value is greater than the decimal number.
Powers: 26 25 24 23 22 21 20
Positional values: 64 32 16 8 4 2 1
Next we work from the left most column to the right. We divide 32 into 57
and observe that there is one 32 in 57 with a remainder of 25, so we write 1
in the 32 column. We divide 16 into 25 and observe that there is one 16 in
25 with a remainder of 9 and write 1 in the 16 column.
This yields
Positional values: 32 16 8 4 2 1
Symbol values: 1 1 1 0 0 1
In the positional values, put a “1” whenever the sum of the given number falls and
“0” elsewhere.
2 57 Remainders
2 28 1
2 14 0
2 7 0
2 3 1
2 1 1
0 1
Read the remainders from bottom to top. We thus have 5710 = 1110012
36
Example 2: Convert 5310 to its binary equivalence:-
Solution
Method 1
Write 53 as a sum of powers of 2.
That is 53 = 25 + 24 + 22 + 20 = 32 + 16 + 4 + 1
Construct a table for the positional values of a binary number system. We have
.... 26 25 24 23 22 21 20
.... 64 32 16 8 4 2 1
Put a “1” under the positional values whenever the sum of the given
number falls and “0” elsewhere. Thus we put a “1” under 32, 16, 4 and 1
and “0” otherwise. We therefore have.
25 24 23 22 21 20
32 16 8 4 2 1
1 1 0 1 0 1
Start reading the binary numbers from left to right. Therefore we have 5310 =
1101012
Division algorithm:- Divide the given decimal number by two and at each
stage writing down the remainder on the side.
2 53 Remainders
2 26 1
2 13 0
2 6 1
2 3 0
2 1 1
0 1
Read the remainder from bottom to top. Thus we have 5310 = 1101012
2 49 Remainders
2 24 1
2 12 0
2 6 0
2 3 0
37
12 1
0 1
Read the remainder from bottom to top. Therefore 4910 = 1100012
Method 2
49 = 22 + 24 + 20 = 32 + 16 + 1
Thus we have.
25 24 23 22 21 20
32 16 8 4 2 1
1 1 0 0 0 1
Thus we have
Positional values: 5 25 125
0 1 1
375
x 2
0
0.
750
x 2
1 1
. 50
2
1. 1.0
Method 1
Write the positional values of the columns until we reach a column whose
positional value is greater than the decimal number. We do not need that
column so we discard it.
Powers 82 81 80
Positional Values 64 8 1
Next work from the left most column to the right. We divide 64 into 103 and
observe that there is one 64 in 103 with a remainder of 39, so we write 1 in
the 64 column.
We divide 8 into 39 and observe that there are four 8s in 39 with a remainder
of 7 and write 4 in the 8 column. Finally we divide 1 into 7 and observe that
there are seven 1s in 7 with no remainder so we write 7 in the 1 column. This
yields
Positional Values: 64 8 1
Symbol Values: 1 4 7
8 6954 Remainders
8 869 2
8 108 5
8 13 4
8 3 5
8 1 1
Read the remainder from bottom to top. Thus 695410 = 154528.
Fractional Parts
Convert 0.58910 to an octal number.
Solution:
We shall use the multiplication algorithm
0 . 589
x 8
4 4 . 712 39
x 8
5 5. 696
x 8
5 5 . 568
x 8
4 4 . 544
Example 1
Convert the decimal number 375 to hexadecimal.
Solution:
Write the positional values of the columns until we reach a column whose
positional value is greater than the decimal number. We do not need that
column so we discard it. Thus, we first write.
We discard the column with the positional value 4096. Next we work from
the left most column tothe right. We divide 256 into 375 and observes that
there is one 256 in 375 with a remainder of 119, so we write 1 in the 256
column.
We divide 16 into 119 and observe that there are seven 165 in 119 with a
remainder of 7 and write 7 in the 16 column.
Finally, we divide 1 into 7 and observe that there are seven 1s in 7 with no
remainder so we write 7 in the 1 column. This yields:
Example 2:
Convert 482310 to base 10.
Solution
We shall use the division algorithm.
16 4823 Remainders
40
16 301 7
16 18 13 = D
16 1 2
16 0 1
Exercises:
1) Convert each of the following decimal numbers to their binary equivalent.
Answer
(i) 0.45448 (ii) 0.77138 (iii) 0.51068 (iv) 0.14728 (v) 0.76148.
a) Converting a Binary
Number to Decimal
Examples:
Solution
110101 2 = (1 x 25) + (1 x 24) + (0 x 23) + (1 x 22 ) + (0 x 21) x (1 x 100)
= 32 + 16 + 0 + 4 + 0 + 1
= 5310
Solution
41
1100012 =(1 x 25) + (1 x 24) + (0 x 23) + (0 x 22) + (0 x 21) +(1 x 20)
= 32 + 16 + 0 + 0 + 0 + 1
= 4910
Other examples
Binary Decimal
0 0
1 1
10 2
11 3
100 4
101 5
b) Converting an Octal
Number to Decimal
Examples:
1) Convert 617328 to base 10.
Solution:
617328 = (6 x 84) + (1 x 83) + (7 x 82) + (3 x 81) + (2 x 80).
To do this, simply ignore the negative power and treat the number as a
whole number. Convert theoctal fraction to a decimal fraction using the
same procedure as before. Once the number is converted, divide it by the
conversion factor. The conversion factor is equal to the positive power of
the radix at whose position the fractional least significant digit (LSP),
appears.
Divide the product obtained above by the conversion factor you obtained earlier
2412 = 0.58888
4096
c) Converting a Hexadecimal
Number to Decimal
Examples
(i) Convert the hexadecimal AD3B to decimal
Solution
AD3B = (A x 163) + (D x 162) + (3 x 161) + (B x 160)
= (10 x 4096) + B x 256) + (3 x 16) + (11 x 1)
= 40960 + 3328 + 48 + 11
= 4434710
Solution
C14A16 = (12 x 163) + (1 x 1 62) + (4 x 161) + (10 x 160)
= (12 x 4096) + 256 + (4 x 16) + 10
= 4948210.
Examples
i) Convert 47328 to base 2.
Solution
4 7 3 2
100 111 011 010
6 5 3
110 101 011
Solution:
A 1 4 6 B
1010 0001 1100 0110 1011
Solution
FAD516 = 1111010110101012
(iii) Convert 3C8.9616 to its binary equivalent.
Solution:
3 C 8 . 9 6
0011 1100 1000 .1001 0010
Examples:
(i) Convert 1111010010112 to base 8.
Solution
:
111 10 001 011
1
7 5 1 3
44
Thus 1111010010112 = 75138
Solution:
Group the binary digits 3 at a time starting from the most
significant digit (MSD) to the right.
Examples:
(i) Convert 1111010010112 to base 16
Solution:
1111 0100 1011
F 4 B
Solution:
0011 1011 . 0110 1000
3 B . 6 8
Example:
Convert 47328 to base16
4 7 3 2 …… Base 8
100 111 011 010 …… Base 2 in groups of
3.
1001 1101 1010 …… Base 2 in groups of 4
9 D A ……. Base 16
Solution:
A 1 4 6 B ........................................ Base 16
1010 0001 0100 0110 1011 …….. Base 2
010 100 001 010 001 101 011 …….. Base 2 in groups of
3
2 4 1 2 1 5 3 …….. Base 8
Exercises
Note: The answers for these exercises are given beside the
question and enclosed in square brackets.
Bits
These are the on and off pulses or each 1 or 0 that represent the data.
Representing Characters
COMPUTER NETWORK
LAN
A local area network (LAN) is a computer network covering a local area, like
a home, office or small group of buildings such as a college. LANs are
distinguished from other kinds of networks by three characteristics: (1) their
size, (2) their transmission technology, and (3) their topology.
MAN
Metropolitan Area Networks or MANs are large computer networks usually
spanning a campus or a city. They typically use wireless infrastructure or
optical fiber connections to link their sites.
For instance a university may have a MAN that joins together many of their
campus local area networks (LANs) around a city.
WAN
A wide area network or WAN is a computer network covering a wide
geographical area, involving a vast array of computers. The best example of a
WAN is the Internet. WANs are used to connect local area networks (LANs)
together, so that users and computers in one location can communicate with
users and computers in other locations. Many WANs are built for one
particular organizationand are private.
2. Connecting cables:-
The cables commonly used for interconnecting PCs are the twisted pair
copper wires, either Category 5 (CAT 5) or Category 6 (CAT 6) cables. Or
fiber optic conections.
Instead of using cables, some wireless networks use radio or infrared signals
to transmit data from one network device to another. The NIC on a wireless
network contain the transmitting device necessary to send data to other
devices on the LAN.
3. Network Servers
These are different kinds of network servers.
A dedicated file server is devoted only to the task of delivering programs and
data files to workstations. It does not process data or run programs for the
Workstations. Instead programs run using the memory and processor of the
workstation.
4. Print server – stores files in a print queue and sends each queued file to
the network printer. Aprint job is a file that has been sent to the printer.
Demodulation refers to converting back the data to digital form. The quality
of a modem is determined by its transmission speed. It can be either internal
or external.
Examples:
Network Operating Systems such as Novell Network, Banyan lines, and
LANtastic are software packages designed to control data flow.
Standalone Applications
Most applications designed for standalone computers can be installed on a
network server, which sends them to individual workstations as requested.
GroupWare
A workgroup is basically two or more people who work on the same project.
GroupWare is application software that support collaborative work, usually
on a LAN.
Network Topologies
Bus-topology
Here the new nodes are easily added to a bus and all nodes may directly
communicate with eachother, we use the coaxial cable to connect the
workstations:
PC PC PC PC
Advantages
Easy to implement and extend
Well suited for temporary networks (quick setup)
Typically the cheapest topology to implement
Failure of one station does not affect others
Disadvantages
Difficult to administer/troubleshoot
Limited cable length and number of stations
A cable break can disable the entire network
Maintenance costs may be higher in the long run
Performance degrades as additional computers are added
Ring topology 49
Here every node is connected to two other nodes. Movement of data on the
ring is normally in one direction to prevent signals from interfering with each
other.
PC
PC PC
PC
Advantages
Growth of the system has minimal impact on performance
All stations have equal access
Each node on the ring acts as a repeater, allowing ring networks to
span greater distances than other physical topologies.
Because data travels in one direction high speeds of transmission of data are
possible
Disadvantages
Often the most expensive topology
Failure of one computer may impact others
Star topology
Here all the messages pass through a central switch/hub. It allows any node
to communicate withevery other node by sending messages to the hub.
HUB
PC PC PC
Advantages
Easy to implement and extend, even in large networks
Well suited for temporary networks (quick setup)
The failure of a non central node will not have major effects on the functionality
of the network.
Disadvantages
Limited cable length and number of stations
Maintenance costs may be higher in the long run
Failure of the central node can disable the entire network.
Network Protocols:
A communication protocols is a set of rules that ensures the orderly and
accurate transmission and reception of data. The most widely used network
communications protocol are:
50
TCP/IP (Transmission control protocol/Internet protocol) which is used on
minicomputer, micro computer and mainframe networks. It is frequently
used in UNIX and Win. NT systems and is the basis for a communication on
the network.
IPx (Internet-work packet exchange) is the protocol used by Novell NetWare, the
most popular microcomputer network software.
COMPUTER VIRUSES
Effects of Viruses
Types of Viruses
File viruses:
A file virus infects the executable program files on your computer system.
These usually, but not always, have COM or EXE file extensions. When you
run an infected program, your computer also runs the attached virus
instructions to replicate or to deliver its payload. The term payload refers to
the ultimate mission of a virus. For example, the payload of the “stoned”
virus is the message,” your Pc is now stoned”.
Only a few viruses such as Cinderella and Frodo, are designed to infect data
files. Because a virus needs to be executed to spread, a data file can only be a
carrier, it cannot deliver the payload.
If your booting disk is infected and you try to boot your computer with it
then the following message is likely to be displayed.
By this time the virus has already run and your PC may already be infected.
In most cases, the virus loads itself into memory and infects the partition
sector of the hard disk. It replaces the original partition sector with its own
code. If this partition sector is infected, when the PC is rebooted from the
hard disk, the virus is loaded into memory. Any diskette subsequently
accessed is infected.
Companion Viruses
If you have a COM file and an EXE file of the same name, Dos always runs
the COM file in preference to the EXE file is not file extension is given.
Companion viruses make use of this fact by creating COM files
with the same name as the legitimate EXE files, thus ensuring they are
executed. They then pass control to the original EXE file which runs
normally.
Trojan Horse
A Trojan horse is a computer program that appears to perform one function
52
while actually doing something else. They are less widespread than viruses
because they do not replicate, but they can represent a threat when copied. A
Trojan horse sometimes, but not always, harbors a virus.
For example, a hacker may write a program to format hard disk drives and
embeds this program in a file called sched.exe. He then distributes the disk
containing this Trojan and posts it to computer bulletin boards where other
users are likely to assume that it is a free scheduling program, just to realize
that it has deleted all the files upon execution. This Trojan horse does not
harbor a virus because it does not replicate itself.
Another popular Trojan horse looks like the login screen on a network.
However, as a user logs in, the Trojan horse collects the user’s ID and
password. These are stored in a file that hackers can access later. Armed
with a valid user ID and password, the hackers can access the data stored on
the network.
Worms
A software worm is a program designed to enter a computer system –
usually a network through security holes. Like a virus, a worm reproduces
itself. Unlike a virus, a worm does not need to be attached to an executables
program to reproduce. These security holes may be electronic mail system.
Spread
Through data transfer; either through auxiliary storage devices, or
from one computer to the other through networking. It is spread when
an infected program is executed or the computer is booted from
infected diskette. Through electronic communication devices/times
as attached to emails.
Control/Avoidance and Detection
Avoid using high-risk disks programs e.g. disks containing public
53
domain software or shareware and on disks containing illegal copies
of computer programs downloaded form bulletin boards. You must
use a virus detection program to check for viruses before you run any
programs from such disks.
Use of virus detection program/anti-virus programs which
examines the files stored on a disk to determine if they are
infected with a virus, then disinfects the disk, if necessary.
Backups – make regular backups of your system.
54