K
Ken Smith
Guest
In article <1163360427.487718.18100@h54g2000cwb.googlegroups.com>,
<luisdanielsilva@gmail.com> wrote:
If you are doing this in assembly, the these ideas will help you.
32 bits fits into 4 bytes. You want 2 nested loops to do the process.
R0 or R1 can be used to work your way down the bytes as you process.
There is no XRL C,XXX instruction. If you want a little speed, you want
two copies of the inner workings. One for when you are complimenting bits
and one for when you aren't. If your input values happen to be near zero,
you can also include special code for skipping the unused part of the
field.
--
--
kensmith@rahul.net forging knowledge
<luisdanielsilva@gmail.com> wrote:
I need to convert a 32 bit binary number to gray code. i know how to do
it bit by bit, but i need to do a function to do it, so that i don't
need to repeat code 32 times. Can anybody help me?
If you are doing this in assembly, the these ideas will help you.
32 bits fits into 4 bytes. You want 2 nested loops to do the process.
R0 or R1 can be used to work your way down the bytes as you process.
There is no XRL C,XXX instruction. If you want a little speed, you want
two copies of the inner workings. One for when you are complimenting bits
and one for when you aren't. If your input values happen to be near zero,
you can also include special code for skipping the unused part of the
field.
--
--
kensmith@rahul.net forging knowledge