0
\$\begingroup\$

If two 8 bit numbers are added in 8085 microprocessor, will it give 16 bit result, if so where it will be stored, because Accumulator can store only 8 bit.

\$\endgroup\$
1
  • 1
    \$\begingroup\$ Typically addition will result in 8bit, but set a carry or overflow flag. Don't know specifically about 8085 \$\endgroup\$ Commented May 2, 2018 at 10:02

1 Answer 1

2
\$\begingroup\$

No, the 8085 indeed only has an 8-bit accumulator.

In case there is an overflow during the addition, this will be indicated using the carry bit within the status register.

You can either test this bit, or perhaps make use of the ADC instruction, which not only adds another thing to the accumulator, but it also takes the carry input from the status register. That way you could perhaps get some 16-bit result.

Or maybe you could use one of the DAD instructions, and set the higher registers to zero, and using the lower registers as inputs for your thing.

Either way, read the manual. :)

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.