Take the Binary From Text Area and then Converting to Hexa
<p>I want to take a binary in the text area and convert it to hex. When calculated using the calculator, result is "E0AC882AA428B6B8", but with my code result is "30". </p>

<pre><code>String str = txtXOR.getText();
char[] chars = str.toCharArray();

StringBuffer hex = new StringBuffer();
int x = chars.length;

for(int i = 0; i &lt; x; i++){
  hex.append(Integer.toHexString((int)chars[i]));
  txtXORToHexa.setText(Integer.toHexString((int) chars[i]));
}
</code></pre>

<p>Could someone point out where I have gone wrong?</p>
