How do i make text = integers
<p>I have a problem that i've been trying to solve for days.
I was wondering if it was possible to let a text turn into an integer. 
So everytime i write in my textarea("ALC") Load, then on the textarea("MLC") 001. And also including 1-15 to binary at the end
E.g. Load #1 will show 001 0 00001</p>

<pre><code>&lt;html&gt;
&lt;head&gt;
&lt;center&gt;&lt;font size ="24"&gt; Simple Assembler &lt;/font&gt;&lt;/center&gt;
&lt;script type="text/javascript"&gt;
    var Load = "001";
    var Store = "010";
    var Add = "011";
    var Sub = "100";
    var Equal = "101";
    var Jump = "110";
    var Halt = "111";
    var # = "1";


&lt;/script&gt;
&lt;/head&gt;
&lt;body&gt;

&lt;form name="AssemblyLanguagecode" action="" method=""&gt;
&lt;textarea Id="ALC" style="resize:none;width:35%;height:35%;margin-left:15%" value=""&gt;Insert Assembly Language Code&lt;/textarea&gt;
&lt;textarea Id="MLC" style="resize:none;width:35%;height:35%;" ReadOnly="True"&gt;Machine Language Code will be displayed here&lt;/textarea&gt;&lt;br  /&gt;
&lt;p align="center"&gt;&lt;input type="button" value="Assemble" onclick="ALCtoMLC()";" /&gt;&lt;/p&gt;
&lt;/form&gt;


&lt;script type= "text/javascript"&gt;

function ALCtoMLC() {   
    var x = document.getElementById("ALC").value;
    x = parseInt(x);
    var bin = x.toString(2);



document.getElementById("MLC").innerHTML = bin;
}

&lt;/script&gt;

&lt;/body&gt;
&lt;/html&gt;
</code></pre>
