- Related Questions & Answers
- 8085 program to find sum of digits of 8 bit number
- 8086 program to reverse 8 bit number using 8 bit operation
- 8086 program to reverse 16 bit number using 8 bit operation
- 8086 program to divide a 16 bit number by an 8 bit number
- 8085 program to find square of a 8 bit number
- 8086 program to convert an 8 bit BCD number into hexadecimal number
- 8086 program to multiply two 8-bit numbers
- 8086 program to add two 8 bit BCD numbers
- 8086 program to subtract two 8 bit BCD numbers
- 8085 program to find minimum value of digit in the 8 bit number
- 8085 program to sum of two 8 bit numbers without carry
- 8085 program to find larger of two 8 bit numbers
- 8085 program to find maximum of two 8 bit numbers
- 8085 program to reverse 8 bit number
- C++ program to find sum of digits of a number until sum becomes single digit

- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who

In this program we will see how to add the digits of an 8-bit number.

Write 8086 Assembly language program to add the digits of an 8-bit number stored in memory address 2000H.

To get the digits of an 8-bit number, we can use the masking operation. At first we will mask the upper nibble, and then the lower nibble. After masking the upper nibble, we have to rotate it to the right to make it least significant nibble. Then we can simply add it to the stored nibble to get the sum.

Address | Data |
---|---|

… | … |

2000 | 8A |

… | … |

Address | Data |
---|---|

… | … |

2001 | 12 |

… | … |

Advertisements