Module 1
Module 1
Module 1
and Organization
Module:1 Introduction To Computer Architecture and Organization
Computer Organization and Architecture is the study of internal working, structuring, and
implementation of a computer system. Architecture in the computer system, same as
anywhere else, refers to the externally visual attributes of the system
Computer Architecture & Organization
The internal logic design of the system is known as architecture. It determines the various
operations performed by the system.
Computer architecture is a set of rules stating how computer software and hardware are
joined together and interact to make a computer work.
Computer organization refers to the operational units and their interconnections that realize
the architectural specification.
To perform simple or complex tasks, a computer needs essential functional components which are
called as the building blocks of computer.
Functional components of a computer
Input unit accepts Arithmetic and logic unit(ALU):
information: •Performs the desired
•Human operators, operations on the input
•Electromechanical devices (keyboard) information as determined
•Other computers by instructions in the memory
Memory
Arithmetic
Input
Instr1 & Logic
Instr2
Instr3
Data1
Output Data2 Control
I/O Processor
Stores
information: Control unit coordinates
Output unit sends various actions
results of processing: •Instructions,
•Data •Input,
•To a monitor display, •Output
•To a printer •Processing
6
Computer Components
Computer Architecture
• Computer architecture refers to,
• Those attributes of a system visible to a programmer
• Those attributes that have a direct impact on the logical execution of a program.
• Examples
• Instruction set
• The number of bits used to represent various data types (e.g., numbers,
characters)
• I/O mechanisms, and techniques for addressing memory.
• It is an architectural design issue whether a computer will have a multiply instruction.
Computer Organization
• Computer organization refers to the operational units and their
interconnections that realize the architectural specifications.
• Organizational attributes include those hardware details transparent
to the programmer
• Examples
• Control signals;
• Interfaces between the computer and peripherals;
• The memory technology used.
• It is an organizational issue whether that instruction will be
implemented by a special multiply unit or by a mechanism that makes
repeated use of the add unit of the system.
Need of Architecture and Organization
For designing a computer, its architecture is For designing a computer, organization is decided
4.
fixed first. after its architecture.
Input Unit
Output Unit
Central Processing Unit (CPU)
Arithmetic and Logic Unit (ALU)
Control Unit
Memory Registers
Input Unit : A computer accepts the information through input device.
Input device writes data into the memory through the data path. Some of the
common input devices are keyboard, mouse, joystick, scanner etc.
Output Unit: The Output unit send the processed result to the user using output
device. It reads the data from memory through data path. Some devices are
monitor, printer etc.
Central Processing Unit (CPU) : The CPU is called the brain of the computer
because it is the control center of the computer. It first fetches instructions from
memory and then interprets them so as to know what is to be done.
CPU executes or performs the required computation and then either stores the
output or displays on the output device
Arithmetic and Logic Unit (ALU) : The ALU, as its name suggests performs
mathematical calculations and takes logical decisions. Arithmetic calculations
include addition, subtraction, multiplication and division
Control Unit : The Control unit coordinates and controls the data flow in and
out of CPU and also controls all the operations of ALU, memory registers and
also input/output units.
It is also responsible for carrying out all the instructions stored in the program.
It decodes the fetched instruction, interprets it and sends control signals to
input/output devices until the required operation is done properly by ALU and
memory.
Memory Registers : A register is a temporary unit of memory in the CPU.
These are used to store the data which is directly used by the processor.
Registers can be of different sizes(16 bit, 32 bit, 64 bit and so on) and each
register inside the CPU has a specific function like storing data, storing an
instruction, storing address of a location in memory etc.
The user registers can be used by an assembly language programmer for storing
operands, intermediate results
Flip flop stores a single bit of information
Group of flipflops forms a register
Group of registers forms a memory
Memories are made up of registers.
Each register in the memory is one storage location. Storage location is also called as
memory location.
Memory locations are identified using Address.
The total number of bit a memory can store is its capacity.
Registers
⚫ Memory hierarchy
⚫ Registers
⚫ Cache memory
⚫ Main memory
⚫ Secondary memory
⚫ At higher level of hierarchy, memory is faster, more expensive.
⚫ General Purpose
⚫ Data
⚫ Address
⚫ Condition Codes
⚫ General purpose registers:
should be done.
Accumulator (AC):
operations.
⚫ Control & Status Registers:
⚫ Not visible to the user, visible in a control or operating system
mode (supervisory mode).
⚫ Program counter holds the address of the instruction that
should be executed next.
⚫ Instruction register holds the actual instruction to be
executed.
⚫ Memory Address Register (MAR) connects to address bus
other registers.
Exa m p le of Re gi s te r Organizations
Register F iles
⚫ A register file is a n array of processor registers in a central
processing unit (CPU).
Control Unit –
A control unit (CU) handles all processor control signals. It directs all input
and output flow, fetches code for instructions, and controls how data moves
around the system.
Arithmetic and Logic Unit (ALU) –
The arithmetic logic unit is that part of the CPU that handles
all the calculations the CPU may need, e.g. Addition,
Subtraction, Comparisons.
It performs Logical Operations, Bit Shifting Operations, and
Arithmetic operations.
Input/Output Devices – Program or data is read into main
memory from the input device or secondary storage under the
control of CPU input instruction.
Output devices are used to output the information from a
computer, some results are evaluated by computer and it is
stored in the computer
Buses – Data is transmitted from one part of a computer
to another, connecting all major internal components to
the CPU and memory, by the means of Buses.
Types:
Data Bus: It carries data among the memory unit, the
I/O devices, and the processor.
Address Bus: It carries the address of data (not the
actual data) between memory and processor.
Control Bus: It carries control commands from the CPU
(and status signals from other devices) in order to
control and coordinate all the activities within the
computer.
Von Neumann Machine
Von Neumann bottleneck :
To enhance performance, we cannot get away from the fact that
instructions can only be done one at a time and can only be
carried out sequentially.
Creates a inadequate rate data transfer between Memory and
processor.
Both of these factors hold back the competence of the CPU. This is
referred as the „Von Neumann bottleneck‟.
Von Neumann processor with more cache, more RAM, or faster
components but if original gains are to be made in CPU
performance then an influential inspection needs to take place of
CPU configuration.
This architecture is very important and is used in our PCs and even
in Super Computers.
Register transfer operation for addition operation
Fetch / Execute Cycle
Flowchart of IAS operation
Flowchart of IAS operation
I A S I n s truc tio n s
IAS – Total 21 Instructions
⚫ Data Transfer
⚫ Unconditional Branch Instruction
⚫ Conditional Branch Instruction
⚫ Arithmetic
⚫ Address Modify Instruction
IAS Instruction set
Example
Write an ALP for the given expression using Von Neumann
instruction set and write the register transfer notation for the same.
Assume that B,C and D are available in the memory locations 450,
451 and 452 respectively.
A = ( B + C ) * D
X = A + B/2
ALP
Harvard Architecture
The Harvard architecture is a computer architecture with physically
separate storage and signal pathways for instructions and data.
It was basically developed to overcome the bottleneck of Von
Neumann Architecture.
The main advantage of having separate buses for instruction and
data is that CPU can access instructions and read/write data at the
same time.
Programs needed to be loaded by an operator; the processor could
not initialize itself.
In a Harvard architecture, there is no need to make the two memories
share characteristics.
In particular, the word width, timing, implementation technology,
and memory address structure can differ.
Instructions – read-only memory
Data memory –read-write memory.
In some systems, there is much more instruction memory than data
memory so instruction addresses are wider than data addresses.
Von-Neumann Vs Harvard
Modified Harvard Architecture
A modified Harvard architecture machine is very much like a
Harvard architecture machine, but it relaxes the strict separation
between instruction and data while still letting the CPU
concurrently access two (or more) memory buses.
The most common modification includes separate instruction and
data caches backed by a common address space.
While the CPU executes from cache, it acts as a pure Harvard
machine.
When accessing backing memory, it acts like a von Neumann
machine
RISC and CISC Architecture