Open In App

Computer Organization | Micro-Operation

Last Updated : 03 Oct, 2024
Comments
Improve
Suggest changes
Like Article
Like
Report

In computer organization, a micro-operation refers to the smallest tasks performed by the CPU's control unit. These micro-operations helps to execute complex instructions. They involve simple tasks like moving data between registers, performing arithmetic calculations, or executing logic operations. Each micro-operation is completed in a single clock cycle.

What is Micro Operation?

Micro-Operations (also known as micro-ops) are the functional or atomic, operations of a processor. These are low level instructions used in some designs to implement complex machine instructions. They generally perform operations on data stored in one or more registers. They transfer data between registers or between external buses of the CPU, also performs arithmetic and logical operations on registers. In executing a program, operation of a computer consists of a sequence of instruction cycles, with one machine instruction per cycle. Each instruction cycle is made up of a number of smaller units - Fetch, Indirect, Execute and Interrupt cycles. Each of these cycles involves series of steps, each of which involves the processor registers. These steps are referred as micro-operations. The prefix micro refers to the fact that each of the step is very simple.

Below Figure shows the concept being discussed here. Flow chart for Micro-Operation

Micro-operations are small tasks performed inside the CPU. These tasks use data stored in the CPU’s registers to do basic operations like math or logic tasks. They also help move data between registers or between memory and registers.

Examples of Micro-Operations

  1. Load: Moves data from memory into a register.
  2. Store: Saves data from a register back into memory.
  3. Add: Adds two values and stores the result in a register.
  4. Subtract: Subtracts one value from another and stores the result in a register.
  5. AND: Performs a logical AND operation on two values and stores the result in a register.
  6. OR: Performs a logical OR operation on two values and stores the result in a register.
  7. NOT: Reverses the bits of a value and stores the result in a register.
  8. Shift: Moves the bits of a value to the left or right within a register.
  9. Rotate: Rotates the bits of a value left or right in a register.

How Micro-Operations Work?

Micro-operations are combined to perform more complex instructions. For example, an addition instruction might involve several micro-operations:

  • First, a load operation to move values into registers.
  • Then, an add operation to perform the calculation.
  • Finally, a store operation to save the result in memory.

Conclusion

When a computer runs a program, it processes instructions one by one. Each instruction is executed through an instruction cycle, which consists of smaller steps, like fetching the instruction, performing the task, and storing the result. Each of these steps involves multiple micro-operations. 


Next Article

Similar Reads