0% found this document useful (0 votes)
107 views42 pages

Boolean Logic and Number Systems Explained

This document discusses Boolean logic and data representation in computers. It describes how Boolean logic uses operators like AND, OR and NOT to compare bits. It then explains how computers use binary and other numeric systems like octal and hexadecimal to represent data and instructions in a format it can understand.

Uploaded by

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

Boolean Logic and Number Systems Explained

This document discusses Boolean logic and data representation in computers. It describes how Boolean logic uses operators like AND, OR and NOT to compare bits. It then explains how computers use binary and other numeric systems like octal and hexadecimal to represent data and instructions in a format it can understand.

Uploaded by

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

Boolean logic

Developed by George Boole (1815-1864), and is used to refine the determination of system status
or to set or clear specific bits. Boolean logic is a way of comparing individual bits.
The operators used most often are AND, OR and NOT.

The AND operation says if and only if all inputs are on, the output will be on. The output will be
off if any of the inputs are off.

The OR operation says if any input is on, the output will be on. It's easy to see all of the
combinations by using what are called truth tables, illustrated below. At the bottom of each table
is shown the schematic symbol found in circuit diagrams.

OR (any high = high, else low)


Input 1 Input 2 Output
AND (all high = high, else low) 0 0 0
Input 1 Input 2 Output 0 1 1
0 0 0 1 0 1
0 1 0 1 1 1
1 0 0
1 1 1
Another one, the inverter or NOT operation, says that the output will be opposite in state to the
input. It has only one input and one output.

NOT (inverter)
Input = 1 Output = 0
Input = 0 Output = 1

DATA REPRESENTATION

Program instruction and data are made up of a combination of three types of characters.
Alphabetic (A - Z), Numeric (0 - 9) and special (all other characters E.G @, #, $). The data and
program instructions are being stored character by character. Each character in storage has got its
electrical representation which uniquely identifies it.

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.

The computer is unable to understand the supplied data represented by these symbols. To
make communication possible between a computer and man, data must be coded in a form
understandable to the computer and the information supplied by a computer, as a result of data
processing, must be decoded in the form understandable to the user. The responsibility of
coding and decoding in a computer system lies with the input-output devices.

Number Systems

A number system is a set of symbols or numbers combined with rules for how these numbers are
used. The various number systems are:
• Decimal number system
• Binary number system
• Octal number system
• Hexadecimal number system.
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.

In a decimal system each digit has a positional value determined by how many places to the left
or the right of the decimal point the digit is written.

103 102 101 100 •


10-1 10-2 10-3 10-4 . . . . . Power
4th 3rd 2nd 1st • 1
st
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 101 + 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.

. . . 23 22 21 20 Power
...4 3 2 1 Positional Value
...8 2 2 1 Value

That is why computer memory is incremented by powers of 2. Consider the RAM sizes 64k, 128k,
256k, 512k, 640k and so forth.

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 systems, the octal system (base 8) and the hexadecimal
system (base 16) – are used primarily because they make it convenient to abbreviate binary
numbers.
Octal System:
It uses 8 digits from 0 – 7. Because 8 is an integral power of 2 i.e. 810 = 2310, one octal digit has a
value equivalent to that of a group of three binary digits and vice versa. This relationship
simplifies the programming of digital computers, since the octal system may be used in place of
the more cumbersome binary system.

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 an integral power of 2 that is, 1610 , 2410 .
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

Conversions to Different Basis

1. Converting from Decimal to Binary, Octal, or Hexadecimal

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.

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

Then we discard the column with positional value 64 leaving:


Positional values: 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.

We divide 8 into 9 and observe that there is one 8 in 9 with a remainder of 1. The next two
columns each produce quotients of zero when their positional values are divided into 1 so we
write 0s in the 4 and 2 columns. Finally 1 into 1 is 1 so we write 1 in the 1 column.

This yields
Positional values: 32 16 8 4 2 1
Symbol values: 1 1 1 0 0 1

And thus decimal 57 is equivalent to binary 111001.

We could as well write 57 as a sum of the positional values.


That is 57 = 32 + 16 + 8 + 1

In the positional values, put a “1” whenever the sum of the given number falls and “0” elsewhere.

Method 2: Division Algorithm


Divide the given decimal number by two and at each stage write down the remainder on the side.

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

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

30
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

31
Read the remainder from bottom to top. Thus we have 5310 = 1101012

Example 3: Convert 4910 to base2:-

Solution:
Method 1:

249 Remainders
224 1
212 0
26 0
23 0
21 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 4910 = 1100012

CONVERSION OF FRACTIONAL PARTS

Consider the decimal number 0.375. We also have two methods to convert this to binary.
Method I
Write the positional values

32
Powers: 2-1 2-2 2-3
Positional Values: 0.5 0.25 0.125

Write 0.375 as a sum of the power of 2. 0.375 = 0.25 + 0.125 we put 1 where the sum fall and
0 elsewhere.

Thus we have

Positional values: •5 •25 •125

0 1 1

Therefore 0.37510 = 0.0112

Method 2: Multiplication Algorithm

33
•375

x 2

0 0.750

x 2

1 1 . 50

1. 1.0

Reading from top to bottom we have •011.

c) From Decimal to Octal

