> John's solution is elegant but a little hard on the brain. > I prefer Dwayne Reids more brute force - > because it's much easier for trhe average person to see what is happening at > a glance (or a few glances :-) - YMMV). The shift-out-shift-in method is also pretty easy to follow. It is also 1 instruction shorter because you don't have to clear the destination register at the beginning. > Lookup tables have the possible advantage of having a constant > implementation time. The test-each-bit method and the shift-out-shift-in method also have constant execute times. --- Peace, William Kitchen bill@iglobal.net The future is ours to create.