I am working in Android.
I have convert the value from the Hex
to the Binary
.
For example :
String Hex = "02";
String Bin = Integer.toBinaryString(Integer.parseInt(Hex, 16));
Log.e(WifiP2P.TAG, "Binary is " + Bin);
The log show like the following:Binary is 10
.
How to add the 0 after convert to the Binary
for 8 bit ? Like 00000010
.
Thanks in advance.