WHAT DO YOU MEAN BY MACHINE INSTRUCTIONS?
A set of binary codes that are recognised and executed directly by a processor is called a machine code. An individual machine code is called a machine instruction.
Main memory holds machine instructions and data.
Fields of an Instruction:
- Opcode: The operation itself is usually represented by a code called the opcode.
- Address: Other than opcode, all the other parts of an instruction are called address or operand fields.
- Mode: It specifies the way the operand or effective address is determined. It may be implicit or explicit in the instruction.
![Machine Instruction](https://study.madeeasy.in/wp-content/uploads/2024/06/me-machine-instruction.jpg)
Instruction Cycle
Instruction cycle describes the execution sequence of the program instruction contain two sub cycles:
- Fetch cycle
- Execution cycle
![Instruction Cycle](https://study.madeeasy.in/wp-content/uploads/2024/06/instruction-cycle.png)
Fetch Cycle
- Objective of a fetch cycle is instruction fetch. In this process, CPU fetch the instruction from main memory based on program counter.
Execution Cycle
- Objective of a execution cycle is processing of an instruction.
- CPU organisation is classified in the three types based on the availability of “ALU operands”:
- Stack CPU
- Accumulator CPU
- General register CPU
- In this organization ALU operations are performed only on stack data means both of the operands are always required into stack.
- In this organisation, for ALU operation Ist operand is always required in the accumulator while 2nd operand may be present either in the register or in the memory.
- Based on the number of registers possible in the CPU, architecture is divided into two categories:
# Register to memory reference CPU.
# Register to register reference CPU.
- In this architecture, number of registers are less in comparison with register to register reference CPU.
- In this architecture, for performing ALU operation it is needed to store first operand in the register while second operand can either be in register/memory.
- After processing, result is stored in the source 1 register.
- Compatible instruction format: “2 address instruction”
![Execution Cycle](https://study.madeeasy.in/wp-content/uploads/2024/06/execution-cycle.png)
<< Previous | Next >>
Must Read: What is Computer Organization and Architecture?
WhatsApp Group
Join Now
Telegram Group
Join Now