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

Computer Architecture

Uploaded by

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

Computer Architecture

Uploaded by

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

Computer Science (2210 / 0478)

TO P I C: CO MP U T E R A RC H I T E C T U R E
T E A CH E R: AT H A R A L I
Computer Architecture
3.1

Syllabus content
Computer Architecture:

Computer Architecture is the study of the


structure / design of computer systems.
It deals with the way the internal parts of a
computer system actually work.
It is different from computer organization
and computer design.
Microprocessor / CPU / Microcontroller:
Central processing Unit:
• The central processing unit (CPU)
• The central processing unit (CPU)
(also known as a microprocessor
or processor) is central to all
modern computer systems
(including tablets and
smartphones). The
• CPU is very often installed as an
integrated circuit on a single
microchip. The CPU has the
responsibility for the execution or
processing of all the instructions
and data in a computer
application. As Figure shows, the
CPU consists of:
• » control unit (CU)
• » arithmetic and logic unit (ALU)
• » registers and buses.
Computer Architecture:

In the mid-1940s, John von


Neumann developed the concept
of the ‘stored program computer’,
which has been the basis of
computer architecture ever since.
This is still the basis of modern
computers today. It describes
computer as:
» the concept of a central
processing unit (CPU or processor)
» the CPU was able to access the
memory directly
» computer memories could store
programs as well as data
» stored programs were made up
of instructions which could be
executed in
sequential order.
Components of CPU:

Arithmetic & Logic Unit


(ALU)
The Arithmetic & Logic
Unit (ALU) allows the
required arithmetic
(e.g. +, - and shifting) or
logic (e.g. AND, OR)
operations to be carried
out while a program is
being run; it is possible
for a computer to have
more than one ALU to
carry out specific
functions.
Components of CPU:

Arithmetic & Logic Unit


(ALU)
The key circuits required
for subtraction are:
-Adder circuit
-Two’s complement
conversion circuit
-Control circuit to select
between addition and
subtraction
These allow the ALU to
perform subtraction
efficiently without
needing a dedicated
subtraction circuit.
Components of CPU: Multiplication: The Shift-and-Add Method
Imagine you're multiplying two numbers, let's say 13 and 7.
We can break down 7 into its binary representation: 111. This
means 7 = 1 * 2^2 + 1 * 2^1 + 1 * 2^0.
Arithmetic & Here's how the shift-and-add method works:
Logic Unit (ALU) 1.Initialize: Start with a result of 0.
The Arithmetic & 2.Check the least significant bit of the multiplier:
Logic Unit (ALU) 1. If it's 1, add the multiplicand (13 in our case) to the result.
2. If it's 0, do nothing.
carries out 3.Shift the multiplicand to the left: This doubles its value.
multiplication 4.Shift the multiplier to the right: This discards the least
and division with significant bit we just checked.

the help of 5.Repeat steps 2-4 until the multiplier becomes 0.

adder and
shifter circuits.
Components of CPU: Multiplier (7): 111 Multiplicand (13): 1101

Iteration 1:

- Least significant bit is 1, so add 1101 to the result: Result = 1101

Arithmetic & - Shift 1101 left: 1101 becomes 11010

- Shift 111 right: 111 becomes 011


Logic Unit (ALU) Iteration 2:

The Arithmetic & - Least significant bit is 1, so add 11010 to the result: Result = 100111

- Shift 11010 left: 11010 becomes 110100


Logic Unit (ALU) - Shift 011 right: 011 becomes 001

carries out Iteration 3:

multiplication - Least significant bit is 1, so add 110100 to the result: Result = 10010011

- Shift 110100 left: 110100 becomes 1101000


and division with - Shift 001 right: 001 becomes 000

the help of The multiplier is now 0, so we stop. The final result is 10010011, which is the binary
representation of 91.
adder and
shifter circuits.
Components of CPU:

