Structure And Function Of The Processor Flashcards
What is the ALU?
It completes all the arithmetic and logical operations. (Arithmetic and Logic Unit)
What does the arithmetic operations include?
It includes all mathematical operations such as addition and subtraction on fixes or floating point numbers.
What do Logical operations include?
It includes Boolean logic operations such as And, Or, Not, Xor.
What is a Control Unit?
It is the component of the processor which directs the operations of the CPU.
What jobs does the The Control Unit have?
- Controlling and coordinating the activities of the CPU
- Managing the flow of data between the CPU and other devices
- Accepting the next instruction
- Decoding instructions
- Storing the resulting data back in the memory
What are registers?
Registers are small memory cells that operate at a very high speed.
What are registers used for?
They are used to temporarily store data and all arithmetic, logical and shift operations in these registers.
Purpose of a Program counter, PC (register)?
Holds the address of the next instruction to be executed.
Purpose of the accumulator, ACC (register)?
It stores the results from the calculations
Purpose of the Memory Address Register, MAR (register)?
Holds the address of a location that is to be read from or written to.
Purpose of the Memory Data Register, MDR (register)
Temporarily stores data that has been read or data that needs to be written.
Purpose of the Memory Data Register, MDR (register)
Temporarily stores data that has been read or data that needs to be written.
Purpose of the Current Instruction Register, CIR (register)
Holds the current instructions being executed, divided up into operand and opcode.
What are buses?
Buses are a set of parallel wires which connect two or more components inside the CPU.
What are the 3 buses and what are they called collectively?
Data bus, control bus, address bus and collectively they are called the system bus.
What is the width of the bus?
It is the number of parallel wires the bus has. It is directly proportional to the number of buts that can be transferred simultaneously at any time.
Typical bus width?
8, 16, 32, 64 wires wide
What is a data bus?
It is a bi-directional bus (bits can be carried both ways)
What is a data bus used for?
It is used for transporting data and instructions between components.
What is the address bus?
It is used to transmit the memory addresses specifying where data is to be sent to or retrieved from.
What is the width of the address bus?
The width is proportional to the number of addressable memory locations.
What is a control bus?
It is a bi-directional bus used to transmit the control signals between internal and external components.
What does the bus control bus do?
It coordinates the use of the address and data buses and provides status information between system components.
The control signal includes:
- Bus request : shows that a device is requesting the use of the data bus
- Bus grant : shows that the CPU has granted access to the data bus
- Memory write : data is written into the addressed location using this bus
- Memory read : data is read from a specific location to be placed onto the data bus
- Interrupt request : shows that a device is requesting access to the CPU
- Clock : used to synchronise operations
What does Assembly language use + example ?
It used mnemonics to represent instructions, for example ADD represents addition.
What is assembly code a simplified way of saying?
Machine code
What does the assembly language do?
The instructions are divided into operand and opcode in the Current Instruction Register. The operand contains the data or the address of the data upon which the operation is to be performed. The opcode specifies the type of instruction to be executed.
What is pipelining?
It is the process of completing the fetch, decode and execute cycles of three separate instructions simultaneously, holding data in a buffer in close proximity to the CPU until it’s required. While one instruction is being executed, another can be decided and another fetched.
What is pipelining aiming for?
To reduce the amount of the CPU which is kept idle. It is separated into instruction pipelining(IP) and arithmetic pipelining(AP). IP is separating out the instruction into fetching, decoding and executing. AP is breaking down the arithmetic operations and overlapping them as they are performed.
What is fetch-code-execute
It is the sequence of operations that are completed in order to execute an instruction.
What is the fetch phase in FDE (Fetch-Decode-Execute)?
-Address from the PC is copied to the MAR
-Instructions held at that address are copied to MDR by the data bus
-Simultaneously, the contents of the PC are increased by 1
-The value held in the MDR is copied to the CIR
What is the decode phase is FDE (Fetch-Decode-Execute)?
-The contents of CIR are split into operand and opcode
What is the execute phase in FDE (Fetch-Decode-Execute)?
-The decoded instruction is executed
The 3 factors that affect CPU performance:
Clock speed, Number of cores, the amount and type of cache memory
What is clock speed?
The clock speed is the time taken for one click cycle to be completed.
What does the clock speed do?
It is an electronic device which generates signals, switching between 0 and 1. All processors activities begin on a clock pulse, and each CPU operation starts as the clock changes from 0 to 1.
What is the clock speed determined by?
The system clock
What is the Number Of Cores?
A core is an independent processor that is able to run its own Fetch-Decode-Execute cycle.
What can a computer with multiple cores do?
It can complete more than one Fetch-Decode-Execute cycle at any time.
What can a computer with dual cores do?
It can complete tasks twice as fast as a computer with 1 core.
Why cannot all programs utilise multiple cores efficiently?
As they have not been designed to.
What is cache memory?
It is the CPU’s onboard memory.
How is cache memory made + replaced?
Instructions fetched from main memory are copied to the cache, so if required again they can be accessed quicker. As cache fills up, unused instructions are replaced
Cache Type - Level 1 cache Properies
Very fast memory cells with a small capacity (2-64KB)
Cache Type - Level 2 cache Properies
Relatively fast memory cells, with medium size capacity. (256KB-2MB)
Cache Type - Level 3 cache Properies
Much larger and slower memory cell
What is Von Neumann’s Architecture?
This includes the basic components of the computer and processor (single control unit, ALU, registers and memory units) in which a shared memory and shared data bus is used for both data and instructions.
What is Von Neumann’s Architecture built on?
It is built on the stored program concept.
What is Harvard Architecture?
It has physically separate memories for instructions and data, more commonly used with embedded processors.
Why is Harvard Architecture useful?
It is useful when memories have different characteristics (e.g. instructions may be read only, while data may be read-write).
What/how does the Harvard Architecture allow you to optimise?
It allows you to optimise the size of individual memory cells and their buses depending on your needs (e.g. the instructions memory can be designed to be larger so a larger word size can be used for instructions)
Advantages of Von Neumann’s Architecture :
-Cheaper to develop as the control unit is easier to design.
-Programs can be optimised in size.
Advantages of Harvard Architecture :
-Quicker as data instructions can be fetched in parallel.
-Memories can be different sizes, which can make more efficient use of space.
What does Contemporary Processing use?
It uses a combination of Harvard and Von Neumann’s Architecture.
When is Harvard and Von Neumann’s Architecture used in Contemporary Processing?
-Von Neumann is used when working with data and instructions in the main memory
-Harvard is used to divide the cache into instruction cache and data cache