Endianness and bit twiddling or am I overlooking something?
steve at plug.org
Tue Jun 18 23:28:06 MDT 2013
On 6/18/13 11:14 PM, S. Dale Morrey wrote:
> The algorithm calls for a rotate left by 7 to each byte.
> Which I would think should be the same as a rotate right by 1
> 72 which is 01001000
> becomes 00100100 or 36 when I hand calculate it no matter which way I
> calculate it.
> When I try to simulate it, I'm getting a value of 9216.
> However when I do a rotate right by 1 I get the correct answer.
Since 9216 is more than one byte, I'm guessing that the problem is that
you're not just using a byte. 9216 is 72 * 128 (2^7), so that's the
correct answer if you are using a 2+ byte register.
More information about the PLUG