Skip to content
TheCScience
TheCScience
  • Engineering Subjects
    • Human Values
    • Computer System Architecture
    • Digital Communication
    • Internet of Things
  • NCERT Solutions
    • Class 12
    • Class 11
  • HackerRank solutions
    • HackerRank Algorithms Problems Solutions
    • HackerRank C solutions
    • HackerRank C++ problems solutions
    • HackerRank Java problems solutions
    • HackerRank Python problems solutions
TheCScience
TheCScience

Micro Operations in Computer Architecture

YASH PAL, October 8, 2025February 4, 2026

Micro Operations in Computer Architecture – A micro operation is an elementary operation executed on the information stored in one or more registers. A prespecified sequence of micro operations is performed on the stored information to complete a specified operation. The micro operations can be classified as follows:

  1. Arithmetic micro operation
  2. Logic micro operation
  3. shift micro operation

Micro Operations

Arithmetic micro operations

Basic arithmetic micro operations are addition, subtraction, negation, increment, and decrement. Multiplication and division are also valid arithmetic operations, but not included in the basic set of micro operations. In most of the computer systems, the multiplication operation is implemented with a sequence of addition and shift micro operations. The division operation is implemented with a sequence of subtraction and shift micro operations. The table below shows the basic arithmetic micro operations.

Register transfer languageDescription
R3 ← R1 + R2Sum of R1 and R2 is copied to R3
R3 ← R1 – R2Difference of R1 and R2 is copied R3
R3 ← R3 + 12’s complement the contents of R3 (negate)
R1 ← R1 + 1Increment the contents of R1
R1 ← R1 – 1Decrement the contents of R1
Basic Arithmetic Micro Operations

The above table shows that the basic micro operations are addition and subtraction. The increment and decrement micro-operations are symbolized by plus-one and minus-one operations, respectively. The following circuits can be used to implement various arithmetic micro-operations:

  1. Binary Adder
  2. Binary Adder/Subtraction
  3. Binary Increments
  4. Arithmetic Circuit

Binary Adder

The digital circuit that results in the arithmetic sum of two binary numbers of any length is called a binary adder. The binary adder can be designed with full adders connected serially. In such a type of design, the output carry of one full adder is transferred to the input carry of the next full adder. The figure below shows the 3-bit binary adder, which is constructed with 3 full adders.

3 Bit binary adder
3 Bit Binary Adder

Binary Adder/Subtractor

The subtraction of a binary number can be performed by taking the 2’s complement of the second number and adding it to the first number. The 2’s complement can be obtained by taking the 1’s complement and adding one to the least significant bit. Whereas the addition of binary numbers can be done by performing a direct addition operation as discussed in pervious section.

The addition and subtraction operations can be combined into a common circuit by including an Ex-OR gate with each full adder. A 3-bit adder/subtractor is shown in the figure below.

3 Bit Adder/Subtractor
3 Bit Adder/Subtractor

Mode selection input, as shown in the above figure, controls the operations. When mode selection input M=1, the circuit behaves as a subtractor, whereas for M=0, the circuit behaves as an adder.

Binary Incrementer

The binary increment micro operation is defined as the addition of one in a register. This can be achieved by means of half adders connected in a serial manner. The block diagram of a 3-bit binary incrementer is shown below.

3 Bit Binary Incrementer in Micro operations
3 Bit Binary Incrementer

Arithmetic Circuit

The basic arithmetic micro operations listed in the above table can be implemented in one composite arithmetic circuit. The basic component of an arithmetic circuit is the full adders with the multiplexer circuits. The 4-bit arithmetic circuit is shown in the figure below.

4-bit arithmetic circuit in micro operations
4-bit Arithmetic Circuit

The 4-bit arithmetic circuit has four full adders to make a four-bit adder. Four 4:1 multiplexers are used to choose different operations. There are two 4-bit inputs (A and B) and one 4-bit output (D). Each bit of input B is connected to the corresponding Y input of the full adder through the multiplexer, whereas each bit of input A is connected directly to the X input of the full adder. The output of the circuit is calculated from the following arithmetic sum.

D = X+Y+Cin

