Lesson 1001: Representing Boolean Expressions with Truth Tables A helpful way to compare and visualize boolean expressions is with truth tables. Truth tables allow you to evaluate the expression quickly yourself. To demonstrate this, lets create a truth table for the expression:
![[ expr.gif: 1.0K ]](expr.gif)
First, we must make our ordered input columns for the two inputs in this expression, A and B:
![[ step1.gif: 1.1K ]](step1.gif)
Next, we must evaluate the first term. The order of operations tells us that the operation we will perform last is the OR. So, lets move from left to right with our terms. First, let's place AB on the chart, since both of the operands required, A and B are already on the chart for us.
![[ step2.gif: 1.2K ]](step2.gif)
Now, we must evaluate the second term, which is NOT(A XOR B). There are two reasons why we will perfor the A XOR B first: 1) the order of operations tells us so, and 2) we do not yet know the result of the NOTs operand.
![[ step3.gif: 1.5K ]](step3.gif)
We can now place NOT(A XOR B) on the truth table, and simply perform the NOT of the previous column.
![[ step4.gif: 1.7K ]](step4.gif)
Finally, we can perform the OR using its two operands on the chart, by simply glancing at the two columns. We get as the final evaluation:
![[ step5.gif: 1.9K ]](step5.gif)
This example brings up an interesting point. The two final operands are quite distant from each other on the truth table. Had we performed the first, AB, at the end, they would have been next to each other because AB requires no prior evaluation: its operands are inputs. Things like this make your truth table a little easier to follow, but do not make a significant increase of ease.
Check your progressConstruct a truth table for the Boolean expression ~(A+B)(BC) (that's NOT(A OR B) AND (B AND C) ). A basic skeleton is constructed for you, just fill in the letters and numbers in the appropriate boxes.
DIGital