Suppose I have a 'C' character, and I need to get its representation in binary, i.e. 1000011
How best to implement?
Suppose I have a 'C' character, and I need to get its representation in binary, i.e. 1000011
How best to implement?
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
Source: https://ru.stackoverflow.com/questions/870411/
All Articles