I was wondering if someone can show me a clean cut method to finding boolean expressions for any truth table..
I'll show you an example...
x y z | f(x,y,z)
1 1 1 0
1 1 0 1
1 0 1 1
1 0 0 1
how would we go on about finding an expression for this ??
I was wondering if someone can show me a clean cut method to finding boolean expressions for any truth table..
I'll show you an example...
x y z | f(x,y,z)
1 1 1 0
1 1 0 1
1 0 1 1
1 0 0 1
how would we go on about finding an expression for this ??
Hello Khonics89I hope you realise that this is not a complete truth table for three input variables, and . You have only the four lines where ; you need another four lines with to complete the table.
Nevertheless, to answer your question:
- Look for the lines of the table where the output value is 1 (True)
- For each of these lines, construct a logical expression, using AND and NOT as appropriate, to construct the expression that corresponds to the True-False values of the input variables. (See below for examples.)
- Combine each of these expressions using OR's to give a single Boolean expression to represent the output of the complete table.
- If desired (and if you can!), simplify the resulting Boolean expression.
In the (part-)example that you quote, on lines 2, 3 and 4.
On line 2, and are True; is False. So this line is AND AND (NOT ); or
On line 3, is True; is False; is True. So this line is
Similarly line 4 is
Combining these three expressions using OR's then, we get:
(This could then be simplified to , if your Boolean algebra is up to it.)
Grandad