Truth Table: Difference between revisions
No edit summary |
No edit summary |
||
Line 9: | Line 9: | ||
A = Operand 1 |
A = Operand 1 |
||
B = Operand |
B = Operand 2 |
||
C = Carry |
C = Carry |
||
D = Result |
D = Result |
Revision as of 00:06, 19 August 2006
used in digital electronics and computer science to describe a boolean operation "sans implementation". Most digital components can be reduced to truth tables, such as a binary addition:
A B C D 1 1 1 0 1 0 0 1 0 1 0 1 0 0 0 0 A = Operand 1 B = Operand 2 C = Carry D = Result
The table is read left to right:
1 and 1 makes a carry of 1, with the result 0
Theoretically all computational operations can be reduced to truth tables, but the size of the truth table goes up exponentially with the number of inputs due to the number of combinations of inputs possible. For instance, an addition of two binary digits has four possible outputs because 2 to the 2nd power is four. A complete addition operation where the carry from the pervious operation is provided as a tertiary input, has two the third power outputs, or 8 possible outputs. If one was God, if one believes in god, it would be possible to reduce all computer programs to truth tables. Truth tables are only applicable to simple computational operations.