If you write down the truth table, you will see the two equations are not equivalent.
Jim Wu snipped-for-privacy@yahoo.com
Is there any benefit in terms of power consumption or performance in doing
> something like the following ?
>
> if (a && b) a
> It seems to me it could be re-written as
>
> if (b) a
> to save some logic.
>
> I think the difference is the 'a' reg would be clocked more often using
the
second line of code, but does it make a difference if the same
> (pre-existing) value is written to the register ?
>
> Thanks,
> Rob
>
>
>
>