I need to do a conversion drill, bringing two random numbers, ask for the solutiion, and if wrong then show how to do it. something like this. I can convert numbers but my problem is showing the solution step by step Some help would be highly appreciated.. I have attached a print screen of how I want it, or just copy and paste this html code and you can see. THanks for any hint..
For this problem, the sequence looks like the following:</p><p>
<table><tbody><tr><td align="right"></td></tr><tr><td align="right"><font size="5"><code><b> 11<font color="red">1</font></b></code></font></td></tr>
<tr><td align="right"><font size="5"><code><b> 10<font color="red">1</font></b></code></font></td></tr>
<tr><td align="right"><font size="5"><code><b>----</b></code></font></td></tr>
<tr><td align="right"><font size="5"><code><b><font color="blue">0</font></b></code></font></td></tr></tbody></table><br>
For this column, <font size="5"><code><b>1</b></code></font><font size="5"><code><b> + 1</b></code></font> is equal to <font size="5"><code><b>2</b></code></font> (decimal).<br>
Since the sum is greater than <b>1</b>, you carry a <b>2</b> to the<br>
next column (represented as a carry of 1)<br>
and subtract <b>2</b> from this column (<b>2 - 2</b>), leaving <b>0</b>.
</p><p></p><hr width="60%">
<table><tbody><tr><td align="right"><font color="red" size="5"><code><b>1 </b></code></font></td></tr>
<tr><td align="right"><font size="5"><code><b> 1<font color="red">1</font>1</b></code></font></td></tr>
<tr><td align="right"><font size="5"><code><b> 1<font color="red">0</font>1</b></code></font></td></tr>
<tr><td align="right"><font size="5"><code><b>----</b></code></font></td></tr>
<tr><td align="right"><font size="5"><code><b><font color="blue">0</font>0</b></code></font></td></tr></tbody></table><br>
For this column, <font size="5"><code><b>1</b></code></font> (the previous carry)<font size="5"><code><b> + </b></code></font><font size="5"><code><b>1</b></code></font><font size="5"><code><b> + 0</b></code></font> is equal to <font size="5"><code><b>2</b></code></font> (decimal).<br>
Since the sum is greater than <b>1</b>, you carry a <b>2</b> to the<br>
next column (represented as a carry of 1)<br>
and subtract <b>2</b> from this column (<b>2 - 2</b>), leaving <b>0</b>.
<p></p><hr width="60%">
<table><tbody><tr><td align="right"><font color="red" size="5"><code><b>1 </b></code></font></td></tr>
<tr><td align="right"><font size="5"><code><b> <font color="red">1</font>11</b></code></font></td></tr>
<tr><td align="right"><font size="5"><code><b> <font color="red">1</font>01</b></code></font></td></tr>
<tr><td align="right"><font size="5"><code><b>----</b></code></font></td></tr>
<tr><td align="right"><font size="5"><code><b><font color="blue">1</font>00</b></code></font></td></tr></tbody></table><br>
For this column, <font size="5"><code><b>1</b></code></font> (the previous carry)<font size="5"><code><b> + </b></code></font><font size="5"><code><b>1</b></code></font><font size="5"><code><b> + 1</b></code></font> is equal to <font size="5"><code><b>3</b></code></font> (decimal).<br>
Since the sum is greater than <b>1</b>, you carry a <b>2</b> to the<br>
next column (represented as a carry of 1)<br>
and subtract <b>2</b> from this column (<b>3 - 2</b>), leaving <b>1</b>.
<p></p><hr width="60%">
<table><tbody><tr><td align="right"><font color="red" size="5"><code><b>1 </b></code></font></td></tr>
<tr><td align="right"><font size="5"><code><b> 111</b></code></font></td></tr>
<tr><td align="right"><font size="5"><code><b> 101</b></code></font></td></tr>
<tr><td align="right"><font size="5"><code><b>----</b></code></font></td></tr>
<tr><td align="right"><font size="5"><code><b><font color="blue">1</font>100</b></code></font></td></tr></tbody></table><br>
For this column, <font size="5"><code><b>1</b></code></font> (the previous carry)<font size="5"><code><b> + </b></code></font><font size="5"><code><b>0</b></code></font><font size="5"><code><b> + 0</b></code></font> is equal to <font size="5"><code><b>1</b></code></font> (decimal).<br>
Since the sum is less than <b>2</b> (the base), you write down this sum<br>
and carry a <b>0</b> to the next column.
<p></p><hr width="60%">
<p>The final answer is <font size="5"><code><b>1100<sub>2</sub>