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