Wednesday, September 23, 2026

8 bit data multiplication | 8085 Lab Program

 Section: Arithmetic & Logic Operations

Aim: To multiply two 8 bit numbers stored at consecutive memory locations and also to verify the result.

Apparatus Required: 8085 microprocessor kit, key board.

Algorithm:

  1. Initialize memory pointer to data location.
  2. Move multiplicand to a register.
  3. Move the multiplier to another register.
  4. Clear the accumulator.
  5. Add multiplicand to accumulator.
  6. Decrement multiplier.
  7. Repeat step 5 till multiplier comes to zero.
  8. The result, which is in the accumulator, is stored in a memory location.

Program:

AddressLabelMnemonicsOperandComment
4100STARTLXIH, 4200Initialize HL reg. to 4500
4103MOVB, MTransfer first data to reg. B
4104INXHIncrement HL reg. to point next mem. Location.
4105MVIA, 00HClear the acc.
4107MVIC, 00HClear C reg for carry
4109L1ADDMAdd multiplicand multiplier times.
410AJNCNEXTJump to NEXT if there is no carry
410DINRCIncrement C reg
410ENEXTDCRBDecrement B reg
410FJNZL1Jump to L1 if B is not zero.
4112INXHIncrement HL reg. to point next mem. Location.
4113MOVM, ATransfer the result from acc. to memory.
4114INXHIncrement HL reg. to point next mem. Location.
4115MOVM, CTransfer the result from C reg. to memory.
4116HLTStop the program

Observation:

  • Input:
    • Address 4200: 02
    • Address 4201: 04
  • Output:
    • Address 4202: 08
    • Address 4203: 00

Result: Thus the 8-bit multiplication was done in 8085 μp using repeated addition method and also the result is verified.

Flowchart:

               +-------------------+
               |       START       |
               +---------+---------+
                         |
                         v
               +-------------------+
               |   [HL] <- 4200H   |
               +---------+---------+
                         |
                         v
               +-------------------+
               |    [B] <- [M]     |
               +---------+---------+
                         |
                         v
               +-------------------+
               |  [HL] <- [HL] + 1 |
               +---------+---------+
                         |
                         v
               +-------------------+
               |    [A] <- 00H     |
               |    [C] <- 00H     |
               +---------+---------+
                         |
                         v <------------------+
               +-------------------+          |
               |  [A] <- [A] + [M] |          |
               +---------+---------+          |
                         |                    |
                         v                    |
                       /   \                  |
                     /  Is   \                |
                   /  there a  \              |
                  <   Carry?   >              |
                   \          /               |
                     \      /                 |
                       \  /                   |
                        |                     |
            +-----------+-----------+         |
            |                       |         |
           YES                      NO        |
            |                       |         |
            v                       |         |
  +-------------------+             |         |
  |   [C] <- [C] + 1  |             |         |
  +---------+---------+             |         |
            |                       |         |
            +-----------+-----------+         |
                        |                     |
                        v                     |
              +-------------------+           |
              |   [B] <- [B] - 1  |           |
              +---------+---------+           |
                        |                     |
                        v                     |
                      /   \                   |
                    /  Is   \                 |
                  /   [B] = 0? \              |
                 <             >              |
                  \  Is zero? / -- NO --------+
                    \      /
                      \  /
                        | YES
                        v
              +-------------------+
              |  [HL] <- [HL] + 1 |
              +---------+---------+
                        |
                        v
              +-------------------+
              |    [M] <- [A]     |
              +---------+---------+
                        |
                        v
              +-------------------+
              |  [HL] <- [HL] + 1 |
              +---------+---------+
                        |
                        v
              +-------------------+
              |    [M] <- [C]     |
              +---------+---------+
                        |
                        v
              +-------------------+
              |       STOP        |
              +-------------------+

Viva Questions:

  1. Define two’s complement of an 8-bit numbers.
  2. What is meant by instruction ADC M?
  3. What is the use of the instruction MOV A,M?
  4. What is the function of program counter?
  5. Mention the types of 8085 instruction set.
  6. How will you perform multiplication using ADD instruction?
  7. Describe about DAD B instruction.
  8. What is the purpose of the instruction MOV M,A?


For all 2026 published articles list: click here

…till the next post, bye-bye & take care