Here, X input is always equal to A input wheres Y input can be B, B, 0, or 1 according to the selection lines (S1 and S0) of the multiplexer. Cin is the input carry, which can be equal to 0 or 1. By controlling the value of selection lines and input carry, it is possible to generate eight arithmetic micro operations shown in the table below.

S1S0CinYD = X+Y+CinMicro Operations
000BD = A + BAddition
001BD = A + B + 1Addition with carry
010BD = A + BSubtraction with borrow
011BD = A + B + 1Subtraction
1000D = ATransfer A
1010D = A + 1Increment A
1101D = A – 1Decrement A
1111D = ATransfer A
Functions for a 4-bit arithmetic circuit

When S1 S0 = 00, the output of the multiplexer is B and applied to the Y input of the full adder. if Cin = 0, the output D = A+B+0 (addition) and if Cin = 1, the output D = A+B+1 (addition with carry).

When S1 S0 = 01, the output of the multiplexer is B and applied to the Y input of the full adder. if Cin = 0, the output D = A+B+0 = A+(B+1)-1 = A + (2’s complement of B) – 1 = A-B-1 (subtraction with borrow) and if Cin = 1, the output D = A+B+1 = A+(2’s complement of B) = A-B (subtraction).

When S1 S0 = 10, the outputs of all multiplexers are 0 and applied to the Y inputs of all full adders. In Cin = 0, the output D=A + (0000)2 +0 = A (Transfer) and if Cin=1, the output D=A+(0000)2+1 = A+1 (Increment).

When S1 S0 = 11, the outputs of all multiplexers are 1 and applied to the Y inputs of all full adders. If Cin = 0, the output D=A+(1111)2+0=A+(1’s complement of 0) + 1-1 = A+(2’s complement of 0)-1=A-0-1=A-1 (Decrement) and if Cin = 1, the output D=A+(1111)2+1 = A+(1’s complement of 0)+1=A+(2’s complement of 0) = A-0=A(Transfer).

Note – The micro operation D = A (transfer) is generated twice, so there are only seven distinct micro operations in the arithmetic circuit.

Logic Micro Operations

The logic micro operations include the basic operations like AND, OR, EX-OR, NOT, etc. These operations consider each bit of the register separately and treat it as a binary variable. It means logic micro operations are bit-wise micro operations. If there are two binary variables, 16 different logic micro operations can be performed on them.

The sixteen logic micro operations are derived from the truth table of logic functions, as shown in the table below. The bit-wise variables are represented by x (contents of register A) and y (Contents of register B). Each bit of the register is considered as a binary variable is micro operation is performed on the string of bits stored in the registers. All sixteen logic micro operations are shown in the table below.

FunctionInput Bit VariablesInput Bit VariablesInput Bit VariablesInput Bit VariablesBoolean
Function
Register
Transfer
Language
(RTL)
Micro
Operation
x yx yx yx y
00011011
F00000F0 = 0F ← 0Clean
F10001F1 = xyF ← A ∧ BAND
F20010F2 = xyF ← A ∧ B
F30011F3 = xF ← ATransfer A
F40100F4 = xyF ← A ∧ B
F50101F5 = yF ← BTransfer B
F60110F6 = x⊕yF ← A ⊕ BEx – OR
F70111F7 = x+yF ← A ∨ BOR
F81000F8 = x+yF ← A ∨ BNOR
F91001F9 = x⊕yF ← A⊕BEx-NOR
F101010F10 = yF ← BComplement B
F111011F11 = x+yF ← A ∨ B
F121100F12 = xF ← AComplement A
F131101F13 = x+yF ← A ∨ B
F141110F14 = xyF ← A ∧ BNAND
F151111F15 = 1F ← 1Set

Hardware Implementation (Logic Circuit)

Although there are sixteen logic micro-operations listed in the above table, most of the digital systems use only four micro operations (AND, OR, Ex-OR and complement). Other micro operations can be derived from the combination of these four. One stage of a logic circuit is shown in the figure below.

