0% found this document useful (0 votes)
23 views24 pages

Chapter 2

Uploaded by

Isanka
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)
23 views24 pages

Chapter 2

Uploaded by

Isanka
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/ 24

2.

Explores the evolution of computers so as to be able to describe And


compare the performance of a modern computer

What is a computer?
A computer can be described as an electronic device, which accepts or collects data, processes them
according to the given instructions and produces the desired output.

Computer has become an essential device in our lives. Some of these features of a computer can be
described as follows;

2.1 Elicits the significant changes occurred in the computers from generation with more
emphasis on the evolution of processors.

History of Computing

(Adding Machine )

(1674)

Abacus
1
 A French Scientist named Joseph Jacquard invented a mechanical loom using Punch Card System to
ease weaving cloth in 1801. Joseph Jacquard was able to make various patterns on cloths by using the
cards with punch holes.
 An Englishman called Charles Babbage designed the first model required for a mechanical computer in
1822. It was called the ‘Difference Engine’

2
3
Classification of computers
There are several ways of classifying coputers
(i). According to size
(ii). According to technology used
(iii). According to purpose of use

Classification according to size

(i) Super Computers


These computers have higher computing power. They are
large in size, expensive and rare. These are used for scientific
and engineering functions and to solve complex
mathematical problems. For example, these computers are
used in institutes like NAZA, large scale businesses and for
military purposes.

(ii) Mainframe Computers


These have relatively less computing power and less expensive
than the super computers. In mainframe computers, a number of
users get connected to one computer using a number of terminals
sharing, saving and retrieving data. These are used in large scale
businesses and in e-business. This type of computers are used
even today in some large commercial institutions.

4
(iii) Mini Computers
These are slower, less powerful and less expensive than Mainframe computers and are also called common
purpose computers. These are easy to use. A few users get connected to the central computer here through
a few terminals to share data and information. Some banking systems use mini computers.

(iv) Personal Computers/ Micro Computers


This is a small computer meant
for personal use. This consists of a small
memory capacity, is smaller in size, is less
speedy and is less expensive. Further, this
consumes little electricity .

Examples for this category


 Desktop Computers
 Workstations
 Palmtop Computers
 Notebook Computers
 Personal Digital Assistant (PDA) or Digital Diary
 Pocket Computers

5
Classification according to technology
Computers can be classified according to the technology used. These are,
(I) Analog Computers
These computers use analog signals such as
environmental parameters (speed, pressure, and
temperature). Speedometers, road lamps with sensors,
meteorological machines can be given as examples.

(II) Digital Computers


The computers used in day-to-day life are called digital
computers. These computers use digital signals, using
electricity.

(III) Hybrid Computers


This is a combination of analog and digital computers. The ECG machine used in hospitals to check the
function of the heart is an example for hybrid computers. This machine identifies the function of the heart
beat which is an analog signal. Then it is converted to a digital signal and these converted signals are printed
by this machine.

(iii) Classification of Computers according to the Purpose

1. Computers designed for usual and day - to - day activities are called General Purpose Computers.

2. Computers designed for special purposes such as scientific experiments, battle operations, discovery of
oil rigs etc. are called Special Purpose Computers.

6
Computer Ports

7
Data Communication

8
9
10
11
(ii) Switch/Hub

Switch/Hub acts as the mediator to build a connection between two or more computers. (Figure 2.74) A
guided/wired transmission media is used. One end is connected to port in the computer and the other end is
connected to the port in the Switch / Hub.

12
13
Client/Server network

A server computer responds to the client


computer connected to the server. A network
operating system is installed to the server. The
one who requests data or information via
internet or from an area network is called a
client and the one who provides data and
information is called the server.

Types of Computer Network

(i) Local Area Network (LAN)


A LAN connects computers inside a room or several rooms in a
building. A computer network built in a school, university, a small
scale business or an office can be given as examples.

(ii) Metropolitan Area Network - (MAN)


MAN is a combination of several Local Area Networks which covers
less than 16 miles. Examples include banking networks, institutes and
universities with branches.

