Arithmetic Operations

Filter Course


Arithmetic Operations

Published by: Nuru

Published date: 17 Jun 2021

Arithmetic Operations Photo

Arithmetic Operations

The 8085 microprocessor performs various arithmetic operations, such as addition, subtraction, increment, and decrement. These arithmetic operations have the following mnemonics.

INTRODUCTION TO 8085 ARITHMETIC INSTRUCTIONS

 ADD: Add Add the contents of a register.
 ADI: Add Immediately Add 8-bit data.
 SUB: Subtract Subtract the contents of a register.
 SUI: Subtract Immediately Subtract 8-bit data.
 INR: Increment Increase the content of register by1.
 DCR: Decrement Decrease the content of register by1.

The arithmetic operations ADD and Subtract are performed in relation to the contents of the accumulator. However, the Increment or the Decrement operations can be performed in any register. The instructions for these operations are explained below:

INSTRUCTIONS

These arithmetic instructions(except INR and DCR)

  1. assume implicitly that the accumulator is one of the operands.
  2. modify all the flags according to the data conditions of the result.
  3. place the result in the accumulator.
  4. do not affect the contents of the operand register.

The instructions INR and DCR

  1. affects the content of the specified register.
  2. affect all flags except the CY flag.

The descriptions of the instructions (including INR and DCR) are as follows:

Opcode Operand Description
  ADD R

ADD

  • It is a 1-byte instruction.
  • Adds the contents of register R to the contents of the accumulator.
  ADI 8-bit

Add Immediately

  • It is 2-byte instructions.
  • Adds the second byte to the contents of the accumulator
  SUB R+

Subtract

  • This is 1-byte instruction.
  • Subtract the contents of register R from the contents of the accumulator.
  SUI 8-bit

Subtract Immediately

  • It is a 2-byte instruction.
  • Subtracts the byte from the contents of the accumulator.
  INR R*

Increment

  • This is 1-byte instruction.
  • Increases the contents of register R by 1
    Caution: All flags except the CY are affected
 DCR R*

Decrement

  • This is 1-byte instruction.
  • Decreases the contents of register R by 1
    Caution: All flags except the CY are affected.

So, These are the arithmetic operations/ instructions of the 8085 microprocessor.