Logic diagram of one stage of logic circuit
One Stage of Logic Circuit
S1S0OutputOperation
00F = A ∧ BAND
01F = A ∨ BOR
10F = A⊕BEx-OR
11F ← AComplement
One stage of a logic circuit functional table
  1. When S1S0=00, the input I0 will be at the output of the multiplexer. Hence Fi=I0=Ai ∧ Bi (AND).
  2. When S1S0=01, the input I1 will be at the output of the multiplexer. Hence Fi=I1=Ai ∧ Bi (OR).
  3. When S1S0=10, the I2 input will be available at the output of the multiplexer. Hence Fi=Ai ⊕ Bi (Ex-OR).

In the same manner, when S1S0=11, I3, the input will be at the output of the multiplexer. Hence Fi=A (complement of A).

Logic Circuit Application

The logic micro operations are executed on the individual bits of the data stored in the register. The logic micro operations are rarely used in scientific computations, but they are useful for bit manipulation of binary data and for making logical decisions. It means that logic micro operations can be used to change bit values, delete a group of bits, or insert new bit values into a register. Therefore, a logic circuit can be used for the following operations.

  1. Selective Set
  2. Selective Reset
  3. Selective Complement
  4. Selective Insert

Selective Set – The selective set operation sets (makes high) the selected bits of a register. Consider a register A that contains the data. This operation sets the bits in register A where there are corresponding 1’s in register B. It does not affect bit positions that have 0’s in register B. The truth table for the selective set operation is given in the table below.

Bit of Register A
(Before)
Corresponding
Bit of Register B
Bit of Register A
(After)
Operation
000No Change
011Set
101No Change
111Set
Selective Set operation truth table

From the above truth table, it can be noticed that the bits of register A after the operation are obtained from the logic-OR operation of bits in register B and the previous values of register A. Therefore, the OR micro operation can be used to selectively set bits of a register.

Numeric example:

10110110 – Register A (Before)
01101110 – Register B
————————
11111110 – Register A (After)
———————–

Selective Reset (Mask) – The selective reset operation resets (makes low) the selected bits of a register. Consider a register that contains the original data. This operation resets the bits in register A where there are corresponding 0’s in register B. It does not affect bit positions in register A that have corresponding 1’s in register B. The truth table for the selective reset operation is shown in the table below.

Bit of Register A
(Before)
Corresponding
Bit of Register B
Bit of Register A
(After)
Operation
000Reset
010No change
100Reset
111No change
Selective reset operation truth table

From the above truth table, it can be noticed that the bits of register A after the operation are obtained from the logic-AND operation of bits in register B and the previous values of register A. Therefore, the AND micro operation can be used to selectively set bits of a register.

Numeric example:

10110110 – Register A (Before)
01101110 – Register B
————————
00100110 – Register A (After)
———————–

Selective Complement – The selective complement operation complements the selected bits of a register. Consider a register A that contains the data. This operation complements the bits of register A where there are corresponding 1’s in register B. It does not make any change to the bit positions that have 0’s in register B. The table below shows the truth table for the selective complement operation.

Bit of Register A
(Before)
Corresponding
Bit of Register B
Bit of Register A
(After)
Operation
000No change
011Complement
101No change
110Complement
Selective complement operational truth table

It can be seen from the above truth table that the bits of register A after the operation are obtained from the logic Exclusive-OR operation of bits in register B and previous values in register A. Therefore, the Ex-OR micro operation can be used to selectively complement bits of a register.

Numeric example:

1011 0110 – Register A (Before)
0110 1110 – Register B
————————
0010 0110 – Register A (After)
———————–

Selective Insert – The selective insert operation inserts a new value into a group of bits. This operation is a combination of selective reset and selective set operations. This is performed by first selective reset the bits, and selective set them with the required value.

Numeric example: – Let, in a group of eight bits (stored in register A), four most significant bits are required to be 1001.

Step-I

1011 0110 – Register A (Before)
0000 1111 – Register B
————————
0000 0110 – Register A (After selective reset)
———————–

Step-II

0000 0110 – Register A (Before)
1001 0000 – Register B
————————
1001 0110 – Register A (After selective reset)
———————–

Shift Micro Operation

