L7 - Computer Function Flashcards
What are the two components of an instruction?
operation code (opcode) and operand (address)
Name and briefly outline the 4 action categories of instructions
Processor - Memory : Data transferred to/from processor/memory
Processor - I/O : Data transferred to or from peripheral device via an IO module
Control : An instruction may modify the execution sequence
Data processing : Processor may perform some arithmetic or logical operations on data
Describe the fetch/execute cycle
Processor fetches an instruction from memory
Program counter is incremented so next instruction is fetched next time
Fetched instruction is loaded into instruction register (IR)
Processor interprets instruction
Processor performs required action
Describe the Instruction Cycle
- Instruction Address Calculation (IAC): Determine address of next instruction, usually by adding a fixed number to the address of the previous instruction
- Instruction Fetch (IF): Read instruction from memory address into processor
- Instruction operation decoding (IOD): Analyze instruction to deduce type of operation to be performed and operands to be used
- Operand Address Calculation (OAC): If instruction makes reference to an operand, calculate its address
- Operand fetch (OF): Fetch the operand from memory or IO
- Data Operation (DO): Perform the specified operation in the instruction
- Operand Store (OS): Write result into memory or to IO
What are the 4 types of interrupt?
Program - Software errors, e.g. DIV/0, Illegal instruction, overflow
Timer - Intentional, not an error. Generated by a timer in the processor. Allows regular execution of certain functions.
IO - Intentional. Signals completion of IO operation, signals an error, or requests service from the processor
Hardware Failure - Very bad. Power failure, memory errors. Usually causes things like BSOD
How does the state diagram for the Instruction cycle change when interrupts are added?
Adds states “Interrupt Check” and “Interrupt”.
Transition from Operand Store to Interrupt check.
Transition from IC to Interrupt.
Transition from IC to standard return transition.
Transition from Interrupt to standard return transition
What is a bus?
A communication pathway connecting two or more devices
What is the problem with two devices transmitting on a bus at the same time?
All devices on the bus receive the output - both outputs become confused with each other
What is the most common computer interconnection structure?
System bus
What are the three main components of the system bus?
Data bus
Address bus
Control bus
Describe the data bus and its purpose
Contains data lines that allow data to be moved through the system.
Usually consists of the number of bits of the system, e.g. 32 or 64
Number of lines is the width of the bus
Each line can transmit one bit at a time
Bigger width = better performing system
Describe the address bus and its purpose
Used to transmit addresses
Can transmit source or destination address
Width determines the maximum memory capacity of the system
Also used to address IO ports
Describe the control bus and its purpose
Controls the access and use of data and address lines
Must be controlled because so much accesses the other two buses
Transmits both command and timing info
Timing signals include validity of data and address info
Command signals specify which operations must be performed