Computer Architecture
Von Neumann 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 model proposed that not only should the data being processed be
stored in memory but that instructions being used to process the data should
also be stored in the same memory.
The von Neumann architecture on a simple level state that a computer
system consists of 3 main sections:
The CPU (central processing unit) - the main processing unit of the system,
also known as the processor.
Storage- primary memory is fast to access and is directly accessible by the
processor. RAM and ROM form main memory along. With cache memory and
registers. Secondary storage is slow to access and not directly accessible by
the processor.
Input/ output devices- are used to communicate with other devices
The CPU has the responsibility for the execution or processing of all the
instructions and data in a computer application.
The CPU consists of:
Control unit (CU)
This is an internal part of the CPU and it controls the flow of data through the
CPU. It also controls the interactions between the different parts of the CPU.
It tells the different components as well as any linked hardware, how to
respond to the given instruction.
Arithmetic and 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. Multiplication and division are carried out
by a sequence of addition, subtraction and left or right logical shift
operations.
Immediate access store (IAS)
This is the memory found inside a CPU and is used to hold not only data but
also the instructions needed to process that data. It is also more commonly
known as the CPU memory. The CPU needs to hold data and instructions here
before processing as it would be much too slow bringing them directly from
the main memory to be processed. The data and instruction is first loaded
into the main memory and then brought into the IAS to be processed.
Registers
These are internal memory locations within the CPU. They temporarily hold
data and instructions during processing. Registers are used to move data
and instructions into and around the different components of the CPU.
Input/Output
These allows interaction with the computer. Instructions are processed from
and to them in the CPU.
Buses
The components are connected to one another using buses. A bus is a series
of conductors or pathways which can be considered sort of ‘highway’ for
information.
The main features from the Von Neumann model were:
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.
The Von Neumann architecture is based on the concept of a stored
program computer. A stored program computer is a computer that stores
program and instructions in a digital memory.
Types of registers
Buses
(System) buses are used in computers as parallel transmission
components; each wire in the bus transmits one bit of data. There are three
common buses used in the von Neumann architecture known as: address
bus, data bus and control bus.
Address bus
As the name suggests, the address bus carries addresses throughout
the computer system. Between the CPU and memory, the address bus is
unidirectional (i.e. bits can travel in one direction only); this prevents
addresses being carried back to the CPU, which would be an undesirable
feature.
Data bus
The data bus is bidirectional (allowing data to be sent in both directions
along the bus). This means data can be carried from CPU to memory (and
vice versa) and to and from input/output devices. It is important to point out
that data can be an address, an instruction or a numerical value.
Control bus
The control bus is also bidirectional. It carries signals from the control unit
(CU) to all the other computer components. It is usually 8-bits wide. There is
no real need for it to be any wider since it only carries control signals.
Exercise 1 June 2020 p12
Exercise 2 Nov 2019 p13
Exercise 3 june 2015 p11
Example of read/write operation
READ operation
Suppose we want to read the contents of memory location 1111 0001; the
two registers are used as follows:
Write operation
we want to show how the value 1001 0101 was written into memory
location 1111 1101:
Fetch–Decode–Execute cycle
Instructions from memory and stores them in suitable registers. Both the address bus and data
bus are used in this process. Once this is done, each instruction needs to be decoded before
finally being executed. This is all known as the Fetch–Decode–Execute cycle.
Fetch
Both data and instruction can be stored in MDR. In the Fetch–Decode–Execute cycle, the next
instruction is fetched from the memory address currently stored in the MAR and the instruction
is stored in the MDR. The contents of the MDR are then copied to the Current Instruction
Register (CIR). The PC is then incremented (increased by 1) so that the next instruction can be
then be processed.
Decode
The instruction is then decoded so that it can be interpreted in the next part of the cycle.
Execute
The CPU passes the decoded instruction as a set of control signals to the appropriate components
within the computer system. This allows each instruction to be carried out in its logical sequence.
Steps
Exercise 1
June 2024 p11
Exercise 2
Sp 23 1B
Factors affecting performance of the CPU
Clock speed
The first thing to consider is the role of the system clock. The clock defines the
clock cycle that synchronises all computer operations. The control bus transmits
timing signals ensuring everything is fully synchronised. By increasing clock speed,
the processing speed of the computer is also increased.
Cache size
The use of cache memories can also improve CPU performance. Unlike RAM, cache
memory is located within the CPU itself, which means it has much faster data
access times than RAM. Cache memory stores frequently used instructions and data
that need to be accessed faster, which improves CPU performance. When a CPU
wishes to read memory, it will first check out the cache and then move on to main
memory/RAM if the required data isn’t there. The larger the cache memory size the
better the CPU performance.
Number of cores
The use of a different number of cores can improve computer performance. One
core is made up of an ALU, a control unit and the registers. Many computers are
dual core (the CPU is made up of two cores) or quad core (the CPU is made up of
four cores). The idea of using more cores alleviates the need to continually increase
clock speeds. However, doubling the number of cores doesn’t necessarily double the
computer’s performance since we have to take into account the need for the CPU to
communicate with each core; this will reduce overall performance.
Exercise 1
June 2023 p12
Instruction set
In a computer system, instructions are a set of operations which are decoded
in sequence. Each operation will instruct the ALU and CU (which are part of
the CPU). An operation is made up of an opcode and an operand.