Add Two 8 Bit Number

Sunny Bhaskar

11/6/20241 min read

Algorithm
  1. Load the first number (04H) into the accumulator.

  2. Add the second number (02H) to the contents of the accumulator.

  3. Store the result in a specified memory location (e.g., 2050H).

  4. Halt the program.

Program

MVI A, 04H ; Load 04H into accumulator A

ADI 02H ; Add 02H to A

STA 2050H ; Store the result (06H) at memory location 2050H

HLT ; Halt the program

Address

Prayagraj Phaphamau

Contacts

7518998334
sunnygamingyt298@gmail.com

Subscribe to our newsletter