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.

6 digit decimal to hexadecimal conversion in assembly

Status
Not open for further replies.

Sharath411

Member level 1
Joined
Mar 27, 2010
Messages
38
Helped
2
Reputation
4
Reaction score
2
Trophy points
1,288
Location
Bangalore
Activity points
1,529
Hi friends


I want to convert a 6 digit decimal no into binary or hex format in assembly language. Please tell me how it could be done

I did for 5 digit conversion now i want for 6digit pl help me


Thank you
 

KerimF

Advanced Member level 4
Joined
May 17, 2011
Messages
1,461
Helped
374
Reputation
756
Reaction score
370
Trophy points
1,363
Location
Syria
Activity points
12,314
It is good you know how to do it for 5-digit because I have to work on it if I will need it :)
But I can't see why 6-digit conversion has to be different from the 5-digit one.
First, 5 decimal digits (maximum 99999) will result if converted to binary as 3 bytes. The same applies for 6 decimal digits.
Second, after you multiply the 6th digit by 10 and add the result to the 5th one, you can continue to get the 3-byte result by using your method of the 5-digit conversion.

Kerim
 

Sharath411

Member level 1
Joined
Mar 27, 2010
Messages
38
Helped
2
Reputation
4
Reaction score
2
Trophy points
1,288
Location
Bangalore
Activity points
1,529
Hi

Thanks for your reply...

Actually i did the conversion for till 65535 after that i don't know how to do for the next counts so I am asking for help....


Thank you..

---------- Post added at 10:51 ---------- Previous post was at 10:49 ----------

Are the six digits in binary code decimal (BCD) or ASCII? Or something else?

I am using the BCD

Thank you
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top