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?

Atri Pal

Newbie
Joined
Apr 16, 2021
Messages
2
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Activity points
12
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
 

FenTrac

Full Member level 4
Joined
Jul 6, 2014
Messages
200
Helped
37
Reputation
74
Reaction score
39
Trophy points
28
Location
West Coast
Activity points
1,703
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).
 

KlausST

Super Moderator
Staff member
Joined
Apr 17, 2014
Messages
19,443
Helped
4,299
Reputation
8,603
Reaction score
4,260
Trophy points
1,393
Activity points
128,956
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
 

Atri Pal

Newbie
Joined
Apr 16, 2021
Messages
2
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Activity points
12
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!!
 

LaTeX Commands Quick-Menu:

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top