32 位无符号整数右移 2 位
2 bit right shift of a 32 bit unsigned integer
应该如何解决以下问题?
Let N1 be an unsigned integer over 32 bits. Give the assembly code
allowing to realise the following operation:
A right shift of 2 bit order of N1, but ONLY of the bits in an even
position as shown in the following illustration:
P.S: 我试图做的是评估每一位的索引是否为偶数,但我不确定这是正确的方法,还是如何用汇编编写。
合乎逻辑。
用 55555555 anding
得到偶数位
然后right shift
那个,给N1er2
用AAAAAAAAAnding
得到奇数位得到N1o
结果将是 N1er2 Ored
和 N1o
应该如何解决以下问题?
Let N1 be an unsigned integer over 32 bits. Give the assembly code allowing to realise the following operation:
A right shift of 2 bit order of N1, but ONLY of the bits in an even position as shown in the following illustration:
P.S: 我试图做的是评估每一位的索引是否为偶数,但我不确定这是正确的方法,还是如何用汇编编写。
合乎逻辑。
用 55555555 anding
得到偶数位
然后right shift
那个,给N1er2
用AAAAAAAAAnding
得到奇数位得到N1o
结果将是 N1er2 Ored
和 N1o