昏头了,请DX帮忙。。。。
有一个数组a[1]....1[8]要分别取出他的bit组成一个新的byte
eg:取出数组的bit0位组成一个byte_0即(
byte_0.7=a[8].0,byte_0.6=a[7].0,byte_0.5=a[6].0,byte_0.4=a[5].0
byte_0.3=a[4].0,byte_0.2=a[3].0,byte_0.1=a[2].0,byte_0.4=a[1].0
}
以此类推:
{
byte_x.7=a[8].x,byte_x.6=a[7].x,byte_x.5=a[6].x,byte_x.4=a[5].x
byte_x.3=a[4].x,byte_x.2=a[3].x,byte_x.1=a[2].x,byte_x.4=a[1].x
},该怎么做最简单?
发表时间:2003年12月4日11:06:44