13 Jun 2026
Addition, Subtraction, and Multiplication Using the 8085 Microprocessor
Aim
To write and execute 8085 programs for addition, subtraction, and multiplication of two 8-bit numbers.
Apparatus
8085 microprocessor trainer, keyboard, monitor or serial terminal, power supply, and connecting leads.
Experimental arrangement

Theory
The 8085 stores every operand as an 8-bit binary word. Before an arithmetic instruction can operate, the program places one operand in the accumulator and the other in a general register or memory location. During the fetch-decode-execute cycle, the program counter supplies the address of the next opcode, the control unit decodes it, and the arithmetic-logic unit performs the specified binary operation. The result normally returns to the accumulator.
For addition, ADD r performs
whereas ADC r also includes the previous carry. If the sum exceeds $FF_{16}$, only the lower eight bits remain in $A$ and the carry flag becomes one. Subtraction is carried out internally by adding the two’s complement of the subtrahend. Thus SUB r performs $A\leftarrow A-r$; in 8085 convention, the carry flag is set when a borrow is required. SBB includes the previous borrow.
Each result updates the sign, zero, auxiliary-carry, parity, and carry flags. These flags are not decorative outputs: conditional jump instructions use them to control program flow. Since the 8085 has no hardware multiply instruction, multiplication is implemented by repeated addition. The multiplicand is added to a partial sum while the multiplier register is decremented to zero. For an 8-bit by 8-bit product, a register pair should be used because the result may require sixteen bits. A correct practical therefore verifies both the numerical result and the relevant flag or high-byte condition.
Sample verification
| Operation | Operand 1 | Operand 2 | Expected result |
|---|---|---|---|
| addition | 25H | 17H | 3CH |
| subtraction | 35H | 12H | 23H |
| multiplication | 06H | 04H | 0018H |
Calculation
The hexadecimal operands are first interpreted as their decimal values for checking:
\[25_H+17_H=37+23=60=3C_H.\]For subtraction,
\[35_H-12_H=53-18=35=23_H.\]The 8085 has no multiplication instruction, so the program adds $06_H$ four times:
\[06_H+06_H+06_H+06_H=24_{10}=18_H.\]Since the product is larger than one byte only when it exceeds $FF_H$, it is stored here as the two-byte result $0018_H$.
Result
The three programs execute correctly and the displayed accumulator/memory values agree with the expected arithmetic results.
Viva Questions
- Why is multiplication done by repeated addition? The 8085 instruction set has no direct multiply instruction.
- What does the carry flag indicate? Carry out of the most significant bit in unsigned arithmetic.
- What is the accumulator used for? It is the main operand and result register of the ALU.
Discussion