Suppose I have a 'C' character, and I need to get its representation in binary, i.e. 1000011

How best to implement?

    2 answers 2

    There is a way like this:

     char c = 'C' Integer.toBinaryString((byte) c) 
       Integer.toBinaryString('C'); 

      By the way, if you google, then you will find a lot of absolutely the same answers: tyk