We can perform arithmetic operations on the numeric data which is stored inside the registers.
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. Similarily, 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.
- Substraction –
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.
Attention reader! Don’t stop learning now. Get hold of all the important DSA concepts with the DSA Self Paced Course at a student-friendly price and become industry ready.
- Different Classes of CPU Registers
- Internal Registers of DMA Controller
- Registers of 8085 microprocessor
- Essential Registers for Instruction Execution
- Shift Registers in Digital Logic
- General purpose registers in 8086 microprocessor
- 8085 program to add three 16 bit numbers stored in registers
- Computer Arithmetic | Set - 2
- Computer Arithmetic | Set - 1
- Arithmetic instructions in 8085 microprocessor
- Arithmetic Operations of Binary Numbers
- Arithmetic instructions in 8086 microprocessor
- Basic Laws for Various Arithmetic Operations
- Overflow in Arithmetic Addition in Binary Number System
- Arithmetic Pipeline and Instruction Pipeline
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to email@example.com. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.