Send
Close Add comments:
(status displays here)
Got it! This site uses cookies. You consent to this by clicking on "Got it!" or by continuing to use this website.nbsp; Note: This appears on each machine/browser from which this site is accessed.
C: Extended truth tables
1. C: Extended truth tables
To express logical operators in extended truth table from, 0 is used for false and 1 is used for true.
2. Logical negation

The logical negation operation and tree is expressed as follows.
! X
Here is the extended truth table.
X | ! X
-------
0 | 1 0
1 | 0 1
3. Logical conjunction

The logical conjunction operation and tree is expressed as follows.
X && Y
Here is the extended truth table.
X Y | X && Y
------------
0 0 | 0 0 0
0 1 | 0 0 1
1 0 | 1 0 0
1 1 | 1 1 1
The result (under the operator) is
true if both of
X and
Y are
true, else the result is
false.
Note: If the values were actually
0 or
1 (i.e., bits), then the bitwise operator would be "
&" rather than the logical operator "
&&".
4. Logical disjunction

The logical disjunction operation and tree is expressed as follows.
X || Y
Here is the extended truth table.
X Y | X || Y
------------
0 0 | 0 0 0
0 1 | 0 1 1
1 0 | 1 1 0
1 1 | 1 1 1
The result (under the operator) is
true if either or both of
X and
Y are
true, else the result is
false.
Note: If the values were actually
0 or
1 (i.e., bits), then the bitwise operator would be "
|" rather than the logical operator "
||".
5. End of page