Computer Architecture
Computer Architecture
Von-Neumann Layout
Arithmetic and logic unit (ALU) – allows requires arithmetic or logic operation to be carried
out while a program is being run.
Registers
Program counter (PC) - stores the address of the next instruction to be fetched from memory
Memory address registers (MAR) - stores the address of the instruction or data to be fetched
from or written to memory
Memory data register (MDR) - stores the data that has been fetched from memory or being
written to memory, Data from MDR is sent to ALU to be executed
Current instruction register (CIR) – stores the instruction the CPU is currently decoding or
executing
Accumulator - Temporarily stores the results of the calculations performed by the arithmetic
and logic unit
Buses
Components within the CPU and wider computer system. These are wires down which the
electric signal and data travels. Different buses are collectively called system buses. System
bus = data bus + control bus + address bus
Data bus – transmits data from the CPU to memory or input/output controllers. Can travel in
both directions
Control bus – transfers control signals from control unit to other components in computer
system (memory or input/output controllers). It is bidirectional.
Address bus – transfers addresses from CPU to memory. It can only go from CPU to memory
The data/instruction at the memory address is transferred back to the CPU, via the data bus,
where it is stored in the memory data register (MDR).
The instruction is copied into the Current Instruction Register and the Program Counter
increments so that the next instruction can be processed.
Decode – The instruction in the Current Instruction Register is decoded, by the Control unit
so that it can be interpreted in the next part of the cycle.
Execute - The instruction is executed and the whole cycle is repeated with the next instruction
in the process. The CPU passes the decoded information as a set of control signals to
appropriate components within the computer system. Allows each instruction out to be
carried out in a logical sequence
CPU performance
Core
Use of a number of different cores can improve computer performance. A dual core processor
(CPU made of two cores) or quad core processor (CPU made of four cores). Multiple cores
enable multi-tasking. The more cores a computer has the more instructions that can be
executed per second resulting in better performance
Clock speed
Each core has a clock speed (number of instructions a core can perform in a second). It is
measured in Hertz. A gigahertz (GHz) is a billion instructions per second. A megahertz
(MHz) is a million instructions per second. (3.4GHz can execute 3.4 billion instructions)
Cache
Cache is a small amount of memory situated within or close to the CPU with very fast
read/write speeds. It has much faster data access times than RAM. Stores frequently used
instructions and data that needs to be accessed faster, which improves CPU performance.
Instruction set
Instructions are a set of operations which are decoded in sequence. Each operation will
instruct ALU and CU (part of CPU). Operation is made of opcode (informs CPU what
operation needs to be done) and operand (data which needs to be acted on or it can refer to
register in the memory). Instruction set is a list of all the commands that can be processed by
a CPU.
Embedded systems
Combination of hardware and software which is designed to carry out a specific set of
functions. An embedded system is a computer system with either one function or limited
specific functions built within a larger mechanical device. Its purpose is to control the device
and allow a user to interact with it.
Advantages:
Small in size and fit into devices
Cheaper to make
Low power consumption
Can be controlled remotely
Fast change to change in input (operate in real time)
No requirement for operating system