# Find the 2’s complement of a Number in 8085

In this program, we are going to write an assembly language program to Find the 2’s complement of a Number in 8085 microprocessor with a program flow chart and explanation of the program.

## 2’s complement of a Number in 8085

### Program Statement

Find the 2’s complement of a Number in 8085 stored at memory location C200H and store the complemented number at memory location C3ooH.

### Explanation of Program

• 2’s complement means adding 1 to 1’s complement of that number.
• We will load the number in the accumulator. Then using CMA instruction we will complement the accumulator. This is 1’s complement of that number.
• Now we will add 1 to this complemented number to get 2’s complement of that number.
• Store the result at memory location C300H.
• Let A = 44 H
• i.e. A = 0100 0100 (44 H)
• 1’s complement of A: 1011 1011 ( BB H)
• Now add + 1 to A
• 2’s complement of A: 1011 1100 (BC H)
• The 2’s complement of the number BC H. We will store this result in memory location C300H.

### Flow Chart of Program

Hello friends, my name is Trupal Bhavsar, I am the Writer and Founder of this blog. I am Electronics Engineer(2014 pass out), Currently working as Junior Telecom Officer(B.S.N.L.) also I do Project Development, PCB designing and Teaching of Electronics Subjects.

This site uses Akismet to reduce spam. Learn how your comment data is processed.