Shift micro operations are used for serial transfer of data. The contents of a register can be shifted to the left or to the right in different ways. There are three types of shifts:

  1. Logical Shift
  2. Circular Shift
  3. Arithmetic Shift.

Logical Shift

The logical shift inserts 0 through the serial input. The symbols shl (Shift left) and shr (Shift right) are used. The figure shows examples of logical shift.

Logical shift example
Logical shift example

The above two micro operations specify a 1-bit shift to the left of the contents of register A and a 1-bit shift to the right of the contents of register B. The bit inserted into the end position is to be 0 during logical shift.

Circular Shift

The circular shift rotates the bits of the register around the two ends without loss of information. This is also known as the rotate operation. Symbols cil (circular left shift) and cir (circular right shift) are used for circular shift. The figure below shows an example of circular shift.

Circular shift example
Circular shift example

The above micro operations circulate the contents of register A in the left direction (1-bit) and the contents of register B in the right direction (1-bit) without loss of information. In circular left shift, the most significant bit will be copied to the least significant bit position, whereas in circular right shift, the least significant bit will be copied to the most significant bit position.

Arithmetic Shift

An arithmetic shift is a micro operation that shifts a signed binary number to the left or right. An arithmetic shift left multiplies a signed binary number by 2. An arithmetic shift right divides the number by 2. The sign of the number remains unchanged after an arithmetic shift. The symbols ashl (arithmetic shift left) and ashr (arithmetic shift right) are used for arithmetic shift. The examples of arithmetic shift are shown in the figure below.

Arithmetic shift examples
Arithmetic shift examples

The above micro operation shows in the figure perform arithmetic shift left to the contents of register A. This inserts a 0 into A0 and shifts all other bits to the left. If An-1 and An-2 are not the same, an error may occur. In the micro operation shown in the above figure, the arithmetic shift leaves the sign bit unchanged, and the same Bn-2 receives the bit from Bn-1, and so on. The bit in B0 is lost.

Hardware Implementation (shifter Circuit)

RTLMicro OperationDescription
A ← shl AShift left register AContents of A shift left by 1-bit position. A ‘0’ is inserted at right most bit. Left most bit is lost.
A ← shr AShift right register AContents of A shift right by 1-bit position. A ‘0’ is inserted at left most bit. Right most bit is lost.
A ← cil ACircular shift left register AContents of register A are circularly shifted right by 1-bit position, the right-most bit goes into left most bit.
A ← cir ACircular shift right register AShifts the contents of A left by 1-bit position. ‘0’ is inserted at the right-most bit position, and the sign bit receives the most significant bit.
A ← ashl AArithmetic shift left register AShifts the contents of A left by 1-bit position. ‘0’ is inserted at the right-most bit position, the sign bit receives the most significant bit.
A ← ashr AArithmetic shift right register AShifts contents of A right by 1-bit position. The sign bit is circulated in at the leftmost bit position.
Shift micro operations

The shift micro operations given in the above table can be implemented using the circuit shown in the figure below. This is a 4-bit shifter, which has four data inputs A0 to A3, and four data outputs F0 to F3. There are two serial inputs, one for shift left (IL) and the other for shift right (IR).

When S=0, the input data are shifted right, and when S=1, the input data are shifted left. The function table is also shown in the figure below.

Shifter circuit logic diagram
Shifter circuit logic diagram
Select Input (S)Output F0Output F1Output F2Output F3
0 (Shift right)IRA0A1A2
1 (Shift left)A1A2A3IL
Shifter circuit functional table

Related questions and answers

What is Micro Operation?

The operation performed on data stored in a register is called a microoperation. The result of a micro operation can be stored in the previous register, or it can be transferred to a new register.

Give some examples of micro operations.

Examples of micro operations are load, store, add, sub, shift, clear, etc.

How can more than one micro operation be represented in RTL?

In the RTL notation, if more than one micro operation is present, these are separated by commas, and the order in which they are written is unimportant. For example, if a system is to perform the transfers R2 ← R1 and R3 ← R4 Whenever control signal is high, this can be written as either
α : R2 ← R1 , R3 ← R4
or
α : R3 ← R4 , R2 ← R1

Classify the micro operations.

