0% found this document useful (0 votes)
10 views

Puter Architecture

Uploaded by

nikhilsp1585
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views

Puter Architecture

Uploaded by

nikhilsp1585
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 37

Computer Architecture

1
Computer System
• Number of interrelated components like
- Computer hardware - peripherals
- Data communication equipments
that work together with aim of converting
data into information.
• A computer system essentially has three
important components:
• CPU
• Input Unit
• Output Unit
Computer System

Central Processing Unit


ALU Control Unit
Input Output
Registers

• CPU: This unit performs processing of instructions and


data inside the computer
• Input Unit: accepts instructions and data
• Output Unit: communicates the results to the user
Central Processing Unit
• The CPU or microprocessor is referred as the
‘brain’ of a computer system.

• It is a silicon chip that contains millions of tiny


electrical components.

• CPU controls all external and internal devices


and performs arithmetic and logic operations.

• It interprets, coordinates the operations and


supervises the instructions.
CPUs

5
Component Interaction

The CPU controls all of the other resources within the system,
in order to accomplish a task.

6
The CPU
Basic functions of CPU are:

1. Carrying out arithmetic and logic functions and sends the


result to the output unit.

2. Controlling the use of memory to store data and instructions.

3. Controlling the sequence of operations.

4. Controlling all parts of the computer system.

7
• How do computers represent data?
CPU works with only binary data.

Recognize only two


discrete states: on or off
Use a binary system to
recognize two states
Use Number system with
two unique digits: 0 and
1, called bits (short for
binary digits)

8
Interaction between functional
blocks
• CPU: Processor
Interprets and carries Registers
out basic instructions Control Arithmetic
Control Arithmetic
that operate a computer Unit Logic Unit (ALU)
Also called the processor
Instructions
Data
Control unit directs and Informatio
coordinates operations n
computer
in Input Output
Devices
Data Memory Information
Devices
Arithmetic logic unit
(ALU) performs Instructions
Data
arithmetic, comparison, Informatio
and logical operations n

