0% found this document useful (0 votes)
26 views1 page

CMA Instruction in 8085 Microprocessor

The document describes how to find the one's complement of a number stored in memory using an 8085 microprocessor. It involves loading the number into the accumulator, using the CMA instruction to complement each bit to invert it, then storing the result back in memory. The algorithm has three steps - get the number, complement it, and store the result. A flowchart and sample program are provided to demonstrate the process.

Uploaded by

manpreet kaur
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
26 views1 page

CMA Instruction in 8085 Microprocessor

The document describes how to find the one's complement of a number stored in memory using an 8085 microprocessor. It involves loading the number into the accumulator, using the CMA instruction to complement each bit to invert it, then storing the result back in memory. The algorithm has three steps - get the number, complement it, and store the result. A flowchart and sample program are provided to demonstrate the process.

Uploaded by

manpreet kaur
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd

Microprocessor 8085

Appendix A

Explanation :

Ones complement of number means to invert each bit of that number. So our task is to complement
each bit of number.
We will first load the number whose 1s complement is to be found in
the accumulator.

Using the CMA instruction we will complement the accumulator.


This is 1s complement of the number.
Store the result at memory location C100 H.

Algorithm :

Step I : Get the number


Step II : Complement the number
Step III : Store the result.

Flowchart : Refer flowchart 9

Program :

Instruction
LDA C200H
CMA
STA C100H
HLT

Operation

Comments

; C200 A ; Get the number


; A; Complement number
;
; Store the result
; Stop
; Terminate program execution

Flowchart 9

You might also like