Consider the decimal number 103. To convert it to octal number system we can use any of the
methods discussed above for binary except that we shall have the base as 8.

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
34
Symbol Values: 1 4 7

And thus 10310 = 1478.

Method 2: Division Algorithm


We shall use this method with another number, then you can try it with the previous example.
Convert 695410 to base 8.

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

35
Convert 0.58910 to an octal number.

Solution:
We shall use the multiplication algorithm

0 . 589

x 8

4 4 . 712

x 8

5 5. 696

x 8

5 5 . 568

x 8

4 4 . 544

Thus 0.58910 = 0.45548

c) From Decimal to Hexadecimal

We can still use the two methods discussed above.

Example 1
Convert the decimal number 375 to hexadecimal.

36
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.

Powers: 163 162 161 160


Positional Values: 4096 256 16 1

We discard the column with the positional value 4096. Next we work from the left most column
to the 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:

37
Positional Values: 256 16 1
Symbol Values: 1 7 7

And thus decimal 375 is equivalent to hexadecimal 177.

Example 2:

Convert 482310 to base 10.

Solution
We shall use the division algorithm.

16 4823 Remainders
16 301 7
16 18 13 = D
16 1 2
16 0 1

Thus 482310 = 12 D716

Exercises:
1) Convert each of the following decimal numbers to their binary equivalent.

i) 54.375 ii) 127½

iii) 246.125 iv) 2¾

v) 11/8 vi) 5/16

2) Convert each of the following decimal fractions to a four-place octal fraction

i) 0.587
ii) 0.987
iii) 0.642
iv) 0.2017
v) 0.9716
38
Answer

(i) 0.45448 (ii) 0.77138 (iii) 0.51068 (iv) 0.14728 (v) 0.76148.

2. Converting from Binary, Octal, or Hexadecimal to Decimal

Because we are accustomed to working in decimal, it is often convenient to convert a binary, octal,
or hexadecimal number to decimal to get a sense of what the number is “really worth”. To convert

39
a number to decimal from another base, multiply the decimal equivalent of each digit by
its positional value, and sum these products.

a) Converting a Binary Number to Decimal

Examples:

(i) Convert 1101012 to base10

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

(ii) Convert 1100012 to

base10 Solution
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:

40
617328 = (6 x 84) + (1 x 83) + (7 x 82) + (3 x 81) + (2 x 80).

= (6 x 4096) + (1 x 512) + (7 x 64) + (3 x 8) + ( 2 x 1)

= 24,576 + 512 + 448 + 24 +2

=25,56210

ii) Convert the octal 7614 to decimal

7614 = (7 x 83) + (6 x 82) + (1 x 81) + (4 x 80)

41
= (7 x 512) + (6 x 64) + 8 + 4

= 358 4 + 384 + 8 + 4

= 398010

iii) Convert 0.45548 to a decimal fraction


When converting this, you must compensate for the expression of the negative powers.

To do this, simply ignore the negative power and treat the number as a whole number. Convert
the octal 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.

For this case the conversion factor is 84 = 409610


Since the LSD is at the 8-4 position.

Steps
Disregard the decimal point in 0.4554 and write the octal number as if it were a whole number

Set up the octal number for conversion to base 10.


45548 = (4 x 83) + (5 x 82) + ( 5 x 81) + (4 x 80)
= (4 x 512) + (5 x 64 + 40 + 4
= 241210.

Divide the product obtained above by the conversion factor you obtained earlier

2412 = 0.58888

4096

Thus the decimal equivalent of 0.45548 is 0.58888.

c) Converting a Hexadecimal Number to Decimal

Examples

42
(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

(ii) Convert C14A16 to base 10.

Solution
C14A16 = (12 x 163) + (1 x 1 62) + (4 x 161) + (10 x 160)
= (12 x 4096) + 256 + (4 x 16) + 10
= 4948210.

43
3. Converting Octal Numbers and Hexadecimal Numbers to Binary Numbers

a) From octal to binary


We convert each digit separately to 3 binary digits.

Examples

i) Convert 47328 to base 2.

Solution
4 7 3 2
100 111 011 010

Thus 47328 = 1001110110102

ii) Convert the octal number 653 to its binary equivalence.

Solution
Simply write 6, 5 and 3 in their three digit binary equivalent.

6 5 3
110 101 011

Thus 6538 = 1101010112.

b) From Hexadecimal to binary.


