Endianness and bit twiddling or am I overlooking something?
S. Dale Morrey
sdalemorrey at gmail.com
Wed Jun 19 01:38:07 MDT 2013
Wow I can't believe I missed that. I think you're likely correct.
On Tue, Jun 18, 2013 at 11:28 PM, Steve Meyers <steve at plug.org> wrote:
> 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.
> PLUG: http://plug.org, #utah on irc.freenode.net
> Unsubscribe: http://plug.org/mailman/**options/plug<http://plug.org/mailman/options/plug>
> Don't fear the penguin.
More information about the PLUG