Hexadecimal to Binary conversion with java
public static int hexadecimalToBinary(String hex) {
// Declaring Hexadecimal variable
String binary = "";
/**
* Converting the Hexadecimal value to Binary Equivalent
* First convert the Hexadecimal to Decimal Equivalent
* Then to Binary Equivalent
*/
// Converting Binary to decimal
int number = Integer.parseInt( hex, 16 );
// Converting Decimal Equivalent to Hexadecimal
binary = Integer.toBinaryString( number );
// Returning the Hexadecimal value
return binary;
}