Table of contents
1.
Introduction
2.
What are Arithmetic Micro-Operations?
2.1.
Addition
2.2.
Subtraction
2.3.
Increment
2.4.
Decrement
2.5.
1’s Complement
2.6.
2’s Complement
3.
What are the applications of arithmetic operations?
4.
Frequently Asked Questions
4.1.
What is arithmetic micro-operations?
4.2.
What are the four types of micro-operations?
4.3.
What are the 16 logic micro-operations?
4.4.
What is subtract arithmetic micro-operation?
4.5.
What is the difference between increment and decrement arithmetic micro-operation?
4.6.
What is the difference between 1’s complement and 2’s complement arithmetic micro-operation?
5.
Conclusion
Last Updated: Mar 27, 2024
Easy

Arithmetic Micro Operations

Author Pakhi Garg
0 upvote
arithmetic micro operations

Introduction

As you know, a computer works on instructions. Our systems consist of machine instructions to perform some operations like add, subtract, multiply, divide etc. To achieve these operations, the system stores the data in registers. Now, to operate this data, the CPU has micro-operations. A micro-operation is a simple operation performed on the data stored in one or more registers. They transfer the data between registers. There are four types of micro-operations:-

  1. Register micro-operations
  2. Arithmetic micro-operations
  3. Logic micro-operations
  4. Shift micro-operations

In this blog, we will discuss arithmetic micro-operations.

What are Arithmetic Micro-Operations?

Arithmetic micro-operations perform operations on the numeric data stored in the registers. 

The basic arithmetic micro-operations are-

  1. Addition
  2. Subtraction
  3. Increment
  4. Decrement
  5. 1’s complement
  6. 2’s complement

Let’s discuss these arithmetic micro-operations one by one.

Addition

The Add arithmetic micro-operation adds the values of the two registers and stores the output in the desired register.

The symbolic notation for the Add arithmetic micro-operation is-

R3 <- R1 + R2

Here, R1 and R2 are the registers whose contents we want to add and,

R3 is the desired register for storing the output.

Note: We can either store the output in another register or the same register, i.e. R1 or R2.

For example, consider the value of register R1 as 1010 and the value of register R2 as 0011. For performing the add arithmetic micro-operation remember the following rules:

  • 0 + 0 = 0
  • 0 + 1 = 1
  • 1 + 0 = 1
  • 1 + 1 = 10 (here, 0 is placed in the result and 1 is transferred as carry to the next column)

If we add R1 and R2, the output will be-

Add Micro Operation

Subtraction

The Subtract arithmetic micro-operation subtracts the values of the two registers and stores the output in the desired register.

The symbolic notation for the Add arithmetic micro-operation is-

R3 <- R1 - R2

Here, R1 and R2 are the registers whose contents we want to subtract and,

R3 is the desired register for storing the output.

Note: We can either store the output in another register or the same register, i.e. R1 or R2.

For example, consider the value of register R1 as 1011 and register R2 as 0101. For performing the subtract arithmetic micro-operation remember the following rules:

  • 0 - 0 = 0
  • 0 - 1 = 1 (because 10 is borrowed from next high order digit which is equal to 2 in decimal so 2 - 1 = 1)
  • 1 - 0 = 1
  • 1 - 1 = 0 

If we subtract R2 from R1, the output will be-

Subtract Micro Operation

Besides the above way, there is also an alternate way of doing the arithmetic subtraction. This way includes the use of the 2’s complement.

To subtract the values of two registers, we need to add the first register, the complemented value of the second register and one. 

The symbolic notation is-

R3 <- R1 + R2’ + 1

Here, R1 and R2 are the registers whose contents we want to subtract and,

R3 is the desired register for storing the output.

Using this method, we get the same output as R1 - R2.

Note: We can either store the output in another register or the same register, i.e. R1 or R2.

For example, consider the value of register R1 as 1011 and register R2 as 0101 (same as we take firstly). Now, we will perform subtraction using the alternate method.

First, we will complement the value of the register R2. 0 will be converted to 1 and 1 to 0.

Therefore, the content of R2 will become 1010. 

Second, we will add R2 and 1.

subtraction of arithmetic micro-operations

Finally, we will add R1 and R2.

arithmetic micro-operations subtraction

We will ignore the overflow bit (1 in this case). So, our output will be 0110.

Increment

The Increment arithmetic micro-operation increments the value of a register by 1. This means this operation adds 1 to the value of the given register and stores the output in the desired register.

The symbolic notation for the Increment arithmetic micro-operation is-

R1 <- R1 + 1

Here, R1 is the register whose value we want to increment and,

R1 is also the desired register for storing the output.

Note: We can store the output in another register or the same register.

For example, consider the value of register R1 as 0101. For performing the increment arithmetic micro-operation, we will add 1 to R1.

Increment arithmetic micro operation

The Increment arithmetic micro-operations is carried out with the help of a combinational circuit or a binary up-down counter.

Decrement

The Decrement arithmetic micro-operation decreases the value of a register by 1. This means this operation subtracts one from the value of the given register and stores the output in the desired register.

The symbolic notation for the Increment arithmetic micro-operation is-

R1 <- R1 - 1

