This post will not only cover how to convert Truth Tables to Equations, but it will also cover what a truth table is, and how to use it.
So, what is a truth table. If that is what you start with, and you do not understand what it means, then it is practically useless to you. A Truth Table is a chart that lists all possible combinations of inputs, and the output of those combinations under a set of gates. Here is an example of a Truth Table from the Majority vote project.
P
|
V
|
S
|
T
|
Decision
|
Row #
|
0
|
0
|
0
|
0
|
0
|
1
|
0
|
0
|
0
|
1
|
0
|
2
|
0
|
0
|
1
|
0
|
0
|
3
|
0
|
0
|
1
|
1
|
0
|
4
|
0
|
1
|
0
|
0
|
0
|
5
|
0
|
1
|
0
|
1
|
0
|
6
|
0
|
1
|
1
|
0
|
0
|
7
|
0
|
1
|
1
|
1
|
1
|
8
|
1
|
0
|
0
|
0
|
0
|
9
|
1
|
0
|
0
|
1
|
1
|
10
|
1
|
0
|
1
|
0
|
1
|
11
|
1
|
0
|
1
|
1
|
1
|
12
|
1
|
1
|
0
|
0
|
1
|
13
|
1
|
1
|
0
|
1
|
1
|
14
|
1
|
1
|
1
|
0
|
1
|
15
|
1
|
1
|
1
|
1
|
1
|
16
|
Note: the column labeled "row #" is simply there for reference and is not necessary in a Truth Table.
The columns labeled "P, V, S, and T are the inputs for this particular Truth Table. They represent President, Vice President, Secretary and Treasurer. each row in these columns is actually just counting up from zero to fifteen in binary. To briefly go over how to set up the Truth Table we will start with the patterns of these four columns. For any Truth Table, to figure out how many rows there are, we use the formula 2^(n) where n= the number of inputs. With four inputs, we know that there will be sixteen rows. Then, with the right-most column, we start with zero and alternate every row. The second column we alternate every two rows, the third, we alternate every four, and finally, the fourth column alternates every eight rows. The result of this shows that each row of inputs counts from zero in binary.

Now we get to how to convert this to an equation. The first step is to look at, and mark the minterms. A minterm is any row that resulted in a one or an on. The way to mark them is to write down the combinations of the inputs. Take row 8 for example. This is a minterm because it ou

P'VST + PV'S'T + PV'ST'+ PV'ST+ PVS'T'+ PVS'T+
PVST'+ PVST
This of course could be simplified using k-mapping or blooean algebra, but this equation will do for now. If you wanted to breadboard this, you would defiantly want to simplify this, for that saves a bit of money.
No comments:
Post a Comment