Breaking News

Truth Tables

A truth table is a mathematical table used in logic — specifically in connection with Boolean algebra, Boolean functions, and propositional calculus — to compute the functional values of logical expressions on each of their functional arguments, that is, on each combination of values taken by their logical variables. In particular, truth tables can be used to tell whether a propositional expression is true for all legitimate input values, that is, logically valid.
truth table serves purpose of to show the output of a digital system based on each of the possible input patterns of ones and zeros; by making a column for each of the inputs to a digital circuit and a column for the resulting output. A row is added for each of the possible patterns of ones and zeros that could be input to the circuit.
For example, a circuit with three inputs, A, B, and C, would have 23 = 8 possible patterns of ones and zeros:
A=0, B=0, C=0
A=0, B=0, C=1
A=0, B=1, C=0
A=0, B=1, C=1
A=1, B=0, C=0
A=1, B=0, C=1
A=1, B=1, C=0
A=1, B=1, C=1
This means that a truth table representing a circuit with three inputs would have 8 rows. Image below presents a sample truth table for a digital circuit with three inputs, A, B, and C, and one output, X. Note that the output X doesn’t represent anything in particular. It is just added to show how the output might appear in a truth table.
img
There is also a trick to deriving the combinations. Assume we need to build a truth table with four inputs, A, B, C, and D. Since 24 = 16, we know that there will be sixteen possible combinations of ones and zeros.
For half of those combinations, A will equal zero, and for the other half, A will equal one. When A equals zero, the remaining three inputs, B, C, and D, will go through every possible combination of ones and zeros for three inputs.
Three inputs have 23 = 8 patterns, which coincidentally, is half of 16. For half of the 8 combinations, B will equal zero, and for the other half, B will equal one. Repeat this for C and then D.
This gives us a process to create a truth table for four inputs. Begin with the A column and list eight zeros followed by eight ones. Half of eight is four, so in the B column write four zeros followed by four ones in the rows where A equals zero, then write four zeros followed by four ones in the rows where A equals one. Half of four equals two, so the C column will have two zeros followed by two ones followed by two zeros then two ones and so on.
The process should end with the last column having alternating ones and zeros. If done properly, the first row should have all zeros and the last row should have all ones.
img
In addition to verifying that all combinations of ones and zeros have been listed, this method also provides a consistency between all truth tables in the way that their rows are organized.

Check Also

Cache RAM

Cache RAM Even with increases in hard drive performance, it will never be practical to …