If you want some complex logic that you will use multiple times, you can also make you own subVIs.
Another neat thing about boolean algebra is, if you replace every "and" with a multiply, and every "or" with an addtion, and do the appropiate things with negation, you can evaluate the expression using regular numerical algebra.
~AB + A~B + AB + ~A~B should be TRUE (you can verify this using the distributive property)
Now we apply normal math to it:
For A and B both TRUE (TRUE = 1)
=~1*1 + 1*~1 + 1*1 + ~1*~1
=0*1 + 1*0 + 1*1 + 0*0
You can verify this works with any combination of A or B.
take the expression A+B+C+D, with A=B=C=D=TRUE
Evaluating the expression gives you 1+1+1+1 = 4, which is equivalent to TRUE
You may be thinking, hmm, 4 is not TRUE or FALSE, but remember, in a lot of programming languages, 0 is FALSE, and anything else is TRUE.
Message Edited by agill on 07-12-2006 10:39 AM