Convert each digit separately to 4 binary digits
Examples:

(i) Convert A146B16 to base 2.

Solution:
A 1 4 6 B
1010 0001 1100 0110 1011

44
Thus A 1 4 6 B16 = 1010 0001100011010112

(ii) Convert FAD5 to binary

Solution

FAD516 = 1111010110101012

(iii) Convert 3C8.9616 to its binary equivalent.


Solution:

3 C 8 . 9 6

0011 1100 1000 .1001 0010

Thus, 3C8. 9610 = 1111001000 .10010112

45
4) Converting from Binary to Octal and Hexadecimal

The main use for octal and hexadecimal numbers in computing is for abbreviating
lengthy binary representation.

(a) From Binary to Octal.


Group the binary digits 3 at a time starting from the right.

Examples:

(i) Convert 1111010010112 to base 8.

Solution:
111 101 001 011
7 5 1 3

Thus 1111010010112 = 75138

(ii) Convert 0.1001010101002 to base 8.

Solution:
Group the binary digits 3 at a time starting from the most significant digit (MSD)
to the right.

0. 100 101 101 100


0. 4 5 5 4

Thus 0.1001011011002 = 0.45548

b) From Binary to Hexadecimal


Divide the binary number into groups of four digits and assign the hexadecimal equivalent to
each group.

46
Examples:

(i) Convert 1111010010112 to base 16

Solution:
1111 0100 1011
F 4 B

Thus 1111010010112 = F4B16

(ii) Convert 111011 . 011012 to its hexadecimal

Solution:

0011 1011 . 0110 1000

3 B . 6 8

Thus 111011. 011012 = 3B.6816

47
5) Converting from octal to hexadecimal

Convert first to binary then to hexadecimal.

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

Thus 47328 = 9DA16

6) From Base 16 to Base 8.


Convert first to binary then to octal.
Example:
Convert A146B10 to base 8

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

Thus A146B16 = 24121538

Exercises
Note: The answers for these exercises are given beside the question and enclosed
in square brackets.

(i) Convert the following numbers to the indicated numbering system.

i) 1507.068 to binary [1101000111.0001102]


ii) 1101000111.0001102 to decimal [839 .0937510]
iii) 777. 778 to binary to decimal [111111111 .1111112 and 511. 984410 (rounded off)]
48
iv) 10111 .1011012 to decimal [23 .70312510]
v) 6366. 368 to decimal [3318. 4687510]
vi) 983. 983 to octal [1727. 76728]
v) 7106. 532 to binary [1101111000010. 1000100000112]

Bits
These are the on and off pulses or each 1 or 0 that represent the data.

A byte is a collection of 8 bits or a one character of data. Each storage position in memory is called
a byte. The size of memory of a computer is measured in thousands of bytes.

49
1,024 bytes = 1 kilobyte (1K) - usually rounded off to 1000 bytes.
1 000 Kilo bytes = I Megabytes (MB)
1 000 Megabytes = 1 Gigabytes (GB)

Representing Characters

Character representation refers to the way non-numeric data, such as a letter of the alphabet or a
punctuation mark is represented by a series of bits. Character representation code, simply
referred to as code is a series of bits that represents a letter, symbol or numerical.
The three character representation codes most widely used are ASCII, ANSI and EBCDIC. A
fourth code Unicode has been proposed for future world wide use.

ASCII - American standard code for information interchange code.


This coding system is used in many mini computers to represent 27 (=128) symbols including
uppercase and lowercase letters, special control codes, numerals and punctuation symbols. There
is one additional parity bit.

ANSI - American National Standards Institute Code


This code uses 8 bits to represent each character. They can convey up to 28 (= 256) units of
information so it can be used to code 256 letters and symbols. It is used in Microsoft windows to
store documents.

EBCDIC - Extended Binary Coded Decimal Interchange Code

This is an 8 -bit character representation code developed by IBM for its mainframe computers. It
does not use the same code as ASCII or ANSI for the initial 128 character.
Unicode: is a 16 -bit code that can represent 65000 different characters. It can represent
any character in every language used today.

40
Week 3 Students learning objectives

1. Differentiate between a LAN, WAN and MAN.


2. Define and classify computer networks.
3. Explain the concept of virtual machines as used in computing.
4. Outline advantages disadvantages of using virtual machines.
5. Explain how virtual machines are applied to business.
6. Explain how the internet works and outline its uses.
7. Differentiate between internet and the World Wide Web.

Topics
Y Computer Networks
Y System Software and Virtual Machines.

Y Computer Networks, the Internet, and the World Wide Web.

41
COMPUTER NETWORK

A computer network is a collection of computers and other devices that communicate to share
data, hardware and software.

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 organization and are private.

We can have two types of networks (configurations).

• Client/server network where we have one server and many clients.


