P2 T2 L7 The Processor Flashcards

You may prefer our related Brainscape-certified flashcards:
1
Q

Explain the Central Processing Unit (CPU)

2 points + 5 components

A
  1. Controls the other components and executes instructions
  2. A processor has a number of different components, each with their own role to perform:
    1. Arithmetic-Logic Unit (ALU)
    2. Control Unit
    3. Clock
    4. General purpose registers
    5. Dedicated registers
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Explain the system clock

3 points

A
  1. A series of regular ON/OFF signals used to synchronise the operations of the processor components.
  2. Actions are usually carried out on the rising edge of the clock
  3. Actions each take a fixed number of cycles to complete
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Explain the control unit

3 points

A
  1. Coordinates the activity of all other components
  2. Separate steps such as fetching the address of data, and fetching the data itself from memory, are identified
  3. Each step is synchronised with the system clock
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Explain the Arithmetic-Logic Unit (ALU)

5 points

A
  1. The problem solving part of the processor
  2. This component performs arithmetic, logical and shift operations on data
  3. Arithmetic operations include: Add, Subtract, Multiply and Divide
  4. Logical operations include: AND, OR, NOT, XOR
  5. Shift operations include: Move bits to the left or right within a register
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Explain General purpose registers

4 points

A
  1. Temporary data store on the CPU
  2. Rather than writing working data back to ‘slow’ memory, processors have several locations of super-fast memory called registers that are used to temporarily store results
  3. The processor is then able to immediately access and re-use these results in subsequent calculations, e.g. Add 2 + 3 + 4
  4. Some processors have a single general purpose register called an Accumulator
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Carrying out sequences of programming instructions requires many different pieces of ________ to be held.

eg:
the current instruction being executed
the address of the data that it needs, and also the data itself
the address of the next instruction to be executed

A

information

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

List the 6 dedicated registers in the CPU

A
  1. Program counter
  2. Current instruction register
  3. Memory address register
  4. Memory buffer register
  5. Status register
  6. Interrupt register
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

(Dedicated registers)
Explain Program counter / PC
(1 point)

A
  1. holds the memory address of the next instruction to be executed
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

(Dedicated registers)
Explain Current Instruction Register / CIR
(1 point)

A
  1. holds the current instruction
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

(Dedicated registers)
Explain Memory Address Register / MAR
(1 point)

A
  1. holds the address in memory where the processor is required to fetch or store data from or to
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

(Dedicated registers)

Explain Memory Buffer Register / MBR

A
  1. temporarily holds data moving between the processor and main memory – sometimes called MDR (Memory data Register)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

(Dedicated Registers)

Explain Status register / SR

A
  1. holds information about the current state of operations. It is used to set flags (e.g. overflow) or to detect error conditions
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

(Dedicated registers)
Explain the Interrupt register
(1 point)

A
  1. Interrupt register stores the details of any upcoming interrupts
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What happens when an interrupt happens?

2 steps

A
  1. all the register values are copied to a memory area called the ‘stack‘ and they stay in the stack whilst the CPU starts executing the interrupt service routine (ISR).
  2. Once the routine is over, the registers are loaded back with their original values from the stack and can continue with what they were doing before the interrupt came along. This is called ‘context switching’.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Give the 6 steps for FE cycle

A
  1. MAR ⬅ PC
    2a. PC ⬅ PC + 1
    2b. MBR ⬅ memory content from address
  2. CIR ⬅ MBR
  3. Decode CIR (instruction decoder)
  4. Execute

NOTE: 2a & 2b happen simultaneously

WORDED STEPS

Step 1: Contents of PC copied into MAR
Step 2a: Contents of PC incremented by 1
Step 2b: Contents of Memory location addressed by MAR loaded into MDR
Step 3: Content of MDR copied into CIR
Step 4: Contents of CIR decoded
Step 5: instruction executed

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

Describe what will happen during the decode and execute part of the cycle
(8 steps)

A
  1. The instruction is held in the CIR, instruction in CIR is decoded
  2. The {control unit / instruction decoder} decodes the instruction
  3. Instruction will be split into opcode and operand
  4. CPU executes instruction using ALU to perform calculations
  5. Further {memory fetches / saves} carried out if required
  6. Result of computation {stored in accumulator / written to main memory}
  7. Status register updated
  8. If there is a {jump / branch} instruction, PC is updated
17
Q

In the FE cycle diagram, why does the second stage contain two steps?
(2 points)

A
  1. These two happen at the same time
  2. This is possible as they are two different devices that do not depend on each other

NOTE: This speeds up the FE cycle

18
Q

Explain Fetch-Execute cycle

2 points

A
  1. Processors operate in defined stages that are used to carry out program instructions
  2. The process (the fetch execute cycle) is repeated over and over again for each instruction in a program
    (NOTE: The process is the fetch-execute cycle)
19
Q

Explain how the clock affects the performance of a processor

2 points

A
  1. The Fetch-Execute cycle is triggered from the clock pulses of the system clock
  2. The faster the clock speed, the faster a computer can fetch, decode and execute instructions

NOTE: This clock can change state many billions of times per second. A 4GHz processor would tick 4 Billion times per second

20
Q

Explain the Fetch step in the FE cycle (1 point)

A
  1. The next instruction is fetched from the PC (program counter)
21
Q

Explain the Decode step in the FE cycle (1 point)

A
  1. With the instruction now in the CIR (current instruction register), the Control Unit can work out what needs to be done to carry it out
22
Q

Explain the Execute step in the FE cycle (1 point)

A
  1. The registers in the CPU now contain everything that the ALU (arithmetic logic unit) needs to carry out the instruction
23
Q

State the factors that influence the performance of a processor
(4 factors)

A
  1. Number of cores: more processors can be linked together on a single chip allowing more instructions to be executed simultaneously
  2. Word length: the amount of data that the CPU can process simultaneously
  3. Address and data bus width
  4. Clock speed
24
Q

Define Cache memory (1 point)

Cache memory is larger and slower than a ________, faster and smaller than ____.
Larger amounts of cache memory can improve __________ ________

A
  1. Cache is a small amount of superfast memory that stores data that is frequently used by the processor

register

RAM

processing speed