14
(iii) Wide Area Network - WAN
These networks cover a wide area. This can be within or outside a
country. The best example for WAN is the Internet.

Network Topology

Network topology is the pattern of connection in designing computer network. There are different types of
network topologies. Those are,

i) Star Topology
This is a commonly used design and built by centralizing a switch/hub and computers.

ii) Bus Topology


Here, all the connections are established through a main cable. This cable is called the backbone because
any issue with the network affects all the computers in the network. This design is easy in networking and
fewer cables are required. However, a limited number of computers can be connected.

ii) Ring Topology


Here, computers are positioned in a ring/bangle and connected through cables. Data or information move in
a circular manner. The breakdown of one computer or cable can lead to the breakdown of the
entire network.

iv) Tree Topology


Tree topology has characteristics of both bus and star topologies. In this design several star topologies are
connected to a bus backbone cable. One of the advantages of this is the ability to control each network
individually.

15
v) Mesh Topology
All the computers in the network are connected with each
other. Since this is a complex connection pattern, it is costly
and difficult to control. However, a breakdown of one
computer does not affect the connections in the network.
Mesh networking can be found on internet.

Benefits of Networking

16
Disadvantages of Networking

17
2.3 Explores the evolution of computer architectures.

Computer Architecture

18
Data and instructions fed to the computer via an input device are stored in the primary memory. The data
and instructions are used by the CPU for processing. The processed data are stored in the Primary Memory
as information and send to the output device. The data and information which is to be stored are send to
Secondary Storage device. The stored information can be sent an output device through Primary Memory.
Control Unit sends the control signals to all the devices attached to the computer system.

The flow of the data and instruction is indicated by a dotted line and the control signals are indicated by a
solid line in the diagram above.

Von Neumann Architecture


The first written description of how an electronic computer should store and processes information, Von
Neumann architecture was originally published in John Von Neumann’s report of the EDVAC on june 30,
1945. This architecture is comprised of an Arithmetic Logic Unit (ALU), Memory, Input/Output, and a control
unit. This design is still used, in one from or another, in all computers and electronic devices produced today.

Fetch Execute Cycle

An instruction cycle (sometimes called fetch-decode-execute cycle) is the basic operation cycle of a
computer. It is the process by which a computer retrieves a program instruction from its memory, determines
what actions the instruction requires, and carries out those actions.

First of all, both the data and the program that acts upon that data are loaded into main memory (RAM) by
the operating system. The CPU is now ready to do some work.

1. FETCH
The first step the CPU carries out is to fetch some data and
instructions (program) from main memory then store them in its
own internal temporary memory areas. These memory areas are
called 'registers'.
This is called the 'fetch' part of the cycle. For this to happen, the
CPU makes use of a vital hardware path called the 'address bus'.
The CPU places the address of the next item to be fetched on to
the address bus.
Data from this address then moves from main memory into the
CPU by travelling along another hardware path called the 'data
bus'.
You could imagine that it is a bit like a boat attendant at a lake calling in customers when their time is up --
"Boat number 3, time to come in!" The 'address' of the boat is 3 and the 'data' is its content. The boat is
parked at a pier, which is like the internal register of the CPU.

2. DECODE

The next step is for the CPU to make sense of the instruction it has just fetched. This process is called
'decode'. The CPU is designed to understand a specific set of commands. These are called the 'instruction
set' of the CPU. Each make of CPU has a different instruction set.

The CPU decodes the instruction and prepares various areas within the chip in readiness of the next step.

19
3. EXECUTE

This is the part of the cycle when data processing actually takes place. The instruction is carried out upon the
data (executed). The result of this processing is stored in yet another register.

Once the execute stage is complete, the CPU sets itself up to begin another cycle once more.

The Control Unit

In order to appreciate how the Fetch-Execute cycle works you need to have a basic understanding of the
three main parts of a CPU. These are the:

 Control Unit
 Immediate Access Store (IAS)
 Arithmetic and Logic Unit (ALU)

