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 Addition Operation Subtraction Operation 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 + RLength1 byteAddressing modeRegister addressing modeFlagsAll 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 byteAddressing modeIndirect addressing modeFlagsAll 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 byteAddressing modeImmediate addressing modeFlagsAll 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 + CYLength1 byteAddressing modeRegister addressing modeFlagsAll 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] + CYLength1 byteAddressing modeIndirect addressing modeFlagsAll 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 + CYLength2 byteAddressing modeImmediate addressing modeFlagsAll 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 + RpLength1 byteAddressing modeRegister addressing modeFlagsOnly 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 – RLength1 byteAddressing modeRegister addressing modeFlagsAll 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 byteAddressing modeIndirect addressing modeFlagsAll 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 – dataLength1 byteAddressing modeIndirect addressing modeFlagsAll 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 – CYLength1 byteAddressing modeRegister addressing modeFlagsAll 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] – CYLength1 byteAddressing modeIndirect addressing modeFlagsAll 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 – CYLength2 byteAddressing modeImmediate addressing modeFlagsAll 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 + 1Length1 byteAddressing modeRegister addressing modeFlagsExcluding 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] + 1Length1 byteAddressing modeIndirect addressing modeFlagsExcluding the carry flag (CY), all flags are affected according to the result. INX RpIncrement the contents of the register pair RpOperationRp ← Rp + 1Length1 byteAddressing modeRegister addressing modeFlagsNo flags are affected. DCR RDecrement the contents of register ROperationR ← R – 1Length1 byteAddressing modeRegister addressing modeFlagsExcluding 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] – 1Length1 byteAddressing modeIndirect addressing modeFlagsExcluding the carry flag (CY), all flags are affected according to the result. DCX RpDecrement the contents of the register pair RpOperationRp ← Rp – 1Length1 byteAddressing modeRegister addressing modeFlagsNo 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