Re: Question of the Day[2]# EE - 电子工程
m*s
1 楼
mathematical induction, hehe
n=2
x = (x&01b) + ((x&10b)>>1);
4-bit case,
x = (x&0101b) + ((x&1010b)>>1);
x = (x&0011b) + ((x&1100b)>>2);
you may extend to any "n" that is power of 2.
bit
n=2
x = (x&01b) + ((x&10b)>>1);
4-bit case,
x = (x&0101b) + ((x&1010b)>>1);
x = (x&0011b) + ((x&1100b)>>2);
you may extend to any "n" that is power of 2.
bit