public static string ConvertImm(string number) { if (DataCleaner.CheckNumberType(number) == NUM_TYPES.OTH) { return(number); } return(ConvertHexToBin(number)); }
public static string ConvertNumber(string number) { NUM_TYPES type = DataCleaner.CheckNumberType(number); if (type == NUM_TYPES.DEC) { return(ConvertDecToBin(number)); } if (type == NUM_TYPES.HEX) { return(ConvertHexToBin(number)); } return(number); }
public static string ConvertToHex(string number) { if (number.StartsWith("0x")) { number = number.Remove(0, 2); } NUM_TYPES type = DataCleaner.CheckNumberType(number); if (type == NUM_TYPES.DEC) { return(ConvertDecToHex(number)); } return(number); }