# Thread: how to convert truth table into boolean expressions?

1. ## how to convert truth table into boolean expressions?

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

2. ## Boolean Expression from a Truth Table

Hello Khonics89
Originally Posted by Khonics89
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 hope you realise that this is not a complete truth table for three input variables, $\displaystyle x, y$ and $\displaystyle z$. You have only the four lines where $\displaystyle x = 1$; you need another four lines with $\displaystyle x = 0$ to complete the table.

• 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, $\displaystyle f = 1$ on lines 2, 3 and 4.

On line 2, $\displaystyle x$ and $\displaystyle y$ are True; $\displaystyle z$ is False. So this line is $\displaystyle x$ AND $\displaystyle y$ AND (NOT $\displaystyle z$); or $\displaystyle x \land y \land \neg z$

On line 3, $\displaystyle x$ is True; $\displaystyle y$ is False; $\displaystyle z$ is True. So this line is $\displaystyle x\land \neg y \land z$

Similarly line 4 is $\displaystyle x \land \neg y \land \neg z$

Combining these three expressions using OR's then, we get:

$\displaystyle f =(x \land y \land \neg z) \lor (x\land \neg y \land z) \lor(x \land \neg y \land \neg z)$

(This could then be simplified to $\displaystyle f = x \land (\neg y \lor \neg z)$, if your Boolean algebra is up to it.)

3. thanks grandad- so our main aim is to write individual expressions for each row and then sum them up using "or"

and then simplify if possible ??

4. Originally Posted by Khonics89
thanks grandad- so our main aim is to write individual expressions for each row and then sum them up using "or"

and then simplify if possible ??
That's a brief summary of what I said, yes.

,

,

### converting truth

Click on a term to search for related topics.