static int m = 0;
static string[] str = new string[16];
public static string[] GetBitValueByInt(int i)
{
// int n = 0;
int quotient = i / 16;
//var a = 0xffffffff"ient;
int remainder = i % 16;
if (0 < quotient && quotient < 16)
{
str[m] = remainder.ToString();
str[m+1] = quotient.ToString();
for (int j = m + 2; j <= 15; j++)
{
str[j] = 0.ToString();
}
}
else if (quotient == 0)
{
str[m] = remainder.ToString();
for (int j = m+1; j <= 15; j++)
{
str[j] = 0.ToString();
}
}
else //商大于16
{
str[m] = remainder.ToString();
m++;
GetBitValueByInt(quotient);
}
return str;
}
static string[] str = new string[16];
public static string[] GetBitValueByInt(int i)
{
// int n = 0;
int quotient = i / 16;
//var a = 0xffffffff"ient;
int remainder = i % 16;
if (0 < quotient && quotient < 16)
{
str[m] = remainder.ToString();
str[m+1] = quotient.ToString();
for (int j = m + 2; j <= 15; j++)
{
str[j] = 0.ToString();
}
}
else if (quotient == 0)
{
str[m] = remainder.ToString();
for (int j = m+1; j <= 15; j++)
{
str[j] = 0.ToString();
}
}
else //商大于16
{
str[m] = remainder.ToString();
m++;
GetBitValueByInt(quotient);
}
return str;
}