The micro operations can be classified as follows:
(i) Arithmetic micro operation
(ii) Logic micro operation
(iii) Shift micro operation

What are the logic circuit applications?

A logic circuit can be used for the following applications:
(i) Selective set
(ii) Selective Reset
(iii) Selective complement
(iv) Selective Insert

Why do we not include multiplication and division as basic arithmetic micro operations?

Multiplication and division are also valid arithmetic operations, but not included in the basic set of micro operations. The reason for this is that in most of the computers, the multiplication operation is implemented with a sequence of addition and shift operations. The division operation is implemented with a sequence of subtraction and shift micro operations.

Explain logic micro operations. Give five examples of logic micro operations.

The logic micro operations include the basic operations like AND, OR, EX-OR, NOT, etc. These operations consider each bit of the register separately and treat it as a binary variable.

Define the selective set and selective reset operation.

The selective set operation sets (makes high) the selected bits of a register, whereas the selective rest operation resets (makes low) the selected bits of a register.

What is a selective complement operation in logic micro operations?

The selective complement operation complements the selected bits of a register. The EX-OR micro operation can be used to implement a selective complement operation on a register.

Explain the selective insert operation.

The selective insert operation inserts a new value into a group of bits. This operation is a combination of selective reset and selective set operations. This is performed by first selective reset the bits, and selective set them with the desired value.

What is a shift micro operation? Write the different types of shifts.

Shift micro operations are used for serial transfer of data. The contents of a register can be shifted to the left or the right in different ways. There are three types of shifts:
(i) Logical Shift
(ii) Circular shift
(iii) Arithmetic shift

Explain the logical shift

The logical shift inserts 0 through the serial input. The symbols shl (shift left) and shr (shift right) are used.

What is circular shift?

The circular shift rotates the bits of the register around the two ends without loss of information. Symbols cil (circular left shift) and cir (circular right shift) are used for circular shift.

Explain the arithmetic shift.

An arithmetic shift is a micro operation that shifts a signed binary number to the left or right. The sign of the number remains unchanged after an arithmetic shift. The symbols ashl (arithmetic shift left) and ashr (arithmetic shift right) are used for arithmetic shift.

Computer System Architecture engineering subjects Computer System Architectureengineering subjects

Post navigation

Previous post
Next post

Computer Architecture fundamentals
Development of Computers
Von Neuman and Harvard machine Architecture
Flynn Classification
Computer Structure Architecture
Interfacing Logic Devices
Levels of Design abstraction
Performance Metrics

Register Transfer Language
Memory Transfer
Arithmetic Micro-operations
Logic Micro-operations
Shift Micro-operations
Bus Architecture
Data Transfer
Central Processing Unit
CPU Bus Architecture

Computer Register and Types
Common Bus System
Instruction Format
Instruction Types
Instruction Cycle
Addressing Modes
Design of a basic computer

Basic function of a Computer
General register organization
Stack organization
Infix to Reverse Polish Notation Conversion
Instruction Types and their classifications
Data transfer and manipulation
Program control
RISC characteristics
CISC characteristics

Pipeline
Types of Pipeline
Arithmetic Pipeline
Instruction Pipeline
Hazards
Vector Processing

Data Representation
Addition and Subtraction
Adder Circuits
Shift and Add Multiplication Method
Booth's Algorithm
Restoring Division Algorithm
Non-Restoring Division Algorithm
Array Multiplier

Memory Classification
Memory Characteristics
Memory Organization
Memory Types
Associative Memory
Cache Memory
Virtual Memory

Input Output Interface
Modes of Data Transfer
Priority Interrupt
Direct Memory Access
Input-Output Processor
Serial Communication

TheCScience

We at TheCScience.com are working towards the goal to give free education to every person by publishing in dept article about Secondary, Senior-Secondary, and Graduation level subjects.

Pages

About US

Contact US

Privacy Policy

DMCA

Engineering Subjects

Internet of Things

Human Values

Digital Communication

Computer System Architecture

Programming Tutorials

Data Structure and Algorithm

C

Java

NCERT

Class 12th

©2026 TheCScience | WordPress Theme by SuperbThemes