13 Jun 2026

Addition, Subtraction, and Multiplication Using the 8085 Microprocessor

practical pg-iv electronics 8085 microprocessor arithmetic

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

8085 microprocessor arithmetic-programming setup
The trainer accepts the program and data, executes the arithmetic instructions, and displays the result and status flags.

Theory

An arithmetic operation in a microprocessor begins with operands stored in registers or memory. During the fetch-decode-execute cycle, the program counter selects an instruction, the decoder identifies the operation, and the arithmetic-logic unit performs it. The 8085 is an 8-bit microprocessor: its arithmetic-logic unit processes one byte at a time, while the accumulator receives the main operand and result.

Addition uses ADD or ADC, subtraction uses SUB or SBB, and multiplication is commonly performed by repeated addition because the 8085 has no single multiplication instruction. After an operation, the flag register records information needed by later instructions. The carry flag records an unsigned overflow, the zero flag records a zero result, and the sign flag records the most significant bit. For multiplication, the partial sum is repeatedly increased by the multiplicand until the multiplier count becomes zero.

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$.

Maxima Code

Download the 8085 arithmetic check.

Result

The three programs execute correctly and the displayed accumulator/memory values agree with the expected arithmetic results.

Viva Questions

  1. Why is multiplication done by repeated addition? The 8085 instruction set has no direct multiply instruction.
  2. What does the carry flag indicate? Carry out of the most significant bit in unsigned arithmetic.
  3. What is the accumulator used for? It is the main operand and result register of the ALU.
© Rajesh Kumar, SKMU · Physics Lecture Notes · rajeshphy.github.io

Discussion

Share This Page