1.1.1 structure and function of the CPU Flashcards

1
Q

What does the ALU do?

A

Completes all arithmetic and logical operations
ADD/SUB etc..
AND, OR, NOT…

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Purpose of the CU?

A

Directs the operations of the CPU
* Controls and coordinated CPU activities
* Manages flow of data between CPU and other devices
* Accepts the next instruction
* Decodes instructions
* Stores resulting data back in memory

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is the purpose of the PC

register

A

Holds address of the next instruction to be executed

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Purpose of the ACC

A

Stores results of calculations (performed by the ALU)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Purpose of the MAR

A

Holds the address of a location that data is to be read from or written to

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Purpose of the MDR

A

Temporarily stores data that has been read or needs to be written

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Purpose of the CIR

A

Holds the current instruction being executed, divided up into operand and opcode

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What is the data bus?

A

Bi-directional bus used for transporting data and instructions between components

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What is the address bus?

A

Transmits the memory addresses specifying where data is to be sent to or retrieved from

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What is the control bus?

A

Bi-directional bus used to transmit control signals between internal and external components
* Bus requests
* Bus grant
* Memory write
* Memory read
* Interrupt request

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What are opcode and operand?

A

-Opcode: Specifies the type of instruction to be executed
-Operand: Address of the data upon which the operation is to be performed

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What is pipelining?

A

-Completing the FDE cycles of 3 instructions simultaneously
-Reduces the amount of the CPU kept idle
-Can be arithmetic or instruction

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q
A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What does the fetch stage of the FDE do

A
  1. PC is loaded with 0
  2. Value from the PC is copied to the MAR
  3. Data from the MAR is sent across the address bus with the instruction to read the data send across the control bus
  4. Data from that location in memory is sent down the data bus to the MDR
  5. PC incremented by 1
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What happens in the decode stage?

A
  1. The data is sent from the MDR to the CIR where it is split into opcode and operand
  2. This is sent to the CU to be decoded
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What happens in the execute stage?

A

Depends on the instruction being executed:
* If a value is inputted the ACC stores the value
* If outputted, it is the value currently in the ACC
* If a value is loaded from RAM it is sent across the data bus to the MDR
* If it is to be stored it will take the value ftom the ACC, send it to the MDR then across the data bus to RAM
* If branching the comparison will take place in the ALU

17
Q

Factors affecting CPU performance

A
  • Clock speed- time taken for one clock cycle to complete, Hz
  • Number of cores- Independent processor able to do its own FDE cycle. More cores = more FDE cycles at a given time (not all programs able to utilise multiple cores)
  • Cache- memory in the CPU’s onboard memory. Accessed faster than main memory.
    Level 1 cache- very fast, small capacity (2-64KB)
    Level 2 cache- Relatively fast, medium capacity (256KB-2MB)
    Level 3- Much larger and slower
18
Q

Von Neumann architecture

A

-Single CU, ALU, registers and memory units
-Shared memory and shared data bus used for both data and instructions
*Cheap to develop as CU easier to design
*Programs can be optimised in size

19
Q

Hardvard architecture

A

Seperate memory spaces for data and instructions. Commonly used with embedded processors
*Quicker execution as data and instructions can be fetched in parallel
*Memories can be different sizes