Control Unit
The control unit called as brain
of brain is responsible to
coordinates all functions of
CPU, mainly fetch decode and
execute. It does so with the
help of many sub-
components, as you can see in
the figure.
The control unit ensures
synchronization of data flow
and program instructions
throughout the computer. A
system clock is used to
produce timing signals on the
control bus to ensure this vital
synchronization takes place –
without the clock the
computer would simply crash!
Components of CU:
The control unit reads an instruction
from memory. The address of the
location where the instruction can
be found is stored in the Program
Counter (PC). And put it in a
register current instruction register
(CIR).
This instruction is then interpreted
using the Fetch–Decode–Execute
cycle (see later in this section).
During that process, signals are
generated along the control bus to
tell the other components in the
computer what to do.
Control Unit and RAM:
The RAM holds all the data and
programs needed to be accessed by
the CPU. The RAM is often referred
to as the Immediate Access Store
(IAS).
The CPU takes data and programs
held in backing store (e.g. a hard
disk drive) and puts them into RAM
temporarily.
This is done because read/write
operations carried out using the
RAM are considerably faster than
read/write operations to backing
store; consequently, any key data
needed by an application will be
stored temporarily in RAM to
considerably speed up operations.
Control Unit and RAM:
The control unit ensures
The control unit in a computer is like the director of an orchestra. It
makes sure that all parts of the computer work together smoothly and
synchronisation of data flow and program stay in sync, ensuring that data flows correctly and that program
instructions throughout the computer. A
system clock is used to produce timing instructions are carried out in the right order.
signals on the control bus to ensure this For example, imagine a cooking competition where each chef has a
vital synchronisation takes place – without specific task, like chopping, boiling, or grilling. If they all start randomly
the clock the computer would simply
crash! or at different times, the final dish might be a mess. However, if there's a
clock or timer that signals each chef when to start or stop, everything
goes smoothly, and the dish comes together perfectly.
Similarly, in a computer, a "system clock" keeps everything in sync. It
sends out tiny electrical pulses, like beats or ticks, telling each part of the
computer when to do its job. Without this clock, the parts would not be
in sync, and the computer wouldn't be able to work properly—it would
“crash” or freeze up.
Control Unit and RAM:
The control unit ensures
Let's go through an example of how the control unit and the system
clock work together to execute a simple instruction, like adding two
synchronisation of data flow and program numbers stored in the computer’s memory.
instructions throughout the computer. A
system clock is used to produce timing Fetch Phase:
signals on the control bus to ensure this The control unit begins by fetching the instruction from memory
vital synchronisation takes place – without (let's say it's "Add 5 + 3").
the clock the computer would simply
crash! The system clock produces a series of pulses, each representing a
"tick" or "beat" for the control unit to follow.
On one clock tick, the control unit reads the address of the
instruction (where it’s stored in memory).
On the next clock tick, it fetches the instruction and brings it to the
CPU.
Decode Phase:
The control unit then decodes the instruction to understand what
needs to be done (in this case, adding two numbers).
Again, each part of this decoding is broken into steps, with each
clock pulse signaling when to proceed.
For example, the first tick could signal reading the first number, the
second tick reading the second number, and so forth.
Execute Phase:
The control unit then sends signals to the Arithmetic Logic Unit
(ALU) to perform the addition.
The system clock ensures that the control unit sends each signal at
Fetch-execute cycle:

Computer Architecture is the study of


the structure / design of computer
systems.
It deals with the way the internal parts
of a computer system actually work.
In about 1945, John von Neumann
developed this idea of a stored
program computer, often referred to
as the VON NEUMANN
ARCHITECTURE concept. This is still
the basis of modern computers today.
It describes computer as:
-A single processor with a CU & ALU.
-A single memory to hold both
programs and data.
-It uses input, output devices to
acquire and produce data.
-It’s a sequential machine i.e executes
instructions one after the other.
Past Paper:

You might also like