The Control Unit has three main jobs:

1. It controls and monitors the hardware attached to the system to make sure that the commands given
to it by the application software are used. For example, if you send something to print, the control
unit will keep a check that the instructions are sent to the printer correctly.
2. It controls the input and output of data so that the signals go to the right place at the right time
3. It controls the flow of data within the CPU - which is the Fetch-Execute cycle described above.

The Immediate Access Store

This holds the data and programs needed at that instant by the Control Unit. The CPU reads data and
programs kept on the backing storage and stores them temporarily in the IAS's memory.

The CPU needs to do this because Backing Storage (e.g. the hard disk) is much too slow to be able to run
applications directly.

For example, let's imagine that a modern CPU was slowed down to carry out one instruction per second. In
this scenario, the hard disk slowed down to an equivalent rate would take three months to supply the data
needed by the CPU!

So data and programs are first of all loaded into main memory then the CPU fetches just the part it
immediately needs and loads it into its own internal registers as part of the Fetch-Execute cycle.

The Arithmetic and Logic Unit (ALU)

This is where the computer processes data either by manipulating it or acting upon it. It consists of two
parts:

1. Arithmetic part - which does exactly what you think it should - it performs the calculations on the
data e.g. 3 + 2 = 5

20
2. Logic part - this deals with logic and comparisons. For example, it works out if one value is greater,
less than or equal to another.

Clock speed

Computers can only do one thing at a time. It may appear that many things are happening simultaneously,
for example you may be listening to music while writing an essay and also downloading some software in
the background.

In reality, the computer can only process one instruction at a time. It is just that the machine is so fast, to
you, everything seems to happen at once.

A CPU processes digital data by taking each piece of data one-at-a-time and doing something with it. The
amount of time that it has to process each piece of data is controlled by a quartz clock inside the CPU.

With every tick of the clock, the CPU is able to process one
piece of data or execute one instruction.

The CPU clock speed is measured in cycles per second. 1


cycle per second is also known as 1 Hertz

A computer running at 1GHz can carry out a thousand


million instructions per second.

The clock on a modern desktop computer runs extremely


quickly, typically three thousand million times a second (3 GHz).

It is hard to imagine just how fast this is, but it does mean that a CPU running at this clock speed can handle
a huge amount of data in a very short time. This is why you can listen to music on the computer while you
are also browsing the web and doing some work.

Naturally the speed of the clock determines the basic performance of the CPU - the faster it goes, the more
powerful the computer.

Number of cores

Now imagine that the clock cannot be sped up any more for technical reasons. How would you improve
performance?

A sensible way forward is to use two CPUs at the same time. The job in hand is shared between the two
CPUs.

In an ideal world, running two CPUs would give you twice the performance. In real life this is not quite the
case because many applications have not been written to take advantage of extra processors.

However, by having more than one processor, you would certainly see an improved performance.

A modern processing device may contain two or even four CPUs. Some chip-making companies call these
CPUs 'cores'. So a dual-core device means it contains two CPUs and a quad-core contains four.

The Cache

Most data is stored on the hard disk. When we use that data, it is loaded into Random Access Memory
(RAM) because it is much faster to access the data from RAM than from the hard disk.

21
When we looked at the 'immediate access store' earlier, we found out that the CPU needs to access data
very quickly. Although RAM is faster than the hard disk, it still isn't fast enough to cope with the speed that
the CPU needs to deal with data.

To appreciate this, image a race taking place between two


cars, one is a powerful high speed sports car and the other
is an ordinary little run-about. Their task is to race across
town but there are many traffic lights in the way. The start
flag goes down and the big car shoots off the line and the
little car just tootles along, well behind. Moments later, the
big car has to stop at a traffic light, so within a minute the
small car catches up once again. By the time the race is
over, the big car is hardly in front of the slow car because
of all the traffic light delays. This is exactly what happens in
a CPU. The processor may sit around idly waiting for new
data to arrive and so it appears less powerful than it really is.

