Truth Tables of Boolean Variables
Date: 03/09/2001 at 14:35:54 From: Mike Green Subject: Truth Table from Boolean Variables (A,B) Hi, Given two Boolean variables, A and B, what are the 16 possible truth functions in table form? I don't understand. Thanks.
Date: 03/09/2001 at 16:55:27 From: Doctor Achilles Subject: Re: Truth Table from Boolean Variables (A,B) Hi Mike, Thanks for writing to Dr. Math. Boolean algebra traditionally uses only a few operations. Some examples of common boolean operations are: and (^) or (v) if-then (->) if-and-only-if (=) not (~). The first four are called "binary operators" because they take two inputs. ~ is a unary operator; it takes one input and returns true if the input is false and false if the input is true. Your problem asks for the sixteen possible truth functions for A and B; that means you're looking for binary operators that take both A and B as inputs. Here are the truth tables for those common binary operations (I use 0 for false and 1 for true): A B (A^B) 1 1 1 1 0 0 0 1 0 0 0 0 A B (AvB) 1 1 1 1 0 1 0 1 1 0 0 0 A B (A->B) 1 1 1 1 0 0 0 1 1 0 0 1 A B (A=B) 1 1 1 1 0 0 0 1 0 0 0 1 But that's only four, and we want sixteen. Notice the similar form all these truth tables have: A B (A?B) 1 1 ? 1 0 ? 0 1 ? 0 0 ? The only difference is in the boolean operation (the symbol between A and B), and the four outputs. Let's construct a new boolean operation and call it o1 (for operation 1). o1 has this truth table: A B (Ao1B) 1 1 0 1 0 0 0 1 0 0 0 0 Another name for o1 is "false" because it always returns 0. Don't worry too much about the name of o1, just note that it is one possible output. Now let's make o2. o2 has this truth table: A B (Ao2B) 1 1 0 1 0 0 0 1 0 0 0 1 Another name for o2 is "nor," short for not-or. Again, don't worry about the name, but notice that it's another possible output. Let's make o3. o3 has this truth table: A B (Ao3B) 1 1 0 1 0 0 0 1 1 0 0 0 Let's make o4. o4 has this truth table: A B (Ao4B) 1 1 0 1 0 0 0 1 1 0 0 1 Let's make o5. o5 has this truth table: A B (Ao45) 1 1 0 1 0 1 0 1 0 0 0 0 You can keep going like this until you've made every possible set of outputs. There will be sixteen. Here's something else to think about. Boolean algebra has four operations (actually there are about eight if you include things like xor, nor, nand, etc.), so why, if there are sixteen possible truth tables, do we not have sixteen operations? The answer is that you can build these outputs using the basic boolean operations. To see this, try to make a boolean expression using the symbols ^, v, ->, =, and ~ for each of your truth tables. To get started, let's build o3, o4, and o5. o3 returns true if A is 0 and B is 1; otherwise it returns false. In other words, o3 returns true if ~A and B are both true, so o3 can be written (~A^B). o4 returns true if A is 0, regardless of what B is, so we can call o4 ~A. o5 returns true if A is 1 and B is 0; otherwise it returns false. o5 can thus be written (A^~B). Hope all this helps. If you still need help on this or you have any other math questions, please write back. - Doctor Achilles, The Math Forum http://mathforum.org/dr.math/
Search the Dr. Math Library:
Ask Dr. MathTM
© 1994- The Math Forum at NCTM. All rights reserved.