1/25
Looks like no tags are added yet.
What is the CU and what does it do?
Control unit
controls flow of data with the control bus which is bi directional
What is the PC and what does it do?
Program counter
Holds the address of the next instruction to be executed
This could be the next instruction in a sequence
or
It could be the address to jump too if it is needed as part of the current instruction
What is the MAR and what does it do?
Memory address register
It holds the memory location from which data or an instruction is currently being fetched
It sends the address to the main memory through the address bus
What is the MDR / MBR?
Memory data register / memory buffer register
Used to temporarily hold the data which is read from or written to memory
All data must go through this and travels down the data bus
What is the CIR and what does it do?
Current instruction register
Holds the current instruction being executed
The contents of the MDR are copied to the CIR if it is an instruction
It contains two things: opcode and operand
What is the ALU?
Arithmetic logic unit
Performs arithmetic and logical operations on data.
What is the ACC?
Accumulator
holds the result of all the instructions
general purpous register
What are the features of the control bus?
bi directional
carries control signals around all the components in the CPU
e.g. sends memory read and memory write control signals to the main memory
What are the features of the address bus?
carries memory addresses to the main memory which identify where the dat is being read from or being written to
uni directional
What are the features of the data bus?
bi directional
carry the data that is being transmitted around the CPU
What is opcode and how does it differ from operand
opcode - the instruction that tells the CPU what to do (what to do)
operand - part of the instruction that holds the memory address (where to do it)
What is a computer?
An electronic device that takes inputs, processes data, and delivers outputs
What happens in the fetch part of the cycle?
The PC is checked for the memory address for the next instruction
This address goes to the MAR and sent across the address bus to main memory
the control bus sends a read signal along the control bus to main memory
The content stored in the memory address goes to the MDR along the data bus
This data gets copied to the CIR
The PC gets incremented by 1
What happens in the decode part of the cycle?
The instruction gets sent to the decode unit
This then interprets the opcode and operand to get the instruction (in this example we are loading something) e.g. 0110 1010. 0110 - opcode - load 1010 - operand (address to load it from)
What happens in the execute part of the cycle?
In this example it is loading data to the ACC
the address of the thing to be loaded goes to the MAR
This goes along the address bus to main memory
the control bus sends a read signal along the control bus
the contents in the address gets sent to the MDR through the data bus
This gets copied to the ACC
done
What is program branching? (selection)
one of the three core programming constructs—alongside sequence and iteration—used to control the flow of execution in an algorithm.
It evaluates two different conditions that return either true or false and if it is true then a specific block of code runs or it skips over some code. Visa versa.
What factors effect performance of the CPU?
Clock speed:
measured in HZ/GHZ
number of FDE cycles per second
Cache size:
temporary storage of data/ instructions being read and written from
much easier to access and get than RAM
L1 - fast expensive small
L3 - slow cheap big
L2 middle ground
Number of cores:
A core is a complete copy of a CPU
Quad core CPU’s have 4 registers, ALU’s, accumulators and control units ext.
means the CPU can do multiple tasks at the same time
What does pipelining do in a CPU?
Improve efficiency
How does pipelining work?
Every single instruction has to go through the FDE cycle
This is split into 5 processes to carry out the instructions which all take one clock cycle
If you wanted to do 5 instructions, it would take 25 cycles
pipelining uses the available process left from the fist instruction, so the next instruction is only one clock cycle behind the last. This can be seen in the diagram.
Therefore, 5 instructions get done in 9 cycles, therefore improving efficiency.

Compare Von Neuman and Harvard architecture.
Von Neuman:
shared memory space for instructions and data
a single control unit or processor follows a linear fetch, decode, execute cycle
one instruction at a time
registers are used to fast access instructions and data
Harvard:
instructions and data stored in separate memory units
each one has its own bus
reading and writing data can happen simultaneously
only used on RISC processors
What is the modern day computer architecture?
Contemporary.
What is SIMD and MMID?
SIMD: (single instruction multiple data) parallel processing where a single instruction is carried out by multiple data types at the same time. Often used by graphics processors
MMID: (multiple instruction multiple data) another version where multiple instructions are carried on multiple data items across several cores
What is RISC and CISC and the differences?
Complex instruction set computer
laptops, PC’s
uses far more complex instructions
so there are shorter length instructions
variable instruction length
requires less memory as there are less instructions to store
Reduced instruction set computer
mobile phones, smart watches
far simpler instructions
longer instructions
fixed instruction length
requires more memory as there will be more instructions to complete the same operation
What are instruction sets?
Set of all instructions written in machine code that can be recognised and executed by a given processing unit
What is an addressing mode?
Different ways an instruction can access data stored in memory.
What are the different types of addressing modes and how do they work?
Immediate - the value you want to use is written directly in the instruction. e.g. STA 12 = store the numerical value 12
Direct - The operand is the memory address of the data. e.g. STA 12 stores the ACC value into the memory address of 12
Indirect - The operand is the memory address of the memory address of the data. e.g. STA 12 stores the ACC value into the memory address of 12’s value as a memory address
Indexed - The operand is the memory address and whatever index that instruction is at, adds together the memory address value and stores the value in the memory address at the new value. e.g. STA 12 (third instruction - so index of 2) - adds 12+2 = 14 which puts the value in the 14th memory address.