- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Instruction to complement Accumulator in 8085 Microprocessor
In 8085 Instruction set, logical type there is one complement instruction with the mnemonic CMA. It actually stands for “CoMplement the Accumulator”. It performs1's complement operation on the current contents of Accumulator, and the result is stored back in the Accumulator replacing its previous contents. It is to be noted that, there are no other instructions tocomplement any other register’s contents. Though it is a logicaltype of instruction, Flag bits are not affected by the execution of this instruction. It occupies only 1 Byte in memory.
Mnemonics,Operand | Opcode(in HEX) | Bytes |
---|---|---|
CMA | 2F | 1 |
Let us suppose that example, the initial content of Accumulator is AAH i.e. 1010 1010 CMA requires. So after execution of CMA instructionAccumulator will the Accumulatorsupdated contents will be 0101 0101 in binary i.e. 55H. I we an example CMA instruction twice then the content of the in binary become AAH i.e. 1010 1010 in the binary back again.
Address | Hex Codes | Mnemonic | Comment |
---|---|---|---|
2000 | 3E | MVI A, 55H | A ← 55H =0101 0101B |
2001 | 55 | 55H as operand | |
2002 | 2F | CMA | A ← 1’sComplement of 0101 0101B = 1010 1010B = AAH |
2003 | 2F | CMA | A ← 1’sComplement of 1010 1010B = 0101 0101B = 55H |
The timing diagram against this instruction CMA execution is as follows –
Summary − So this instruction CMA requires 1-Byte, 1-Machine Cycle (Opcode Fetch) and 4 T-States for execution as shown in the timing diagram.
- Related Articles
- Instructions to rotate Accumulator in 8085 Microprocessor
- Reset Accumulator (8085 & 8086 microprocessor)
- Accumulator or Register A in 8085 Microprocessor
- DAA instruction in 8085 Microprocessor
- Instruction cycle in 8085 Microprocessor
- IN a8 instruction in 8085 Microprocessor
- Unconditional JUMP instruction in 8085 Microprocessor
- OUT a8 instruction in 8085 Microprocessor
- Instruction type XCHG in 8085 Microprocessor
- Instruction type CMC in 8085 Microprocessor
- Instruction type STC in 8085 Microprocessor
- Instruction type RLC in 8085 Microprocessor
- Instruction type RAL in 8085 Microprocessor
- Instruction type RRC in 8085 Microprocessor
- Instruction type RAR in 8085 Microprocessor
