2.1 The CPU + Fetch-Decode-Execute Flashcards
What is the CPU?
The internal hardware component that is responsible for processing data and executing the instructions of programs.
What is the ALU?
And what does it do?
The arithmetic logic unit.
Performs arithmetic and logical calculations.
What is the CU?
And what does it do?
The control Unit organises the order of program instructions.
Name four processes the Control Unit completes:
Sends control signals to enable data to be read and written.
Decodes instructions to determine what needs to be done.
Organises sequence of micro-operations
Uses control signals to determine which operation the ALU will carry out.
What is the Clock?
The system clock generates a regular pulse to synchronise operations.
What is a clock low?
0
What is a clock high?
1
What is a rising edge?
Low to high
What is a falling edge?
high to low
What is a clock period?
time between two rising edges
What is a clock cycle?
One clock period
Equation for clock rate:
Clock frequency (a.k.a. rate or speed) = 1 / clock period
What are registers?
Locations of computer memory that provide fast access.
What are general purpose registers?
Temporary storage for operation results that need to be accessed again
What are dedicated registers?
Registers for a specific purpose.
Name some dedicated registers
Program Counter Current Instruction Register Status Register Memory Address Register Memory Buffer Register (a.k.a. Memory Data Register) Accumulator
What is PC? And what does it do?
The program counter holds the address of the next instruction to be executed.
What is the CIR? And what does it do
Current Instruction Register, holds the current instruction.
WOW
What is the SR? And what does it do?
The Status Register stores information about the result of the last instruction. To indicate if an error or exception has occurred to help disable interrupts.
What is an error or exception?
Result of a calculation that requires further action
What is an interrupt?
Event outside program that requires attention of processor
What is the MAR? And what does it do?
Temporarily holds the address of the memory location processor needs to access.
What is the Memory Buffer Register and what does it do?
The MBR temporarily holds the data that are read from or written to main memory a.k.a. Memory Data Register (MDR)
What is the accumulator?
Stores the results of any calculation processed by the ALU
What is the Fetch-Decode-Execute Cycle?
A sequence of steps behind every operation carried out in the computer.
What has to occur before the FDE?
The program instructions have to be translated into machine code.
And the program instructions have to be loaded from secondary storage into main memory.
What happens in the Fetch Part?
- (PC) Program Counter provides address of next instruction
- This address is copied to memory address register (MAR)
- Address sent to Main Memory along address bus.
- Control Unit (CU) sends a signal along control bus.
- The content stored at the address is sent along data bus to the Memory Data Register (MDR).
- Data is copied to Current Instruction Register (CIR)
What happens in the Decode Part?
Control Unit decodes the instruction of CIR
What happens in the Execute part?
Instruction is executed in the exact sequence of operations necessary for that instruction.
What occurs at the end of the cycle?
At the end of a cycle the processor checks the status register for an error or exception or interrupt. Before starting the next cycle.
What is a data bus?
Sends data from the registers to the RAM.
What is command line?
Text interface on your computer.
What is different between Command Line and GUI?
GUI lets a user interact with the device/system with the help of graphical elements, like windows, menus, icons, etc.
The CLI, on the other hand, lets a user interact with their device/system with the help of various commands.
Some OS provide their users with only CLI, while some offer both CLI and GUI.