0% found this document useful (0 votes)
655 views47 pages

Chapter 01 Introduction To Computer Organization and Architecture

This document provides an introduction to computer organization and architecture. It discusses that computer scientists are concerned with algorithms, but the algorithms must run on hardware. It explains that understanding how computers work at the hardware level is important for optimization, system design, modeling systems, and more. The document defines computer architecture as the design of computers including instruction sets, while computer organization is the underlying implementation and physical aspects. It provides examples of how architecture can have different organizational implementations.

Uploaded by

Dann Laurte
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)
655 views47 pages

Chapter 01 Introduction To Computer Organization and Architecture

This document provides an introduction to computer organization and architecture. It discusses that computer scientists are concerned with algorithms, but the algorithms must run on hardware. It explains that understanding how computers work at the hardware level is important for optimization, system design, modeling systems, and more. The document defines computer architecture as the design of computers including instruction sets, while computer organization is the underlying implementation and physical aspects. It provides examples of how architecture can have different organizational implementations.

Uploaded by

Dann Laurte
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/ 47

INTRODUCTION TO

COMPUTER ORGANIZATION
AND ARCHITECTURE

SCHOOL OF COMPUTING MITCH M. ANDAYA


OVERVIEW
• Computer scientists are usually
more concerned with writing
complex program algorithms than
with designing computer hardware.

• However, if the algorithms are to be


useful, a computer eventually has
to run them.

• Some algorithms are so complicated


that they would take too long to run
on today's systems.

• These kinds of algorithms are


considered computationally
infeasible.

Computer Organization and Architecture


OVERVIEW

• At the current rate of


innovation, some things that
are infeasible today could be
feasible tomorrow.

• But no matter how big or fast


computers become, someone
will think up a problem that
will exceed the reasonable
limits of the machine.

Computer Organization and Architecture


OVERVIEW

• To understand why an
algorithm is infeasible, or
to understand why the
implementation of a
feasible algorithm is
running too slowly, a
programmer must be able
to see the program from
the computer's point of
view.

• In other words, the


programmer must
understand what makes a
computer system tick.
Computer Organization and Architecture
OVERVIEW

• Which is faster?

X = A + B + C + D;

OR

Temp1 = A + B;
Temp2 = C + D;
X = Temp1 + Temp2;
Computer Organization and Architecture
OVERVIEW

• Program optimization and


system tuning are perhaps the
most important motivations
for learning how computers
work.

• There are, however, many


other reasons.

1. Writing compilers require


a deep understanding of
the hardware
environment within which
the compiler will function.

Computer Organization and Architecture


OVERVIEW

2. To model large, complex,


real-world systems, a
programmer needs to
know how floating-point
arithmetic should work
as well as how it really
works in practice.
3. To design peripheral
equipment or the software
that drives peripheral
equipment, a programmer
must know every detail of
how a particular computer
deals with its input/output
(I/O).
Computer Organization and Architecture
OVERVIEW

4. To work with
embedded systems,
there is a need to know
that these systems are
usually resource-
constrained.

And a programmer's
understanding of time,
space, and price
tradeoffs, as well as I/O
architectures, will be An embedded system is a controller with a
essential. dedicated function within a larger
mechanical or electrical system, often with
real-time computing constraints.

Computer Organization and Architecture


COMPUTER ARCHITECTURE AND ORGANIZATION

• The preceding discussions illustrate


the idea that a fundamental
relationship exists between computer
hardware and many aspects of
programming and software
components in computer systems.

• Therefore, regardless of the area of


expertise of computer scientists, it is
imperative that each understands how
hardware interacts with software.

• There must be familiarity with how


various circuits and components fit
together to create working computer
systems.

Computer Organization and Architecture


COMPUTER ARCHITECTURE AND ORGANIZATION

• Computer Architecture
and Organization is the
study of the internal
working, structuring,
and implementation of a
computer system.

Computer Organization and Architecture


COMPUTER ARCHITECTURE AND ORGANIZATION

• Computer Architecture is
the design of computers,
including their instruction
sets, hardware
components, and system
organization. It is often
called Instruction Set
Architecture (ISA).

It refers to the
understanding of the
components that make
up the computer and the
way they are
interconnected.

Computer Organization and Architecture


COMPUTER ARCHITECTURE AND ORGANIZATION

More specifically,
computer architecture
refers to the attributes of
the system that are
visible to the
programmer – those
attributes that have a
direct impact on the
execution of a program.

– Instruction Sets
– Data Representation
– Addressing Modes
– I/O Mechanisms

Computer Organization and Architecture


COMPUTER ARCHITECTURE AND ORGANIZATION

• On the other hand, Computer


Organization is the underlying
implementation of the
architecture which is transparent
to the programmer. It
encompasses all physical aspects
of computer systems.

An architecture can have a


number of organizational
implementations:

– Control Signals
– Technologies
– Device Implementations

Computer Organization and Architecture


COMPUTER ARCHITECTURE AND ORGANIZATION

Organization

Architecture

Computer Organization and Architecture


