Code360 powered by Coding Ninjas X Naukri.com. Code360 powered by Coding Ninjas X Naukri.com
Table of contents
1.
Introduction
2.
Arithmetic Instruction
3.
Logical and Bit manipulation Instruction
4.
Shift Instructions
5.
Frequently Asked Question
5.1.
What are the different types of data manipulation?
5.2.
What are data transfer and data manipulation instructions?
5.3.
What are the different types of instructions in the 8086 microprocessor?
6.
Conclusion
Last Updated: Mar 27, 2024

Data Manipulation Instruction

Author Aryan Raj
1 upvote
gp-icon
Data structures & algorithms (Beginner to Intermediate)
Free guided path
13 chapters
99+ problems
gp-badge
Earn badges and level up

Introduction

Data manipulation instructions are those instructions that manipulate or change the content of the data/registers/memory. It performs operations on data and provides the computational capabilities of the Computer.

Data manipulation instructions can be categorized into three parts:

1) Arithmetic instruction 

2) Logical and bit manipulation instructions 

3) Shift instructions 

Recommended Topic, Microinstruction in Computer Architecture

Arithmetic Instruction

Arithmetic instructions include increment, decrement, add, subtract, multiply, divide, add with Carry, subtract with Borrow, negate that is (2’s) two's complement. If there’s a negative number, it is considered as negate (so two's complement). 

Generally, most computers carry instructions for all four of these operations. If computers have only addition(ADD) and possibly subtraction(SUB) instructions, the other two operations, i.e. multiplication(MUL) and division(DIV) must be generated using software subroutines. These four basic arithmetic operations are sufficient for solving scientific problems when expressed in numerical analysis methods.

The table given below shows the Arithmetic Instructions:

Name

Mnemonic

Increment

INC

Decrement

DEC

Add

ADD

Subtract

SUB

Multiply

MUL

Divide

DIV

Add with carry

ADDC

Subtract with borrow

SUBB

 

Get the tech career you deserve, faster!
Connect with our expert counsellors to understand how to hack your way to success
User rating 4.7/5
1:1 doubt support
95% placement record
Akash Pal
Senior Software Engineer
326% Hike After Job Bootcamp
Himanshu Gusain
Programmer Analyst
32 LPA After Job Bootcamp
After Job
Bootcamp

Logical and Bit manipulation Instruction

We are having another list of instructions that is logical and bit manipulation instructions starting with clear (that means clear the content of accumulator), complement the accumulator, AND, OR, Exclusive-OR, Clear carry, Set carry, Complement carry, Enable interrupts, Disable interrupts, all these are logical and bit manipulation instructions.

These logical instructions consider each operand bit individually and treat it as a Boolean variable. Basically, logical instructions help perform binary operations on strings of bits stored in registers. 

  • Clear instruction means making all the bits of a register ‘0’.
  • AND instruction is sometimes referred to as bit clear instruction or mask.
  • OR instruction is sometimes referred to as bit set instruction.
  • Set instruction means making all the bits of a register ‘1’. 
  • XOR instruction is referred to as bit complement instruction.

Recommended Topic - Shift Registers in Digital Electronics

Name

Mnemonic

Clear

CLR

Complement

COM

AND

AND

OR

OR

Exclusive-OR

XOR

Clear carry

CLRC

Set Carry

SETC

Complement Carry

COMC

Enable Interrupt

EI

Disable Interrupt

DI

 

Shift Instructions

Shift instructions allow the bits of a memory byte or register to be shifted one-bit place to the right or the Left. 

There are basically two types of shift instructions — arithmetic and logical. Arithmetic shifts consider the contents of the memory byte or register to be a signed number. So, when the shift is made, the number is arithmetically divided by two (right shift) or multiplied by two (left shift). Logical shifts consider the contents of the register or memory byte to be just a bit pattern when the shift is made.

  • OP is opcode field 
  • RL (It tells whether to shift it right or left). 
  • REG (It determines which register is to be shifted).
  • COUNT (It tells the number of places to be shifted).
  • TYPE( It tells the type of shifting from the list given below). 
     

In right-shift operations, zeros are shifted into high-order vacated positions. And in the case of the left-shift operation, shifts the zero into low-order vacated positions. 

Name

Mnemonic

Logical Shift Right

SHR

Logical Shift Left

SHL

Arithmetic Shift Right

SHRA

Arithmetic Shift Left

SHLA

Rotate Right

ROR

Rotate Left

ROL

Rotate Right through carry

RORC

Rotate Left through carry

ROLC

Read about Register in Computer

Frequently Asked Question

What are the different types of data manipulation?

Some basic types of data manipulation carried out in computers are carrying out logic operations on data, moving unchanged data, carrying out arithmetic operations on data, and testing data.

What are data transfer and data manipulation instructions?

Data transfer instruction causes data transfer from one location to another. Data manipulation performs arithmetic, logic, and shift operations. Program control instructions provide decision-making capabilities and change the path taken by the program when executed on the computer. 

What are the different types of instructions in the 8086 microprocessor?

The different types of instructions in the 8086 microprocessor are String Instructions, Data Transfer Instructions, Bit Manipulation Instruction, Arithmetic Instructions, Iteration Control Instructions, Program Execution Transfer Instructions (Branch & Loop Instructions), Processor Control Instructions, Interrupt Instructions

Conclusion

In this blog, we have discussed Data Manipulation instruction with its subcategory like Arithmetic, Logical and bit manipulation instructions, and Shift instructions.

If you are pursuing a new career and are interested in exploring fields like web development and want to learn DSA, you can look for our Guided path for DSA, which is free!  

Recommended Reading: Data Warehouse Architecture

We hope that this blog has helped you enhance your knowledge regarding Data Manipulation Instruction and if you would like to learn more, check out our articles on Bus and Memory Transfer, Asynchronous Data Transfer, and Data Transfer Instructions.

Happy Learning, Ninja!

This course will help you!

Previous article
Data Transfer Instructions
Next article
Program Control Instructions
Guided path
Free
gridgp-icon
Data structures & algorithms (Beginner to Intermediate)
13 chapters
109+ Problems
gp-badge
Earn badges and level up
Live masterclass