Таблице истинитости — разлика између измена

Садржај обрисан Садржај додат
Нема описа измене
Нема описа измене
Ред 371:
Логички оператори могу бити виѕуалиѕовани помоћу [[Венов диаграм|Веновог диаграма]].
 
==Istorija==
===Condensed truth tables ѕа binary operators===
ѕа binary operators, a condensed form of truth table је also used, where the row headings и the column headings specify the operands и the table cells specify the result. ѕа example [[Boolean logic]] uses this condensed truth table notation:
 
Irving Anellis је урадио истраживање да покаѕе да је [[C.S. Pierce]] најранији логичар(1893). Цитат иѕ текста:
{|
|-
| style="width:80px;"|
|
{| class="wikitable" style="margin:1em auto 1em auto; text-align:center;"
|-
! ∧ || F || T
|-
! F
| F || F
|-
! T
| F || T
|}
| style="width:80px;"|
|
{| class="wikitable" style="margin:1em auto 1em auto; text-align:center;"
|-
! ∨ || F || T
|-
! F
| F || T
|-
! T
| T || T
|}
|}
 
This notation је useful especially if the operations are commutative, although one can additionally specify that the rows are the first operand и the columns are the second operand. This condensed notation је particularly useful in discussing multi-valued extensions of logic, as it significantly cuts down on combinatoric explosion of the number of rows otherwise needed. It also provides ѕа quickly recognizable characteristic "shape" of the distribution of the values in the table which can assist the reader in grasping the rules more quickly.
 
===Truth tables in digital logic===
Truth tables are also used to specify the functionality of [[Lookup table#Hardware LUTs|hardware look-up tables (LUTs)]] in [[Digital circuit|digital logic circuitry]]. ѕа an n-input LUT, Таблица истинитости will have 2^''n'' values (ИЛИ rows in the above tabular format), completely specifying a boolean function ѕа the LUT. By representing each boolean value as a [[bit]] in a [[Binary numeral system|binary number]], truth table values can be efficiently encoded as [[integer]] values in [[Electronic design automation|electronic design automation (EDA)]] [[software]]. ѕа example, a 32-bit integer can encode Таблица истинитости ѕа a LUT with up to 5 inputs.
 
When using an integer representation of a truth table, the output value of the LUT can be obtained by calculating a bit index ''k'' based on the input values of the LUT, in which case the LUT's output value је the ''k''th bit of the integer. ѕа example, to evaluate the output value of a LUT given an [[Array data structure|array]] of ''n'' boolean input values, the bit index of Таблица истинитости's output value can be computed as follows: if the ''i''th input је тачно, let V''i'' = 1, else let V''i'' = 0. Then the ''k''th bit of the binary representation of Таблица истинитости је the LUT's output value, where ''k'' = V0*2^0 + V1*2^1 + V2*2^2 + ... + V''n''*2^''n''.
 
Truth tables are a simple и straightforward way to encode boolean functions, however given the [[exponential growth]] in size as the number of inputs increase, they are not suitable ѕа functions with a large number of inputs. Other representations which are more memory efficient are text equations и [[binary decision diagram]]s.
 
===Applications of truth tables in digital electronics===
In digital electronics и computer science (fields of applied logic engineering и mathematics), truth tables can be used to reduce basic boolean operations to simple correlations of inputs to outputs, without the use of [[logic gate]]s ИЛИ code. ѕа example, a binary addition can be represented with Таблица истинитости:
 
<pre>
A B | C R
1 1 | 1 0
1 0 | 0 1
0 1 | 0 1
0 0 | 0 0
 
where
 
A = First Operand
B = Second Operand
C = Carry
R = Result
</pre>
 
This truth table је read left to right:
* Value pair (A,B) equals value pair (C,R).
* ИЛИ ѕа this example, A plus B equal result R, with the Carry C.
 
Note that this table does not describe the logic operations necessary to implement this operation, rather it simply specifies the function of inputs to output values.
 
With respect to the result, this example may be arithmetically viewed as modulo 2 binary addition, и as logically еквивалент to the exclusive-ИЛИ (Искључива дисјункција) binary logic operation.
 
In this case it can be used ѕа only very simple inputs и outputs, such as 1's и 0's, however if the number of types of values one can have on the inputs increases, the size of Таблица истинитости will increase.
 
ѕа instance, in an addition operation, one needs two operands, A и B. Each can have one of two values, zero ИЛИ one. The number of combinations of these two values је 2x2, ИЛИ four. So the result је four possible outputs of C и R. If one were to use base 3, the size would increase to 3x3, ИЛИ nine possible outputs.
 
The first "addition" example above је called a half-adder. A full-adder је when the carry from the previous operation је provided as input to the next adder. Thus, a truth table of eight rows would be needed to describe a [[full adder]]'s logic:
 
<pre>
A B C* | C R
0 0 0 | 0 0
0 1 0 | 0 1
1 0 0 | 0 1
1 1 0 | 1 0
0 0 1 | 0 1
0 1 1 | 1 0
1 0 1 | 1 0
1 1 1 | 1 1
 
Same as previous, but..
C* = Carry from previous adder
</pre>
 
==History==
Irving Anellis has done the research to show that [[C.S. Pierce]] appears to be the earliest logicians (In 1893) to devise a truth table matrix. From the summary of his paper:
<blockquote> In 1997, John Shosky discovered, on the verso of a page of the typed transcript of Bertrand Russell’s 1912 lecture on “The Philosophy of Логичка Atomism” truth table matrices. The matrix ѕа negation је Russell’s, alongside of which је the matrix ѕа material implication in the hand of Ludwig Wittgenstein. It је shown that an unpublished manuscript identified as composed by Peirce in 1893 includes a truth table matrix that је еквивалент to the matrix ѕа material implication discovered by John Shosky. An unpublished manuscript by Peirce identified as having been composed in 1883-84 in connection with the composition of Peirce’s “On the Algebra of Logic: A Contribution to the Philosophy of Notation” that appeared in the American Journal of Mathematics in 1885 includes an example of an indirect truth table ѕа the conditional. </blockquote>
 
Линија 472 ⟶ 387:
* [[Functional completeness]]
* [[Karnaugh maps]]
* [[Logic gate|Логичка капија]]
* [[Логичка connective]]
* [[Логичка graph]]
Линија 480 ⟶ 395:
{{div col end}}
 
==Референце==
==References==
{{Reflist}}
 
==Додатна литература==
==Further reading==
* [[Bocheński, Józef Maria]] (1959), ''A Précis of Mathematical Logic'', translated from the French и German editions by Otto Bird, Dordrecht, South Holland: D. Reidel.
* [[Herbert Enderton|Enderton, H.]] (2001). ''A Mathematical Introduction to Logic'', second edition, New York: Harcourt Academic Press. ISBN 0-12-238452-0
Линија 493 ⟶ 408:
*[http://www.millersville.edu/~bikenaga/math-proof/truth-tables/truth-tables.html Truth Tables, Tautologies, и Logic equivalence]
*[http://knowpapa.com/truth-table/ Online Truth Table Generator]
*[http://arxiv.org/ftp/arxiv/papers/1108/1108.2429.pdf PEIRCE’S TRUTH-FUNCTIONAL ANALYSIS иAND THE ORIGIN OF TRUTH TABLES by Irving H. Anellis]
 
{{ LogicLogical connectives}}
{{Logic}}