Check your Understanding (CPU Structure and Function)

Interactive Flash Cards

[qdeck align=”center” style=”width: 100%; border: 4px solid #3CB371;” card_back=”white”]
[h]

The Function of the CPU

[q]What is the CPU?
[a]The CPU (central processing unit) is a small computer component which is responsible for the processing of data and instructions.

[q]What are CPUs often known as?
[a]CPUs are often known as
‘the ‘Brain’ of the Computer’.

[q]What is the job of a CPU?
[a]The job of the CPU is to ‘Fetch’, ‘Decode’ and ‘Execute’ instructions.
In other words, ‘process data’.

[q]What examples are there of processing data?
[a]Processing means things like:
Searching
Sorting
Calculating
Decision Making

[q]When you open a program, where are its instructions and data loaded?
[a]When you open a program, all the data needed for the program to run is loaded onto the RAM.

[q]What happens during the ‘Fetch’ stage of the fetch-decode-execute (F-D-E) cycle?
[a]The CPU will fetch data/instructions from the RAM.
To do this it will call the address of the next item via the address bus.
The data/instructions are then sent back to the CPU via the data bus.

[q]What happens during the ‘Decode’ stage of the fetch-decode-execute cycle?
[a]The decode stage is where the CPU makes sense of the instructions and prepares for the next stage.

[q]What happens during the ‘Execute’ stage of the fetch-decode-execute cycle?
[a]The execute stage is where the data processing takes place.
Instructions are carried out on the data.

[q]What are the three main areas that together form the CPU architecture?
[a]The CPU consists of:
– Control Unit
– Immediate Access Store (cache)
– Arithmetic and Logic Unit

[q]What is the purpose of the control unit?
[a]Controls the signals required to coordinate the running of the processor including the movement of data between components and decoding instructions.

[q]What is the purpose of the Registers?
[a]This is the CPUs own memory store which is extremely quick and contains several specialised registers which are at the heart of the fetch-decode-execute cycle

[q]What is the purpose of the ALU?
(Arithmetic & Logic Unit)
[a]The ALU is where the CPU actually carries out the maths and logic on the data (it processes it).
It has an arithmetic part (where it performs calculations on the data) and it has a logic part (where it deals with logical operators such as true/false/equal to etc)

[q]What are the names of the 3 busses found in the ‘Von Neumann Architecture’?
[a]Connecting the CPU to the main memory and I/O devices are buses of which there are 3:
Address Bus
Data Bus
Control Bus

[q]What is the role of the ‘Address Bus’?
[a]This bus is responsible for communicating the memory locations of the data/instructions that needs to be fetched / moved between devices.

[q]What is the role of the
‘Data Bus’?
[a]This bus is responsible for moving data between the CPU and the main memory (and I/O devices)

[q]What is the role of the ‘Control Bus’?
[a]This bus is responsible for communicating control signals from the Control Unit (for example the clock signal to synchronise the processes)

[q]What is this diagram showing?

[a]It shows the ‘Von Neumann Architecture’ (AKA ‘The CPU’)

[q]“Before 1945, computers were essentially preprogramed machines.”
Explain what is meant by this statement.
[a]Before 1945 a computer would typically be set up, with wires and switches to perform a specific task.
In this way, a computer program was considered to be ‘part of the machine’. The only thing it would be given is data to be processed.

[q]In 1945, what idea did Von Neumann have that would revolutionise the way computers were made?
[a]John Von Neumann, wondered if it would be possible to create a computer where the program (and its data) could be stored together, independent of ‘the machine’.
This meant that simple programs could be written containing both instructions and data and be executed by a computer without having to rewire the circuitry of the machine.

[q]All ‘Von Neumann’ CPUs have an instruction set.
Explain what is meant by the term ‘instruction set’ and provide examples of some.
[a]An instruction set is a list of instructions that a CPU understands and can execute.

[q]The CPU is full of registers that are used when it processes data. Some have special names as they play particularly important roles.
What is a register?
[a]Registers are simply tiny memory locations (memory stores). The important ones have special names.

[q]State the names of the 5 main registers that are used when the CPU processes an instruction.
[a]The Accumulator
The Program Counter
The Memory Address Register
The Instruction Register
The Memory Data Register

[q]The following program is loaded onto the CPU.

Explain what this program will do and what the data is that it will work on.
[a]Memory locations 00-02 currently hold instructions and locations 04-05 hold the data that the instructions will work on.
The program instructions are to:
• LOAD the number in memory location 4 (number 5) to the accumulator
• SUBTRACT from it, the number in memory location 5 (number 2)
• STORE the result of the calculation in memory location 6.

[q]Describe the role of the Program Counter, Memory Address Register, Instruction Register, Memory Data Register and the Accumulator, during the first ‘Fetch Stage’ for the following program.

[a]•As it is the first cycle, the program counter begins at 0 (computer scientists often start counting from 0, not 1).
•The program counter is then used by the memory address register to locate the first instruction and so is set to ‘0’, meaning that this is where the first instruction needs to be taken from.
•With the location noted, The memory data register fetches the contents of address 0, “LDA4”. Because it is an instruction, it is immediately loaded into the instruction register.
The FETCH stage is now complete.

[q]If, after the fetch stage, the current states of the Program Counter, Memory Address Register, Instruction Register, Memory Data Register and the Accumulator are as follows, what will occur in the DECODE stage?

[a]Now that the CPU has fetched the first instruction, it needs to decode it.
It does this by looking up the IR instruction in its character set.
It recognises LDA 4 as meaning LOAD the contents of address 04.
The CPU has now decoded the first instruction and is ready to execute it!

[q]If, after the fetch AND decode stages, the current states of the Program Counter, Memory Address Register, Instruction Register, Memory Data Register and the Accumulator are as follows, what will occur in the EXECUTE stage?

[a]Now that the CPU has made sense of the instruction, it now needs to execute the instruction.
The instruction is execute and the value of address 04 is LOADED into the accumulator.
Because the first cycle has now been completed, the program counter is updated to 1, ready for the next cycle.

[q]What is meant by the CPU’s clock speed?
[a]The clock speed determines the speed of the Fetch-Decode-Execute cycle

[q]How is the CPU’s clock speed measured?
[a]The CPU’s clock speed is measured in hertz (Hz) – this is the amount of F-D-E cycles per second

[q]If the clock speed of a CPU is 500Hz, how many cycles will the CPU perform in a second?
[a]A clock speed of 500Hz means 500 cycles per second.

[q]How is the clock speed maintained?
[a]The CPU contains a vibrating crystal that maintains a constant rate.

[q]If the clock speed of a CPU is 3GHz, how many cycles will the CPU perform in a second?
[a]A clock speed of 3GHz means 3 billion cycles per second.

[q]If the clock speed of a CPU is 3.2MHz, how many cycles will the CPU perform in a second?
[a]A clock speed of 3.2MHz means 3.2 million cycles per second.

[q]What is overclocking?
[a]Overclocking is when you increase the clock speed of a CPU so that it performs more F-D-E cycles per second.

[q]What is a disadvantage of overclocking?
[a]If you overclock a CPU it works faster (than it is designed to) and overheats – which can be dangerous!

[q]What is ‘Cache’ memory?
[a]Cache memory is primary storage that is relatively small in capacity and is positioned next to the CPU. It enables instructions and data to be delivered to the CPU at speed.

[q]What is the issue with the RAM directly supplying instructions and data to the CPU?
[a]The RAM cannot deliver the instructions and data at the same rate that the CPU can process them. As a result the CPU’s performance is compromised.

[q]Why is Cache crucial for the quick processing of data and instructions?
[a]The cache is crucial for the quick processing as it can supply the CPU with its instructions at speed (but only if the RAM has supplied it with a set of instructions / data needed by the CPU at that time.

[q]How does the cache improve the efficiency of the CPU?
[a]The RAM supplies all the instructions / data to the CPU but it is not fast enough to deliver at the speed that the CPU needs it. The cache acts as a buffer, storing sets of anticipated instructions (delivered by the RAM) and sending them onto the CPU when it needs it, at speed (keeping up with the F-D-E cycle speed).

[q]What is a CPU core?
[a]A CPU core is a single processing unit, which has the ability to fetch, decode and execute instructions.

[q]Why is the advantage of having a CPU with more than one core?
[a]More cores means more processing units (units that can each carry out the fetch-decode-execute cycle independently). This means that more instructions can be processed over the same time period.

[q]What is the difference between ‘parallel processing’ and ‘multi-tasking’?
[a]Parallel processing is when a multi core CPU will processing multiple instructions from a single program, at the same time. Some programs, however, are not written to allow more than one instruction to be processed at the same time.
Multi-tasking is where multiple cores can process different program’s instructions at the same time.

[q]Is a dual core CPU faster than a single core CPU?
Explain your answer.
[a]The actual cores themselves are not necessarily faster. However, because there are more cores, it means that more instructions can be processed over the same time period.

[q]What is pipelining and how can it improve the performance of a CPU?
[a]Pipelining is where a sequence of instructions are overlapped in execution so that as one instruction is executed, the next can be decoded and the next can be fetched and in this way, instructions can be queued up reducing processing time.

[q]Explain two characteristics of a CPU which affects the speed of a CPU.
[a]Both the amount of cache and the clock speed can affect the speed of the CPU.
More cache means more efficiency when it comes to supplying the CPU with the data it needs to process.
Faster clock speed means that it can fetch decode and execute instructions more quickly.

[/qdeck]

 
 

Printable Flashcards

 

Download and print out these ‘Flashcards’ – use them to reinforce your understanding!
Ensure you print these double sided, ‘flipped on short edge’ so that the front and back of each card match up!

 
Icon  

CPU Structure and Function (44) - A-Level Flashcards.pdf

Scroll to Top