• Peer-to-peer network – all computers have the same capability and can communicate
with each other.

Network Hardware for LAN


1. Network interface card (NIC)
This is the key hardware component for connecting a computer to a LAN. It is a small circuit board
designed to plug into an expansion slot on a computer main-board. The NIC sends data from your
workstation out over the network and collects incoming data for your workstation. Most recent
computers have them integrated onto the motherboard.

42
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.

43
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.

Non-dedicated server (peer-to-peer capability) here a network computer performs a dual role
as both file server and workstation.

4. Print server – stores files in a print queue and sends each queued file to the network printer.
A print job is a file that has been sent to the printer.

Application server is a computer that runs application software and forwards the results of
processing to workstations as requested. It makes it possible to use the processing power of both
the server and the workstation.

5. Modem - These are devices that modulate and demodulate data. Modulation is the process
of conversion of the computer data into analog signals before being transferred over a
standard telephone line.

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.

Software for Network


Network operating system
A network requires network software or network operating system to control the flow of data,
maintain security, and keep track of user accounts.

Examples:

Network Operating Systems such as Novell Network, Banyan lines, and LANtastic are software
packages designed to control data flow.

Network software is sometimes included as a component of popular computer Operating


systems such as windows for workgroup, windows 9x, UNIX, OS. A network OS has both the
server and client software.

44
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 permits use of application programs by multiple people on a network.

Network Topologies
This refers to how devices on LAN are connected to each other.

45
Bus-topology
Here the new nodes are easily added to a bus and all nodes may directly communicate with each
other, 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
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

46
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 with
every other node by sending messages to the hub.

47
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:

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.

48
COMPUTER VIRUSES

A computer virus is a program that has the ability to reproduce/replicate itself without the
user’s knowledge. For example, it may attach itself to the DOS program FORMAT and run every
time you format a diskette.
There are other types of software that can cause problems in a PC. However, no other software can
replicate and it is this characteristic that makes a program a virus.

Effects of Viruses:

• A virus can destroy/delete or corrupt data e.g. those on specific applications such as
all Excel files or all word files e.g. Sircam worm deletes data.
• Display irritating message, or otherwise disrupt computer operations. Most viruses stay
in your PC’s memory where they can cause problems by interfering with other software
you are trying to run.
• Disable hardware, making the computer unusable.

49
• It can perform dangerous operations like formatting the hard disk.
• It consumes the disk space, memory and wastes the processor time.
• Once you have a virus, it is very likely that you will pass it on to a colleague or a customer,
who may well lose confidence in you and your company.

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.

Boot Sector Viruses


These infect the system files your computer uses every time you turn it on. The boot sector is the
part of every hard disk and diskette, which is read by the computer every time you start it up. The
partition sector, also called the Master Boot Record (MBR), is the first part of the hard disk to be
read after the system has started up. It contains information such as the number of sectors in
each partition and the location of all the partitions.

If your booting disk is infected and you try to boot your computer with it then the following
message is likely to be displayed.

• Non-system disk or disk error


• Replace and press any key when ready.

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.

50
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.

Symptoms of the Viruses


The symptoms of a virus infection depend on the virus. The following symptoms might indicate
that your computer has contracted a virus. However, some of these symptoms can have other
causes.

51
• Your computer displays annoying messages such as “Gotcha! Arf Arf! “You are stoned”
• Your computer develops unusual visual or sound effects. For example, characters begin
to disappear from your screen or the sound of a flushing toilet comes for your computer’s
speakers.
• You have difficulty saving files.
• Your computer suddenly seems to work very slowly.
• Files are mysteriously missing.
• Your computer reboots unexpectedly.
• Your executable files unaccountably increases in size.

Viruses are just one type of program in a large category of software designed by hackers to disrupt
or damage the data on computers.

Other Potential Problems are: Trojan


Horse
A Trojan horse is a computer program that appears to perform one function 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.

Time Bombs and Logic Bombs


A time bomb is a computer program that stays in your system undetected until it is triggered by a
certain event in time, such as when a computer system clock reaches a certain date. It is usually
carried by a Trojan horse or a virus.

52
A notorious time bomb appeared in December 1989. Many hospitals and medical clinics received
in innocent looking package containing “ADS information” software from a company called PC
Cyborg. The process of installing the software also installed a time bomb. After the computer was
booted a certain number of times, the time bomb scrambled the data on the hard disk. Next, the
bomb displayed an invoice demanding payment before the method for unscrambling the hard disk
was revealed.

A logic bomb is a computer program that is triggered by a specific set of conditions, such as the
number of files in a disk, or a certain sequence of characters being entered. It can be carried by a
virus or a Trojan horse. But it could also be a stand alone program.

53
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 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.
Write-protect all boot diskettes. Viruses cannot infect manually protected diskette

54

You might also like