The way around this, is to store as much data as possible, as close as possible to the CPU to avoid delays.
This nearby storage area is called the 'cache'.

The cache is a special type of computer memory which can be accessed much faster than RAM. The CPU
looks in the cache for the data it needs. If the data is there, it will retrieve it and process it. If the data is not
there, then the CPU accesses the system memory and then puts a copy of the new data in the cache before
processing it.

Cache memory is volatile i.e. when the computer is shutdown, the data stored there is lost.

Thus, in order to improve the computer's performance, it is important to keep the local cache full at all times
so that the CPU doesn't have to wait around with nothing to do.

The larger the cache size, the better the performance because you are able to store more data locally.

Instruction Set Architecture


The instruction set architecture (ISA) is part of a computer that pertains to programming, which is
basically machine language. The instruction set provides commands to the processor, to tell it what it needs
to do. The instruction set consists of addressing modes, instructions, native data types, registers, memory
architecture, interrupt, and exception handling, and external I/O.

An example of an instruction set is the x86 instruction set, which is common to find on computers today.
Different computer processors can use almost the same instruction set while still having very different
internal design. Both the Intel Pentium and AMD Athlon processors use nearly the same x86 instruction set.
An instruction set can be built into the hardware of the processor, or it can be emulated in software, using
an interpreter. The hardware design is more efficient and faster for running programs than the emulated
software version.

The ISA of a processor can be described using 5 catagories:

22
Operand Storage in the CPU
Where are the operands kept other than in memory?
Number of explicit named operands
How many operands are named in a typical instruction.
Operand location
Can any ALU instruction operand be located in memory? Or must all operands be kept internaly in
the CPU?
Operations
What operations are provided in the ISA.
Type and size of operands
What is the type and size of each operand and how is it specified?

Of all the above the most distinguishing factor is the first.

The 3 most common types of ISAs are:

1. Stack - The operands are implicitly on top of the stack.


2. Accumulator - One operand is implicitly the accumulator.
3. General Purpose Register (GPR) - All operands are explicitely mentioned, they are either registers or
memory locations.

Lets look at the assembly code of A = B + C;

in all 3 architectures:

Stack Accumulator GPR

PUSH A LOAD A LOAD R1,A

PUSH B ADD B ADD R1,B

ADD STORE C STORE R1,C

POP C - -

Not all processors can be neatly tagged into one of the above catagories. The i8086 has many instructions
that use implicit operands although it has a general register set. The i8051 is another example, it has 4 banks
of GPRs but most instructions must have the A register as one of its operands.
What are the advantages and disadvantages of each of these approachs?

Stack

Advantages: Simple Model of expression evaluation (reverse polish). Short instructions.


Disadvantages: A stack can't be randomly accessed This makes it hard to generate eficient code. The stack
itself is accessed every operation and becomes a bottleneck.

Accumulator

23
Advantages: Short instructions.
Disadvantages: The accumulator is only temporary storage so memory traffic is the highest for this
approach.

GPR

Advantages: Makes code generation easy. Data can be stored for long periods in registers.
Disadvantages: All operands must be named leading to longer instructions.

Earlier CPUs were of the first 2 types but in the last 15 years all CPUs made are GPR processors. The 2 major
reasons are that registers are faster than memory, the more data that can be kept internaly in the CPU the
faster the program wil run. The other reason is that registers are easier for a compiler to use.

CISC Architecture

Stands for "Complex Instruction Set Computing." This is a type of microprocessor design. The CISC
architecture contains a large set of computer instructions that range from very simple to very complex and
specialized. Though the design was intended to compute complex instructions in the most efficient way,

RISC Architecture

RISC (reduced instruction set computer) is a microprocessor that is designed to perform a smaller number of
types of computer instructions so that it can operate at a higher speed (perform more millions of
instructions per second, or MIPS). Since each instruction type that a computer must perform requires
additional transistors and circuitry, a larger list or set of computer instructions tends to make the
microprocessor more complicated and slower in operation.

24

You might also like