Here, R1 is the register whose value we want to decrement and,

R1 is also the desired register for storing the output.

Note: We can store the output in another register or the same register.

For example, consider the value of register R1 as 0101. For performing the decrement arithmetic micro-operation, we will subtract one from R1.

Decrement arithmetic micro operation

The Decrement arithmetic micro-operation is carried out with the help of a combinational circuit or a binary up-down counter.

1’s Complement

The 1’s complement arithmetic micro-operation complements the contents of a register. In this micro-operation, 0 is converted to 1 and 1 is converted to 0. 

The symbolic notation for the 1’s complement arithmetic micro-operation is-

R1 <- R1’

Here, R1 is the register whose value we want to complement and,

R1 is also the desired register for storing the output.

Note: We can store the output in another register or the same register.

For example, consider the value of register R1 as 0101. For performing the 1’s complement arithmetic micro-operation, we will just convert 0 to 1 and 1 to 0.

Therefore, 1’s complement of R1 will be 1010.

2’s Complement

The 2’s complement arithmetic micro-operation first complements the contents of the given register and then adds 1 to it. This micro-operation is also known as Negation.

The symbolic notation for the 2’s complement arithmetic micro-operation is-

R2 <- R2’ + 1

Here, R2 is the register on whose value we want to perform 2’s complement and,

R2 is also the desired register for storing the output.

Note: We can store the output in another register or the same register.

For example, consider the value of register R2 as 0101. For performing the 2’s complement arithmetic micro-operation first, we will find the 1’s complement of R2.

The 1’s complement of R2 will be 1010. Then we will add 1 to it.

2s complement

The signals that implement these operations propagate through gates in this case, and the result of the process can be transferred into a destination register via a clock pulse immediately after the output signal propagates through the combinational circuit.

Besides the above-described arithmetic micro-operations, there are two more arithmetic micro-operations- multiply and divide. These two operations are valid arithmetic operations, but they are not part of the required set of micro-operations.
A series of add and shift micro-operations are used to perform the multiply micro-operation. 

A series of subtracting and shifting micro-operations are used to complete the divide micro-operation.

The following table shows the symbolic representation of various Arithmetic Micro-operations.

Symbolic Representation Description
R3 ← R1 + R2 The contents of R1 plus R2 are transferred to R3.
R3 ← R1 - R2 The contents of R1 minus R2 are transferred to R3.
R2 ← R2' Complement the contents of R2(1's complement).
R2 ← R2' + 1 2's complement the contents of R2(negate).
R3 ← R1 + R2' + 1 R1 plus the 2's complement of R2(subtraction).
R1 ← R1 + 1 Increment the contents of R1 by one.
R1 ← R1 - 1 Decrement the contents of R1 by one.

What are the applications of arithmetic operations?

Microoperations are little operations performed on data kept in registers. An elementary operation carried out on data stored in one or more registers is known as a micro-operation. The operations carried out on the numerical data kept in the registers are covered by the arithmetic micro-operations. The content of information is altered via arithmetic microoperations.

Read About - Shift Registers in Digital Electronics 

Frequently Asked Questions

What is arithmetic micro-operations?

Arithmetic micro-operations perform operations on the numeric data stored in the registers. There are six basic arithmetic micro-operations. These are- add, subtract, increment, decrement, 1’s complement and 2’s complement.

What are the four types of micro-operations?

Four types of micro-operations are Register micro-operations, Arithmetic micro-operations, Logic micro-operations, and Shift micro-operations. Micro-operations known as register transfers move binary data between registers. Arithmetic micro-operations operate on the numerical data that is saved in registers. Bit manipulation operations are performed on non-numeric data stored in registers via logic micro-operations. Shift micro-operations operate on data in shift micro-operations.

What are the 16 logic micro-operations?

The 16 logic micro-operations are Clear, AND, Transfer A, Transfer B, Exclusive OR, NOR, OR, Exclusive NOR, Complement B, Complement A, NAND, and Set to all 1s.

What is subtract arithmetic micro-operation?

The subtract arithmetic micro-operation subtracts the values of the two registers and stores the output in the desired register.

What is the difference between increment and decrement arithmetic micro-operation?

The increment arithmetic micro-operation increments the value of a register by 1. In comparison, the decrement arithmetic micro-operation decreases the value of a register by 1.

What is the difference between 1’s complement and 2’s complement arithmetic micro-operation?

The 1’s complement arithmetic micro-operation complements the contents of a register. In this micro-operation, 0 is converted to 1, and 1 is converted to 0. Whereas the 2’s complement arithmetic micro-operation first complements the contents of the given register and then adds 1 to it. This micro-operation is also known as Negation.

Conclusion

In this article, we have studied arithmetic micro-operations. We went through the concept thoroughly, discussing six arithmetic micro-operations- add, subtract, increment, decrement, 1’s complement and 2’s complement, along with their examples.

Types of information system

MVVM Architecture Android

We hope that this blog has helped you enhance your knowledge regarding arithmetic micro-operations. If you want to learn more, check out our articles on Shift Micro Operations and Logic Micro Operations. Do upvote our blog to help other ninjas grow. 

Happy Learning!

Live masterclass