COMPUTER ARCHITECTURE AND ORGANIZATION

• For example, both Intel and


AMD processors have the
same X86 architecture, but
how the two companies
implement that architecture
(their computer organizations)
is usually very different.

The same programs run


correctly on both, because the
architecture is the same, but
they may run at different
speeds, because the
organizations are different.

Computer Organization and Architecture


COMPUTER ARCHITECTURE AND ORGANIZATION

Computer Organization and Architecture


COMPUTER ARCHITECTURE AND ORGANIZATION

• Principle of Equivalence of Hardware and


Software:

Anything that can be done with software can


also be done with hardware, and anything
that can be done with hardware can also be
done with software.

This means that programmers have a choice. And


knowledge of computer organization and
architecture will help them make the best choice.

Computer Organization and Architecture


COMPUTER SYSTEM OPERATION BASICS

• The four basic components of a computer system:


the CPU, the primary memory, the secondary
memory and the different I/O devices.

Computer Organization and Architecture


COMPUTER SYSTEM OPERATION BASICS

Traditional
Computer

Computer Organization and Architecture


COMPUTER SYSTEM OPERATION BASICS
microcontroller

actuator
infrared
sensor

Embedded
Computer

Computer Organization and Architecture


COMPUTER SYSTEM OPERATION BASICS

• These components communicate with each other


through the interconnecting bus or system bus.

• A bus is a set of wires used to interconnect the


different components of the system.
Main or
Secondary I/O
CPU Primary
Memory Devices
Memory

Interconnecting Bus

Computer Organization and Architecture


COMPUTER SYSTEM OPERATION BASICS

Computer Organization and Architecture


COMPUTER SYSTEM OPERATION BASICS

• Since there is only a single bus used, only two components may
actively communicate with each other at any one time.

• For example, if the CPU is fetching data from the main memory, no
other component may transmit data to another component.

Main or
Secondary I/O
CPU Primary
Memory Devices
Memory

collision

Interconnecting Bus

Computer Organization and Architecture


THE CPU

• At the heart of any computer


is the Processing Unit.

• It is commonly called the


Central Processing Unit
(CPU) or Central Processor.

• The CPU is responsible for


executing the instructions of
a program and for
coordinating the activities of
the other system
components.

Computer Organization and Architecture


THE CPU

• The CPU is composed of


three elements:

1. The Arithmetic and


Logic Unit (ALU),

2. the Control Unit


(CU),

3. and its internal


Memory Unit (MU).

Computer Organization and Architecture


THE CPU

• The ALU is where all arithmetic


and logic operations and
manipulation of numbers take
place.

• The CU is the nerve center of a


computer.

It controls the entire activity of


the CPU. It controls and
coordinates the order and
execution of program
instructions.

It accesses instructions in
sequence, interprets them and
then directs their
implementation.

Computer Organization and Architecture


THE CPU

• The ALU and CU are usually


many times faster than
other devices connected to
a computer system.

This enables a single


processor to control a
number of external devices.

This is possible because the


vast difference in speed
enables the fast processor
to organize and control the
activity of many slower
devices.

Computer Organization and Architecture


THE CPU

• Whenever a user wants instruction


to execute a particular
program, the operating
system will:

1. first locate the


program and its data Secondary CPU
in secondary memory, Memory
(Fixed Disk)
2. copy them to main
memory,
3. and the CPU will then
fetch the instructions
(and the data) from Primary or Main Memory

main memory for


execution.

Computer Organization and Architecture


THE CPU

• To execute an instruction, the


CPU must do the following:

1. Fetch that instruction from


main memory.
2. Decode the instruction to
determine what must be
done and where the
operands or the data to be
processed are located.
3. Execute the instruction.

• This fetch-decode-execute
cycle is repeated for each
succeeding instruction.

Computer Organization and Architecture


THE CPU

• To execute an instruction, the


CPU must do the following:

1. Fetch that instruction from


main memory.
2. Decode the instruction to
determine what must be
done and where the
operands or the data to be
processed are located.
3. Execute the instruction.

• This fetch-decode-execute
cycle is repeated for each
succeeding instruction.

Computer Organization and Architecture


THE CPU

• Since main memory is


much slower as
compared to the CPU,
fetching instructions
and data from it slows
down the CPU.

Because of this, many


refer to the memory
as the bottleneck of
most computer
systems.

Computer Organization and Architecture


THE CPU

registers • In order to minimize


the effects of this, the
CPU places the
frequently used data
in its internal
registers.

Registers are the CPU's


built-in storage.

They are typically 10


to 100 times faster
than the main
memory.

Computer Organization and Architecture


THE PRIMARY MEMORY

• The primary memory, or


main memory as it is also
called, is where programs
and their data are stored
during execution.

Main memory is volatile


memory. So it loses its
contents when power is
turned off.

Therefore, it cannot be used


to store programs and data
permanently.

Computer Organization and Architecture


THE PRIMARY MEMORY

• The bits representing information


in the MM are often processed in
groups of fixed-sized units called
words.

