<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://community.arm.com/utility/feedstylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>18bit offset binary to BCD conversion help..</title><link>https://community.arm.com/developer/tools-software/tools/f/keil-forum/17355/18bit-offset-binary-to-bcd-conversion-help</link><description> hello forum, 
 
I am new to this platform,by searching my problem on net I was diverted to this site and i like this site. I feel i will get my problem solved. 
 
I want to convert 18bit offset binary data to BCD using 8051 assembly code. ( I have not</description><dc:language>en-US</dc:language><generator>Telligent Community 10</generator><item><title>RE: 18bit offset binary to BCD conversion help..</title><link>https://community.arm.com/thread/38833?ContentTypeID=1</link><pubDate>Mon, 10 Jun 2002 07:24:55 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:15e6dfd7-eb2c-4636-8f36-afd1633393c1</guid><dc:creator>Mihasic Mihmih</dc:creator><description>&lt;p&gt;What do you mean by &amp;quot;18 bit offset binary data&amp;quot;? What is different from just &amp;quot;18 bit binary data&amp;quot;?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: 18bit offset binary to BCD conversion help..</title><link>https://community.arm.com/thread/38838?ContentTypeID=1</link><pubDate>Mon, 10 Jun 2002 07:18:25 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:c362ad34-c518-4633-a1b3-0f6723d3f185</guid><dc:creator>Graham Cole</dc:creator><description>&lt;p&gt;Just in case it helps, for a C algorithm see:&lt;br /&gt;
&lt;br /&gt;
&lt;a href="http://www.keil.com/forum/docs/thread890.asp"&gt;http://www.keil.com/forum/docs/thread890.asp&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
The same algorithm should be straightforward to implement in assembler. In some ways, it is actually easier in assembler. If you know how to do BCD arithmetic using the DA instruction, you will easily be able to keep all the decimal digits compacted into two per byte.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>