Skip to content
The Computer Science
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
The Computer Science
TheCScience

8085 Microprocessor Arithmetic Instructions

YASH PAL, March 18, 2026March 18, 2026

8085 Microprocessor Arithmetic Instructions – Arithmetic instructions are used to perform addition, subtraction, increment, and decrement operations over the data in the register or memory. Addition and subtraction operations are performed in relation to the contents of the accumulator. It means that one of the operands is always the accumulator for these two operations. The result of addition and subtraction is also stored in the accumulator. In case of increment and decrement operations, the result will be stored in the operand only.

Arithmetic Instructions of 8085 Microprocessor

  1. Addition Operation
  2. Subtraction Operation
  3. Increment/Decrement Operation

Addition Operation

Any 8-bit number, or the contents of a register, or the contents of a memory location can be added to the contents of the accumulator, and the sum is stored in the accumulator.

ADD RAdd the contents of register R to the contents of the accumulator.
OperationA ← A + R
Length1 byte
Addressing modeRegister addressing mode
FlagsAll flags are affected according to the result stored in the accumulator.
ADD MAdd the contents of the memory location pointed by register pair HL to the contents of the accumulator.
OperationA ← A + [HL]
Length1 byte
Addressing modeIndirect addressing mode
FlagsAll flags are affected according to the result stored in the accumulator.
ADI data (8-bit)Add 8-bit immediate data to the accumulator and store the result in the accumulator.
OperationA ← A + data (8-bit)
Length2 byte
Addressing modeImmediate addressing mode
FlagsAll flags are affected according to the result stored in the accumulator.
ADC RAdd the contents of register R and the status of the carry flag 0 or 1 to the contents of the accumulator. The result is stored in the accumulator.
OperationA ← A + R + CY
Length1 byte
Addressing modeRegister addressing mode
FlagsAll flags are affected according to the result stored in the accumulator.
ADC MAdd the contents of the memory location pointed by the HL register pair and the status of the carry flag 0 or 1 to the contents of the accumulator. The result is stored in the accumulator.
OperationA ← A + [HL] + CY
Length1 byte
Addressing modeIndirect addressing mode
FlagsAll flags are affected according to the result stored in the accumulator.
ACI data (8-bit)Add 8-bit immediate data and the status of the carry flag 0 or 1 to the contents of the accumulator; the result is stored in the accumulator.
OperationA ← A + data + CY
Length2 byte
Addressing modeImmediate addressing mode
FlagsAll flags are affected according to the result stored in the accumulator.
DAD RpAdd the contents of register pair Rp to the contents of HL register pair. The result is stored in the HL register pair.
OperationHL ← HL + Rp
Length1 byte
Addressing modeRegister addressing mode
FlagsOnly the carry flag is affected

Subtraction Operation

Any 8-bit number, or the contents of a register, or the contents of a memory location can be subtracted from the contents of the accumulator, and the result is stored in the accumulator. The 8085 microprocessor performs subtraction by the method of 2’s complement. The 8085 performs the following steps internally to execute the subtraction operation.

  • Step 1: Convert the subtrahend (the number to be subtracted) into its 1’s complement.
  • Step 2: 2’s complement is obtained by adding 1 to the 1’s complement of the subtrahend.
  • Step 3: Add 2’s complement to the minuend.
  • Step 4: Complement the carry flag. This shows the borrow of the operation.
SUB RSubtract the contents of register R from the contents of the accumulator and store the result in the accumulator.
OperationA ← A – R
Length1 byte
Addressing modeRegister addressing mode
FlagsAll flags are affected according to the result.
SUB MSubtract the contents of the memory location pointed by register pair HL from the contents of the accumulator. Store the result in the accumulator.
OperationA ← A – [HL]
Length1 byte
Addressing modeIndirect addressing mode
FlagsAll flags are affected according to the result.
SUI data (8-bit)Subtract 8-bit immediate data from the contents of the accumulator. Store the result in the accumulator.
OperationA ← A – data
Length1 byte
Addressing modeIndirect addressing mode
FlagsAll flags are affected according to the result.
SBB RSubtract the contents of register R and the status of the carry (borrow) flag from the contents of the accumulator.
OperationA ← A – R – CY
Length1 byte
Addressing modeRegister addressing mode
FlagsAll flags are affected according to the result.
SBB MSubtract the contents of the memory location pointed by the HL register pair and the status of the carry (borrow) flag from the contents of the accumulator.
OperationA ← A – [HL] – CY
Length1 byte
Addressing modeIndirect addressing mode
FlagsAll flags are affected according to the result.
SBI data (8-bit)Subtract 8-bit immediate data and status of carry (borrow) flag from the contents of the accumulator.
OperationA ← A – data – CY
Length2 byte
Addressing modeImmediate addressing mode
FlagsAll flags are affected according to the result.

Increment/Decrement Operation

The 8-bit contents of a register, or the contents of a memory location, or the contents of a register pair can be incremented or decremented. The result of increment/decrement is stored in the same operand.

INR RIncrement the contents of register R.
OperationR ← R + 1
Length1 byte
Addressing modeRegister addressing mode
FlagsExcluding the carry flag (CY), all flags are affected according to the result.
INR MIncrement the contents of the memory location pointed to by the register pair HL.
Operation[HL] ← [HL] + 1
Length1 byte
Addressing modeIndirect addressing mode
FlagsExcluding the carry flag (CY), all flags are affected according to the result.
INX RpIncrement the contents of the register pair Rp
OperationRp ← Rp + 1
Length1 byte
Addressing modeRegister addressing mode
FlagsNo flags are affected.
DCR RDecrement the contents of register R
OperationR ← R – 1
Length1 byte
Addressing modeRegister addressing mode
FlagsExcluding the carry flag (CY), all flags are affected according to the result.
DCR MDecrement the contents of the memory location pointed to by the HL register pair.
Operation[HL] ← [HL] – 1
Length1 byte
Addressing modeIndirect addressing mode
FlagsExcluding the carry flag (CY), all flags are affected according to the result.
DCX RpDecrement the contents of the register pair Rp
OperationRp ← Rp – 1
Length1 byte
Addressing modeRegister addressing mode
FlagsNo flags are affected.

Note: Increment/Decrement operations do not affect the carry flag (CY). Two instructions, INX and DCX, do not affect any flag.

engineering subjects Microprocessor microprocessor

Post navigation

Previous post
Next post

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

Our Tools

Hosting - get 20% off

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