A word is the natural unit of data


used by a particular processor
design. It is a fixed-sized piece of
data handled as a unit by the
instruction set or the hardware of
the processor.

The number of bits in a word is


the word length of the computer.

Typical word lengths range from 8


to 64 bits.

Computer Organization and Architecture


THE PRIMARY MEMORY
• To provide easy access to any word in MM, a distinct address is
associated with each word location. Addresses are numbers that
identify successive locations.

Memory Cell Address of the 1st


0 Memory Cell
1

each memory
cell usually
contains 8-bits
(1 byte) of data
4,294,967,294
4,294,967,295

Computer Organization and Architecture


THE PRIMARY MEMORY

• Main memory is often referred


to as random-access memory
(RAM).

RAM is a type of memory


wherein any memory location
can be accessed by the CPU in
the same amount of time.

In other words, RAM is memory


whose memory access time (the
time needed to read or write
data from or to main memory) is
fixed or constant, regardless of
the memory location being
accessed.

Computer Organization and Architecture


THE PRIMARY MEMORY

• It should be noted
that the
performance of a
computer system is
not only measured
in terms of the
speed of its CPU.

Since the CPU fetches its instructions and data


from main memory, the execution speed of
programs is also dependent on the speed with
which instructions and data can be transferred
between the CPU and the main memory.
Computer Organization and Architecture
THE SECONDARY MEMORY

• Secondary memory (also


called auxiliary memory)
is where all programs and
data are stored on a more
permanent basis.

• So whenever a user wants


to execute a particular
program, the operating
system will first locate the
program and its data in
secondary storage, copy
them to main memory,
and schedule the CPU to
execute it.

Computer Organization and Architecture


THE SECONDARY MEMORY

• Secondary memory is where all programs and data are


permanently stored since it does not lose its contents
whenever power is cut off (non-volatile).

• The other advantage of secondary memory is that they


are less expensive than main memory which is the
reason why the capacity of secondary memory is much
larger than main memory in all computer systems.

For example, the price of an 2 TB fixed disk is almost


the same as that of a 8 GB main memory stick (for PCs).

Computer Organization and Architecture


THE SECONDARY MEMORY
• The main disadvantage of secondary
memory is that it is much slower
than primary memory. There are
two reasons for this.

1. Most secondary memory has


mechanical or moving parts
(rotating disk platters and
moving read/write heads) while
main memory does not. In
other words, main memory
operates at electronic speed.

2. The main memory is the only


memory that can be directly
accessed by the CPU (without
passing through I/O channels).

Computer Organization and Architecture


THE SECONDARY MEMORY

• These are the reasons


why programs and
data should be stored
in main memory
during execution.

All other programs and


data are stored in
secondary storage
until they are needed
by the CPU and loaded
into memory.

Computer Organization and Architecture


I/O DEVICES

I/O devices comprise the


biggest part of any computer
system. They are also the
slowest components.

I/O devices are composed of


input devices (keyboard,
scanners, optical character
readers, mouse, trackballs,
joystick, game pads, etc.) and
output devices (printers,
monitors, speakers, etc.).

Some devices have both input


and output capabilities such as
touch-screen monitors.

Computer Organization and Architecture


VON NEUMANN ARCHITECTURE

• Most computers
follow the Von
Neumann
Architecture.

• It is also known as
the Stored Program
Architecture or the
Fetch-Decode-
Execute
Architecture.

Computer Organization and Architecture


VON NEUMANN ARCHITECTURE

• A computer follows the Von Neumann Architecture if it meets the


following criteria:

1. It has three basic hardware subsystems: a CPU, a main memory


system, and an I/O system.

2. It is a stored–program computer. Programs (together with


data) are stored in main memory during execution.

3. It carries out instructions sequentially following the fetch-


decode-execute cycle.

4. It has, or at least appears to have, a single path between the


main memory and the control unit of the CPU.

Computer Organization and Architecture


VON NEUMANN ARCHITECTURE

• Conventional stored-program computers have


undergone many incremental improvements over
the years.

• These improvements include adding specialized


buses, floating-point units, and cache memories, to
name only a few.

• But enormous improvements in computational


power require departure from the classic von
Neumann architecture.

Computer Organization and Architecture


VON NEUMANN ARCHITECTURE

• Adding processors is one approach.

‒ In the late 1960s, high-performance


computer systems were equipped with
dual processors to increase
computational throughput.

‒ In the 1970s, supercomputer systems


were introduced with 32 processors.

‒ Supercomputers with 1,000 processors


were built in the 1980s.

‒ In 1999, IBM announced its Blue Gene


system containing over 1 million
processors.

Computer Organization and Architecture


VON NEUMANN ARCHITECTURE

• Parallel processing is only one method


of providing increased computational
power.

• More radical systems have reinvented


the fundamental concepts of
computation.

• These advanced systems include


genetic computers, quantum
computers, and dataflow systems.

• At this point, it is unclear whether any


of these systems will provide the basis
for the next generation of computers.

Computer Organization and Architecture

You might also like