>Thus spake Andrew Warren (fastfwd@IX.NETCOM.COM): > > File-register REG contains a number between 0 and 127, inclusive. > The W-register contains a number between 0 and 127, inclusive. > > Write the most efficient PIC16C54 program that you can, using as > few additional file registers as possible, to calculate: > > (REG xor W) + 2 * (REG and W) > Isn't this just another way of writing REG + W. REG xor W adds the bits with no carry, then 2 * REG and W adds in the carry!! Keith. ========================================================== Keith Dowsett "Variables won't; constants aren't." E-mail: kdowsett@rpms.ac.uk WWW: http://kd.rpms.ac.uk/index.html