例:0x0001 -> 0x1000
思路一
result = 0x00000000;
resuilt(从左到右)第i位与x(从右到左)第i位进行“或”运算
与0“或”运算的结果为其本身,而result全是0
思路二
先奇偶位交换,然后以2位为一组,组间再奇偶交换,然后4位一组,8位,16位…
当然,也可以先把高16位和低16位交换,分别再对16位进行8位交换,递归至2位交换
例:0x0001 -> 0x1000
result = 0x00000000;
resuilt(从左到右)第i位与x(从右到左)第i位进行“或”运算
与0“或”运算的结果为其本身,而result全是0
先奇偶位交换,然后以2位为一组,组间再奇偶交换,然后4位一组,8位,16位…
当然,也可以先把高16位和低16位交换,分别再对16位进行8位交换,递归至2位交换