//二进制加法
void Add_Bit(int *a,int *b,int n,int *c)
{
int temp1=0,temp2=0; //temp1为两个相加的和,temp2代表进制的数字
//int c[5];
int p=n-1;
for (int i=n-1;i>=0;i--)
{
temp1=a[i]+b[i];
if (temp1+temp2==2)
{
c[p--]=0;
temp1=0;
temp2=1;
}else if (temp1+temp2==3)
{
c[p--]=1;
temp1=0;
temp2=1;
}
else
{
c[p--]=temp1;
temp1=0;
temp2=0;
}
}
c[0]=temp2;
// return c;
}