Community Tip - Want the oppurtunity to discuss enhancements to PTC products? Join a working group! X
I've tried to use MathCad to help to simplify and expand boolean algebra but couldn't get it to work. I also tried to plot truth table on MathCad and the best I could get is to use the "explicit" evaluation. Using the simplify and expand keywords for the evaluation does not apply any effect to boolean algebra too.
How can I use MathCad to work with boolean algebra and logics?
May be this help You:
http://twt.mpei.ac.ru/ochkov/Fuzzy%20logic/Fuzzy_log_eng.htm
I would say yes but a worksheet would be helpful.
Mike
Hopefully, a helpful worksheet from the old collab .
I wouldn't know to find it now.
nas
Can Mathcad simplify boolean algebra too? I have long boolean expression and if Mathcad could simplify these expression, it could save me a lot of time.
Ken Smith wrote:
Can Mathcad simplify boolean algebra too?
Yes, if we use not And but *, not Or but + etc
But I still don't quite get it.
I tried this in Mathcad: X v (~X ^ Y) but I don't get X v Y
I also tried like what you said and have it as X + (~X * Y) but Mathcad sees it as multiply and addition.
Also, how do I simplify it? I am using the "Shift + Enter" evaluation and then key in the "simplify" keyword.
Ken Smith wrote:
But I still don't quite get it.
I tried this in Mathcad: X v (~X ^ Y) but I don't get X v Y
I also tried like what you said and have it as X + (~X * Y) but Mathcad sees it as multiply and addition.
Also, how do I simplify it? I am using the "Shift + Enter" evaluation and then key in the "simplify" keyword.
Could you please post your worksheet (preferably in M11 format).
By 'simplify' do you mean that you want to produce a simplified expression or produce a completely evaluated result?
Stuart
Unfortunately, I don't have a worksheet for this yet. But I am intending to using Mathcad to help me to solve some boolean expression.
And by simplifying, I mean returning a simplified boolean expression. So, if I have a long terms of boolean expression, I need a simplified expression that returns the same results as the long expression. So for example, if I put in (C' + A').C', it will just simplify the expression it and return a simplified expression of just C'.
Ken,
You can type in the Boolean expression, then press Ctrl+Shift+. (period). Type simplify in the placeholder.
See the Symbolics toolbar to see the choice of symbolic keywords.
If you scroll throught the Symbolic quicksheets, you'll find some examples with Boolean operators.
Regards,
Mona
Mona Zeftel wrote:
Ken,
You can type in the Boolean expression, then press Ctrl+Shift+. (period). Type simplify in the placeholder.
See the Symbolics toolbar to see the choice of symbolic keywords.
If you scroll throught the Symbolic quicksheets, you'll find some examples with Boolean operators.
Mona,
I think what Ken may be after is symbolic simplification rather than evaluation,
eg, 'a and (b or not b)' simplifying to 'a'.
Unfortunately, I don't have M15 and my M14 has stopped playing ball (it opens but resolutely remains invisible), so I don't know what may be different about symbolic simplification of booleans - M11 doesn't appear to offer this capability.
Stuart
Mona Zeftel wrote:
Ken,
You can type in the Boolean expression, then press Ctrl+Shift+. (period). Type simplify in the placeholder.
See the Symbolics toolbar to see the choice of symbolic keywords.
If you scroll throught the Symbolic quicksheets, you'll find some examples with Boolean operators.
Regards,
Mona
I tried this:
But the correct simplified answer should be (a ^ b) + (~a ^ ~c)
if I put in (C' + A').C', it will just simplify the expression it and return a simplified expression of just C'.
How would that return just C? I don't think that quire right.
Mike
Why shouldn't it be C'?
So Mathcad cannot do symbolic simplification? I am using Mathcad 14, by the way.
Ken Smith wrote:
Why shouldn't it be C'?
So Mathcad cannot do symbolic simplification? I am using Mathcad 14, by the way.
Mathcad can do symbolic simplification in general (eg, calculus), but (not having access to M14 or M15) I don't believe that it can simplify a boolean expression in terms of the variable names only - it will symbolically evaluate a result, though. Eg, (a and not a) will produce (a or not a) if a doesn't have a value, but will give 1 if a has a value.
On a blank worksheet, try typing
(a or not a) simplify -> (using the Mathcad boolean operators in place of 'and' and 'not'.
and see what happens. Then define a:=1 (or 0) above the expression to confirm it evaluates to 1.
Stuart
Yes, it does evaluate to 1 with that expression. Looks like Mathcad can only evaluate but not simplify a boolean expression at the moment.
Hopefully, Mathcad can simplify boolean expression in its future versions.
Thanks so much for all the help!
On a blank worksheet, try typing (a or not a) simplify -> (using the Mathcad boolean operators in place of 'and' and 'not'.
and see what happens. Then define a:=1 (or 0) above the expression to confirm it evaluates to 1.
Just to speed things up
Mike
Why shouldn't it be C'?
Because if you expand out of the brackets you get.
Mike
Can you confirm that (C' + A').C' = (C+A)*C?
Does the dot represnet a multiplication?
Mike
Sorry, my bad. It does seem as you said above that Mathcad can only evaluate but not simplify a boolean expression at the moment.
Mike