Let's say I have the following string:
String s = "Hello, stackoverflow"
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?
Edit 1: I've seen this question 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.