Storage
Devices 9
Next
Interaction between functional blocks
TToouusseerr
(R(Reessuultl)t
Data
Data MEMORY UNIT
INPUT UNIT OUTPUT UNIT
(Registers)

ininsstrturucctitoionn re
reaadd wwrirtiete
ooppeeraranndd rresultlt

CONTROL UNIT ALU


CCoonntrtoroll
ssigignnaalsls

data flow
10
------Control flow
Interaction between functional
blocks
• The set of wires used for interconnection
is known as system bus.
• System bus is used to transmit data from
one unit to another.
• System bus is collection of wires through
which data is transmitted from one unit to
another (CPU, Memory and I/O devices)
• System bus has certain size or width
called data path which is measured in bits.
Interaction between functional
blocks
• System bus is further divided into three logical units: address bus,
data bus and control bus
• Data Bus: It transfers actual data or instructions between the
processor, memory and I/O devices.

• Address Bus: It informs the CPU about the location of the data
residing in the memory.
• Before data or instructions can be written into or read from memory
by cpu or I/O sections, address must be transmitted to memory over
the address bus.

• Control Bus: It is responsible for making CPU, memory and I/O


devices work together as a functional system, carrying signals to
instruct other units.
• status ready/ not ready for read/write of other device
Interaction between functional
blocks

• Processor and memory units holds a bidirectional relationship with the control and
data bus.
• In case of address bus, the communications with processors and memory is
unidirectional.
• The processor provides location of data (stored in memory), to be fetched from
memory, to the address bus and data bus carries the required data to processor.
What is a register?
Temporary high-speed storage area that holds
data and instructions

They hold the information that the CPU is currently working on


so they also known as CPU’s working memory.

Stores location
from where instruction
was fetched
Stores Stores data
instruction while it is while ALU
being decoded computes it
Stores results
of calculation

p. 185

14
Next
Registers
Register Name Function
Program Counter (PC) A Program counter keeps track of next
instructions to be executed.
Instruction Register (IR) An IR holds the instructions to be decoded
by the control unit.
Memory Address Register (MAR) MAR holds address of the next location in
memory to be accessed.
Memory Buffer Register (MBR) MBR is used for storing data either coming
to the CPU or data being transferred by the
CPU.
Accumulator (ACC) An accumulator is general purpose register
used for storing temporary results and
results produced by arithmetic logic unit.
Data Register (DR) A Data register is used for storing the
operands and other data.
Arithmetic / Logic Unit
ALU

Performs arithmetic operations


Performs logical operations
Arithmetic Operations

+ Addition
-
Subtraction
Multiplication
Division
/ *
Logical Operations

• Evaluates conditions NOT


• Makes comparisons
AND
• Can compare
– Numbers OR
– Letters
– Special characters

= > < <> >= <=


ALU
• In arithmetic calculations, it is only limited to
addition.
– Multiplication is repeated addition.
• E.g. 2 * 3 is 2+2+2
– Adding the negative of that number performs
subtraction.
• E.g. x-y is same as x+ (-y).
– Division can be achieved by multiplying the inverse of
the number.
• E.g. x/y is same as x * 1/y.
• Therefore, most processors include only the add
function.
ALU
ALU
• Following steps for adding two numbers:

1. The numbers (2 and 3) to be added up are put into two


separate memory locations.
2. The control unit fetches the two numbers from their
memory locations into the data registers.
3. The AU looking at the operator (+) uses the accumulator
and adds the two numbers.
4. The ALU stores the result 5 in memory buffer register.
5. Then the control unit stores the result into a user desired
memory location.
ALU
Logic Unit (LU):
• It provides ability to the CPU to make
logical operations based on the instruction
provided to it.
• These operations include logically
comparing two data items and take
different actions based on the results of
the comparison.
Control Unit
CU
• Heart of the CPU
• It controls the I/O devices and transfer of data
to and from primary storage.
• Directs the computer system to execute
stored program instructions
• Communicates with other parts of the
hardware
• It determines what data is needed, where it is
stored, where to store the results of the
operation.
Control Unit
Step 1. Fetch
Obtain program
instruction or data item
from memory

Step 2.
Decode
Memory Translate
instruction
Step 4. Store into
Write result to commands
memory
Processor
ALU Step 3. Execute Control Unit
Carry out
command

24
Next
Central Processing Unit (CPU)

Performs calculations
Arithmetic / Logic Unit
and decisions

Coordinates
Control Unit processing steps

Small, fast
Registers storage areas for
instructions and
data
25
Communication between various Units of
a Computer System
• Processor to memory communication

• The following sequence of events take place


when information is transferred from memory to
the processor:

1. The processor places the address in MAR via the


address bus.
2. The processor issues a READ command via the
control bus.
3. The memory places the retrieved data on the data
bus, which is then transferred on the processor.
Processor to memory communication
• The following sequence of events takes place when
information is written into memory

1. The processor places the address in memory address


register via the address bus.

2. The processor transmit the data to be written in memory


via the data bus.

3. The processor issues a WRITE command to memory


via the control bus.

4. The data is written in memory on the address specified


in memory address register.
Processor to I/O Devices Communication
• I/O units are connected to the computer system via the system bus.

• Each I/O devices in a computer system has a controller, which


controls the operation of that device.

• The controller is connected to the buses via interface logic unit.

• The interface logic unit decodes the controler commands received


from processor and send them to controller.

• It also buffers the flow of data from the device to the processor and
vice versa.

• The method of the transfer of information between processor and


I/O device is called program controlled transfer.
Processor to I/O Devices
Communication
Memory
Unit
Device

Data
Interface Logic Bus
Unit Device
Processor Controller
Data Register Data
Bus
Register
Processor to I/O Devices Communication
• Steps to transfer of data between processor and I/O devices:

1. Processor sends the address of device from which data is to be read via
system bus.

2. Control unit issues a READ command.

3. The device interface logic acknowledge the signal and turns on a device
busy flip-flop (state 0).

4. I/O device reads data and places it in data register of the interface. It also
set data ready flip flop (state 1).

5. The processor continually interrogates the data ready flip flop and waits
until this flip-flop is set (state 0).

6. When data ready flip-flop is set, the processor reads data from interface
data register and places it in the appropriate processor register.
Processor Speed
• The processor is the main hardware that drives the computer, the
faster the processor, the better the performance.
• The overall speed of computer system is determined by several
factors, most notably:
– Clock speed
• The rate at which the processor process information and this
is measured in millions of cycles per second (Megahertz)
• E.g. 700 MHz
• The more the number of hertz, the faster is the processing
speed
– Speed and size of the data bus
• Larger the bus width and the faster the bus speed the grater
amount of data which can travel on it
Processor Speed
• While purchasing computer system, a perfect match
between the bus size, bus speed and the speed of clock
should be considered.
• For e.x. ,if computer can deliver data of 256 bits at a time
to the processor, the processor can only use 8 bits at a
time, and has slower clock speed
– Then it will not function optimally
– Data can be corrupted
– There will be a queue of data, waiting to get off the
bus
Processor Speed
• In a similar scenario, computer can deliver
data of 256 bits at a time to the processor,
the processor can use 64 bits at a time,
and has a faster clock speed
– Will function properly
– The processor will sit idle for data to be
received
– Hence, there is wastage of the precious
Multiprocessor systems

A computer system which includes only


one processor is called a single-processor
system.

Computer system that include more than


one processor are called multiprocessor
systems.
Multiprocessor systems
• Two popular architectural approaches for
building multiprocessor computer systems
are:
– Symmetric Shared Memory Multiprocessor
– Asymmetric Shared Memory Multiprocessor

35
Common pool of memory connected with high speed
bus

A l l processor can access all thesememory 36


Asymmetric Multiprocessor
• One processor act as a controller termed
as master processor, which controls
memory unit and other processors.
• Rest of the processor are termed as slave
processor
• The master has access to whole memory
but
Slave has access to limited memory
37

You might also like