0% found this document useful (0 votes)
16 views8 pages

Hardware VonNeumann

The document provides an overview of the Central Processing Unit (CPU) and microprocessors, detailing their roles in executing instructions, the components of the CPU, and the Von Neumann architecture. It explains the fetch-decode-execute cycle, the significance of clock speed, cache size, and the number of cores in determining CPU performance. Additionally, it discusses instruction sets and how various factors can enhance computer performance.

Uploaded by

ayeshaazeem288
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)
16 views8 pages

Hardware VonNeumann

The document provides an overview of the Central Processing Unit (CPU) and microprocessors, detailing their roles in executing instructions, the components of the CPU, and the Von Neumann architecture. It explains the fetch-decode-execute cycle, the significance of clock speed, cache size, and the number of cores in determining CPU performance. Additionally, it discusses instruction sets and how various factors can enhance computer performance.

Uploaded by

ayeshaazeem288
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/ 8

HARDWARE

The Central Processing Unit (Cpu) & Microprocessor


What is the role of the central processing unit (CPU) in a computer?

 A computer system consists of hardware and software.


 The CPU is central to all modern computer systems.
 It 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.
 The main hardware components of a computer system are input devices, the central
processing unit, primary memory, secondary storage and output devices.
 Examples of input devices - keyboard, mouse, game controller, sensors, microphone and
webcam.
 Examples of output devices - monitor, phone screen, speakers, printer, and motors.
 Data and commands are inputted by the user using an input device, the central processing
unit (CPU) processes data by executing instructions and the results are outputted to an
output device.

Below is an example of data being inputted, processed and the results being outputted

Input (Device) Process (CPU) Output (Device)


Typing on Computer processes the typed text using Display text on
keyboard software monitor
Clicking mouse CPU determines what was clicked and Cursor moves on
responds screen

What is a microprocessor?
 A microprocessor is a type of integrated circuit on a single chip.
 An integrated circuit is a small electronic circuit made up of transistors, capacitors, resistors
and other electronic components.
 The integrated circuit contains a central processor designed to perform arithmetic and logic
operations, which include adding, subtracting, transferring numbers from one memory
location to another, and comparing two numbers.
 The single chip also contains input/output interfaces, and memory Microprocessors are a
compact way of processing data and can be used in a wide range of electronic devices,
including general-purpose computer system and Embedded system.

Von Neumann Architecture


The components in a CPU, in a computer that has a Von Neumann architecture

 John Von Neumann developed the concept of the stored program computer in the 1940s
 The Von Neumann computer architecture, which most modern day computers use, is based
upon this concept.
 The key feature of the stored program concept, and Von Neumann architecture, is data and
instructions are stored in the same memory ( RAM ) as binary.
 Another feature of Von Neumann architecture is a central processing unit (CPU) fetches
instructions from memory and executes them one at a time (serially).
 The CPU then stores the results back into memory Components of the Central Processing
Unit.

Parts of the CPU


The CPU is divided into three main parts:

1. Arithmetic and Logic Unit (ALU)


Responsible for performing arithmetic calculations (like addition, subtraction) and logical
operations (such as comparisons).
Performs basic operations on the data received.

2. Control Unit (CU)


Controls the flow of data between the CPU and other parts of the computer.
It fetches, decodes, and executes instructions from the memory.

3.Registers
Small, high-speed storage locations in the CPU used to store data temporarily. Registers help the
CPU run faster because they allow it to quickly access data without needing to go all the way to
memory every time.
One of the most fundamental components of Vo Neumann Architecture.
There are five of them (Special Purpose Registers)
Registers Functions

1. PC The Program Counter holds the address of the next instruction that the CPU will
execute.

Memory Address Register stores the address of the memory location currently being
2. MAR read from or written to.

Memory Data Register stores data which has just been read from memory or data
3. MDR
which is about to be written to memory.

4. CIR Control Instruction Register stores the current instruction being decoded and
executed.

5. ACC Accumulator is used when carrying out ALU calculations, it stores data temporarily
during the calculation.

Buses
 Components within the CPU and wider computer system are connected by buses.
 These are wires down which electronic signals and data travel. The different buses are
collectively called the system bus.
 The system bus is made up of three different buses - the data bus, the control bus and
the address bus.

1. Data Bus The data bus transmits data from the CPU to memory or input/output
controllers. It is bidirectional which means data can travel in both directions.

2. Address Bus The address bus transfers addresses from the CPU to memory. It is
unidirectional which mean addresses only go from the CPU to memory.

3. Control Bus The control bus transfers control signals from the control unit to other
components in the computer system such as memory or input/output
controllers. The control bus is bidirectional.
 Width of the address bus and data bus is important. The wider the bus, the larger the
word length that can be transported.

System Clock (Clock Speed)


 It sends out a regular signal (pulses) that controls the timing of all operations in the
processor.
 The speed of the system clock is measured in Hertz (Hz):
1 Hz = 1 cycle per second
1 GHz = 1 billion cycles per second
 Each clock cycle allows the CPU to carry out one or more basic operations (like fetching,
decoding, or executing an instruction).
 The higher the clock speed, the faster the CPU can process instructions.
 For Example:
A CPU with 3.0 GHz can carry out up to 3 billion cycles per second.

Overclocking
 Overclocking is when a user increases the CPU’s clock speed beyond the
manufacturer’s recommended limit.
 The goal is to make the CPU run faster and improve performance, especially in gaming
or video editing.

Dangers of Overclocking
 It can overheat the CPU if not cooled properly.
 May lead to system instability or shorten the lifespan of the CPU.
 Requires extra cooling systems like better fans or liquid cooling.
 Unsynchronized operations

