List of utility methods to do Int to Binary Convert
String | digitToBinary(int digit) digit To Binary return String.format("%4s", Integer.toBinaryString(digit)).replace( " ", "0"); |
String | digitToBinary(String digit) digit To Binary return String.format("%4s", Integer.toBinaryString(Integer.valueOf(digit, 10))) .replace(" ", "0"); |