Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

How to find 1's and 2's complement without using CMA operation in 8085 microprocessor?

Status
Not open for further replies.

Atri Pal

Newbie
Joined
Apr 16, 2021
Messages
5
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Activity points
31
In this problem, the given number is located at 8000H location. After finding the 1’s
complement and 2’s complement the result locations are 9000H and 9001H respectively.

address - 8000
data - FD
 

Subtract FD from FF to get the 1's compliment ( 00000010 ), and add 1 to the 1's complement to get the 2's complement ( 00000011 ).
Uses the add and subtract instructions, but not compare accumulator instruction ( CMA).
 
Hi,

A simple internet search gives many results.
BTW: the problrm is not related to 8051 .. it's the same with all processors.

Hints: XOR, INV, COM, ADD, INC, SUB...even a lookup table is possible.

Klaus
 

Subtract FD from FF to get the 1's compliment ( 00000010 ), and add 1 to the 1's complement to get the 2's complement ( 00000011 ).
Uses the add and subtract instructions, but not compare accumulator instruction ( CMA).
Thanks!! It worked!!
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top