Machine Instruction Flashcards
What is the basic function of a computer
Execution of a program
What are the 2 major components of a machine instruction
Function code/opcode - specifies the function performed
Operand addresses - specifies the location of the operands used
What are the main methods of address format
3-address machines
2-address machines
1-address machines
0-address machines
3 address machines
In 3-address machines, all three operands are explicit in each instruction. Containing the address of 2 operands and the address of the result making 3
2-address machines
Each instruction specifies two operands. The result would replace one of the two operands
1-address machines
In this the accumulator is implicitly both a source operand and the destination of the operation
0-machine address
In this the locations of the operands and the result to be stored are known
What is an instruction cycle
It is a cycle that the central processing unit follows from boot-up until the computer has shut down in order to process instructions
Registers involved in instruction cycle
- Memory address registers(MAR): It specifies the address of a read or write operation in memory
- Memory Buffer Register(MBR): It holds the memory value to be stored, or the last value read from the memory.
- Program counter(PC): holds the address of the next instruction to be fetched
- Instruction Register(IR): holds the last instruction fetched
What are the 3 operations in an instruction cycle
- Fetch cycle
- Decode instruction cycle
- Execute cycle
Describe the function of the fetch cycle
Describe the function of decode instruction cycle
Describe the function of the execute cycle
What is a computer instruction
It is a binary code that specifies a sequence of micro operations for the computer
What are the 3 basic computer instructions
- Memory-Reference instructions
- Register-Reference instructions
- Input-Output instructions