Open In App

Arithmetic Micro-operations in Registers

Improve
Improve
Like Article
Like
Save
Share
Report

We can perform arithmetic operations on the numeric data which is stored inside the registers. 

Example : 

R3 <- R1 + R2

The value in register R1 is added to the value in the register R2 and then the sum is transferred into register R3. Similarly, other arithmetic micro-operations are performed on the registers. 

  • Addition – 
    In addition micro-operation, the value in register R1 is added to the value in the register R2 and then the sum is transferred into register R3. 

  • Subtraction – 
    In subtraction micro-operation, the contents of register R2 are subtracted from contents of the register R1, and then the result is transferred into R3. 

There is another way of doing the subtraction. In this, 2’s complement of R2 is added to R1, which is equivalent to R1 – R2, and then the result is transferred into register R3. 

  • Increment – 
    In Increment micro-operation, the value inside the R1 register is increased by 1. 

  • Decrement – 
    In Decrement micro-operation, the value inside the R1 register is decreased by 1. 
     

  • 1’s Complement – 
    In this micro-operation, the complement of the value inside the register R1 is taken. 

  • 2’s Complement – 
    In this micro-operation, the complement of the value inside the register R2 is taken and then 1 is added to the value and then the final result is transferred into the register R2. This process is also called Negation. It is equivalent to -R2
     

 

Arithmetic micro-operations are the basic building blocks of arithmetic operations performed by a computer’s central processing unit (CPU). These micro-operations are executed on the data stored in registers, which are small, high-speed storage units within the CPU.

There are several types of arithmetic micro-operations that can be performed on register data, including:

  1. Addition: This micro-operation adds two values together and stores the result in a register.
  2. Subtraction: This micro-operation subtracts one value from another and stores the result in a register.
  3. Increment: This micro-operation adds 1 to the value in a register.
  4. Decrement: This micro-operation subtracts 1 from the value in a register.
  5. Multiplication: This micro-operation multiplies two values together and stores the result in a register.
  6. Division: This micro-operation divides one value by another and stores the quotient and remainder in separate registers.
  7. Shift: This micro-operation shifts the bits in a register to the left or right, depending on the direction specified.

These arithmetic micro-operations are used in combination with logical micro-operations, such as AND, OR, and NOT, to perform more complex calculations and manipulate data within the CPU.


Last Updated : 25 Apr, 2023
Like Article
Save Article
Previous
Next
Share your thoughts in the comments
Similar Reads