Re: power saving condition test ?

Aug 06, 2003 1 Replies

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
>
>
>
>

Sorry, my mistake. I was thinking in a case where another branch exists to set a = 1. e.g

if (a&b) a equivalent.

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required