IAS – Immediate Access Store


 The Immediate Access Store is another name for the main memory or RAM (Random
Access Memory).
 It is the memory that the CPU can access immediately to fetch data and instructions
during processing.

Von Neumann Cycle (Fetch–Decode–Execute)


 The Central Processing Unit (CPU) executes instructions by performing the Fetch
Decode Execute cycle.
 The CPU fetches an instruction from memory.
 The instruction is then decoded ( by the Control Unit) into an opcode and an operand.
 The instruction is executed and the whole cycle is repeated with the next instruction in
the process
Step-By-Step
Step 1: Program is loaded into Memory
 When a program is run, it is loaded from storage (like a hard drive) into main memory
(RAM).
 Instructions and data of the program now live in memory, each at a specific address.

Step 2: Program Counter (PC) starts the process


 PC is inside the CPU, and it always holds the address of the next instruction to fetch.

Step 3: Fetching the Instruction


Here’s what happens during the Fetch phase:

3.1 PC → MAR
 The address from Program Counter goes into MAR (Memory Address Register).
MAR holds the address of the instruction to be fetched from memory.

3.2 MAR → Address Bus


 The address from MAR is sent to memory using the Address Bus (one-way bus: CPU →
Memory).
3.3 Memory → MDR
 The instruction/data at that address in memory is sent back via Data Bus and stored in
MDR (Memory Data Register).
3.4 MDR → CIR
 The instruction in MDR is sent to CIR (Current Instruction Register) where it is held for
decoding.
3.5 PC is incremented
 PC is increased by 1 (or by the size of the instruction), pointing to the next instruction.
Step 4: Decoding the Instruction
 The Control Unit (CU) inside the CPU decodes the instruction from the CIR.
It figures out:
What operation is required? (e.g. Add, Move, Jump)
What data is needed?
Where should the result go?

Step 5: Executing the Instruction


 If it's an arithmetic operation, the data is sent to the ALU (Arithmetic Logic Unit).
 The result is often stored in the Accumulator (ACC).
 If it’s a jump or memory operation, the PC or MAR/MDR are updated again.
How do the characteristics of the CPU affect performance?

Clock speed
 The clock speed is measured in Hertz (Hz)
 The clock speed measures the number of fetch-decode-execute cycles that can take place
in 1 second
 The faster the clock speed, the more instructions can be fetched and executed per second
 Modern computers have a clock speed in Gigahertz (GHz), meaning billion
 A clock speed of 3.5GHz can perform up to 3.5 billion instructions per second

Cache size
 Cache is very small, very fast memory on or close to the CPU
 Cache is used as temporary storage to provide quick access to a copy of frequently used
instructions and data
 The larger the cache size, the more frequently used instructions or data can be stored
 This results in the CPU having to complete fewer fetch cycles from memory (RAM),
speeding up the performance
 Cache also has a significantly faster read/write speed than RAM, making it much quicker
to retrieve instructions from there instead of from memory (RAM)

Number of cores
 A core works like it is its own CPU
 Multiple core processors mean they have multiple separate processing units that can
fetch, decode and execute instructions at the same time
 For example, a dual-core processor would have 2 processing units, each with their own
o Control Unit (CU)
o Arithmetic Logic Unit (ALU)
o Accumulator (ACC)
o Registers
 Multi-core processors can run more powerful programs with greater ease
 Multiple cores increase the performance of the CPU by working with the clock speed
o Example: A quad-core CPU (4 cores), running at a clock speed of 3Ghz
 4 cores x 3GHz
 4 x 3 billion instructions
 12 billion instructions per second

Dual Core

Worked Example
One computer has a single core processor and the other has a dual core processor.

Explain why having a dual core processor might improve the performance of the computer.

Answer

 The computer with the dual core processor has two cores/double the amount of cores
 Parallel processing can take place
 Each core can execute a separate instruction at the same time
 Each core can process instructions independently of each other

CPU Instruction Sets


What is an Instruction set?

 An instruction set is a list of all the commands that can be processed by a CPU
 Each command has a binary code which is called machine code

Opcode and operand


 The opcode and operand make up the binary code
o The opcode (operation code) is the operation to be performed
o The operand is the location where the operation is to be performed in
 The table below shows an example instruction set
 Each instruction has a mnemonic that indicates what the instruction does alongside an
example binary code
 After an instruction is decoded into an opcode and an operand, the CPU finds the opcode
in the processor’s instruction set
 It then knows what operation to perform when executing the instruction
Instruction Mnemonic Binary code Command
Adds a value to the value currently stored in the
Add ADD 10100001
accumulator (ACC)
Subtract a value from the values stored in the
Subtract SUB 00100010
accumulator
Load the value stored in a memory location into the
Load LDA 10111111
accumulator
Store the value in the accumulator in a specific
Store STA 01100000
location in memory

 Instruction lists are machine-specific


o A program created using one computer’s instruction set would not run on a
computer containing a processor made by a different manufacturer
o For example, a computer program created using Intel’s instruction set would not
run on a device containing an ARM processor

Worked Example
Using the instruction set in the table above what would be the operation if the instruction was
00100010 00000010?

Answer

Either of:

 The operation would be SUB


 If the operand was raw data the complete instruction would be to subtract 2 from the
value in the accumulator

Describe different ways in which the performance of a computer can be improved.


Answer

 Increasing bus width (data and address bus) increases the performance and speed of a
computer
 Increasing clock speed will potentially increase the speed of a computer
 A computer’s performance can be changed by altering bus width, clock speed and use of
multi core
 Use of cache memories can also speed up a CPU’s performance

You might also like