Jump to content

Truth Table: Difference between revisions

From Wikipedia, the free encyclopedia
Content deleted Content added
Rofthorax (talk | contribs)
No edit summary
Rofthorax (talk | contribs)
No edit summary
Line 1: Line 1:
used in digital electronics and computer science to describe a boolean operation "sans implementation". It correlates a number of inputs (or sensors) to the logic needed to generate the outputs (responses). Most digital components can be reduced to truth tables, such as a binary addition:
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:

<pre>
<pre>
A B C D
A B C D
Line 16: Line 17:


1 and 1 makes a carry of 1, with the result 0
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.

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 B
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.