//假定数据类型是int
static string GetBin(int n) { string result = ""; do { result = (n % 2 == 0 ? "0" : "1")+result; n = n / 2; } while (n > 0); return (new string('0',sizeof(int)-result.Length))+result; }
static string GetBin(int n) { string result = ""; do { result = (n % 2 == 0 ? "0" : "1")+result; n = n / 2; } while (n > 0); return (new string('0',sizeof(int)-result.Length))+result; }