/// <summary> /// 转换为十六机制 /// </summary> /// <param name="bin">二进制</param> /// <example>in: 101110; out: 2E</example> public static string ToHexadecimal(string bin) => DecimalismConverter.ToHexadecimal(ToDecimalism(bin));
/// <summary> /// 转换为二进制字符串 /// </summary> /// <param name="byte">byte</param> /// <example>in: (byte)128; out: 10000000</example> public static string ToBinary(byte @byte) => DecimalismConverter.ToBinary(@byte);
/// <summary> /// 转换为二进制字符串 /// </summary> /// <param name="hex">十六进制字符串</param> /// <example>in: 2E; out: 101110</example> public static string ToBinary(string hex) => DecimalismConverter.ToBinary(ToDecimalism(hex));