title: Converting a string to binary [Java]
body: <p>Let's say I have the following string:</p>
  
  <pre><code>String s = "Hello, stackoverflow"
  </code></pre>
  
  <p>How would I convert that into a binary number (0s and 1s)? Here's the trick: I'm not allowed to use built-in methods for the conversion. It has to be done mathematically. I have no idea where to begin. Can anyone point me in the right direction?</p>
  
  <p>Edit 1: I've seen this <a href="https://stackoverflow.com/questions/917163/convert-a-string-like-testing123-to-binary-in-java" title="Convert a string like testing123 to binary in java">question</a> and people suggested using getBytes(string), charset UTF-8, and Integer.toBinaryString. I'm not allowed to use any of these methods for conversion. I haven't heard of 36-base either.</p>