CPU

0.0(0)
Studied by 0 people
call kaiCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/25

encourage image

There's no tags or description

Looks like no tags are added yet.

26 Terms

1
New cards

What is the CU and what does it do?

Control unit

controls flow of data with the control bus which is bi directional

2
New cards

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

3
New cards

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

4
New cards

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

5
New cards

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

6
New cards

What is the ALU?

Arithmetic logic unit

Performs arithmetic and logical operations on data.

7
New cards

What is the ACC?

Accumulator

holds the result of all the instructions

general purpous register

8
New cards

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

9
New cards

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


10
New cards

What are the features of the data bus?

bi directional

carry the data that is being transmitted around the CPU

11
New cards

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)

12
New cards

What is a computer?

An electronic device that takes inputs, processes data, and delivers outputs

13
New cards

What happens in the fetch part of the cycle?

  1. The PC is checked for the memory address for the next instruction

  2. This address goes to the MAR and sent across the address bus to main memory

  3. the control bus sends a read signal along the control bus to main memory

  4. The content stored in the memory address goes to the MDR along the data bus

  5. This data gets copied to the CIR

  6. The PC gets incremented by 1


14
New cards

What happens in the decode part of the cycle?

  1. The instruction gets sent to the decode unit

  2. 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)


15
New cards

What happens in the execute part of the cycle?

In this example it is loading data to the ACC

  1. the address of the thing to be loaded goes to the MAR

  2. This goes along the address bus to main memory

  3. the control bus sends a read signal along the control bus

  4. the contents in the address gets sent to the MDR through the data bus

  5. This gets copied to the ACC

  6. done


16
New cards

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.

17
New cards

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


18
New cards

What does pipelining do in a CPU?

Improve efficiency

19
New cards

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.

<p>Every single instruction has to go through the FDE cycle</p><p>This is split into 5 processes to carry out the instructions which all take one clock cycle</p><p>If you wanted to do 5 instructions, it would take 25 cycles</p><p>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. </p><p>Therefore, 5 instructions get done in 9 cycles, therefore improving efficiency.</p>
20
New cards

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


21
New cards

What is the modern day computer architecture?

Contemporary.

22
New cards

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

23
New cards

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


24
New cards

What are instruction sets?

Set of all instructions written in machine code that can be recognised and executed by a given processing unit

25
New cards

What is an addressing mode?

Different ways an instruction can access data stored in memory.

26
New cards

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.