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.

[SOLVED] What is working of "DA A" instruction in 8051 assembly language?

Status
Not open for further replies.

PRATIK.PATI

Newbie level 6
Joined
Jun 7, 2017
Messages
11
Helped
1
Reputation
2
Reaction score
1
Trophy points
3
Location
Bangalore
Activity points
95
Hello,
DA A- decimal adjust accumulator after addition.
how the instruction "DA A" is used in 8051 assembly language.
kindly provide some examples with decimal numbers with it.

can it be used to convert binary numbers into BCD?
thank you!
 

I did not found some appropriate examples for it. Well Can it be used to convert hexadecimal values into BCD directly?
 

I did not found some appropriate examples for it. Well Can it be used to convert hexadecimal values into BCD directly?

No, read the much more descriptive text on BCD in the following link
https://what-when-how.com/8051-microcontroller/arithmetic-instructions/

It's expressly for correcting the addition of two BCD numbers and not for converting a binary number to BCD.
e.g. 0x20 would result in 0x20 if DA A was used as there is nothing to correct so the result won't be BCD 0x32.
 
Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top