Send Close Add comments: (status displays here)
Got it!  This site "creationpie.com" uses cookies. You consent to this by clicking on "Got it!" or by continuing to use this website.  Note: This appears on each machine/browser from which this site is accessed.
Two-valued logic: Operators
by RS  admin@creationpie.com : 1024 x 640


1. Relating values
Yin yangRemember the following.

2. Operators
Balance scales tilt evenHere are two simple operators. These operators are relational operators as they relate quantities, as opposed to being logical operators (and, or, not, imply, etc.).

3. True expressions (formulas)
The following are true expressions.

4. False expressions (formulas)
The following are false expressions.

5. Logical operations
There are three primary logical operations. Some other common logical operations include the following.

6. Logical negation

7. Logical negation
Logical negation returns the opposite of the operand. Some other symbols for Not:

8. Sets and Venn diagram
Set complementLogical negation (i.e., "Not") is related to the complement operation of sets.

9. Complement
Here is a mathematical definition of complement. Complement equationQuestion: What is the opposite of not in?

10. Opposite of not in
The opposite of not in is in See how easy it is to get mixed up, if you are not careful. Remember not to forget that!


11. Self-reference
Is the following sentence true or false? This is a self-referential statement since it refers to itself.

Self-referential statements can cause logical problems (i.e., paradoxes).

Is "no" your answer to this question? Answer either "yes" or "no".

12. Logical conjunction
Sets A intersect B Conjunction Conjunction

The English word "conjuction" comes, through French, from the Latin word "coniungere""join".

The logical conjunction or intersection of two operands is true if (and only if) both operands are true. The logical conjunction "and" is the same as the natural language "and".

Example: To graduate, you must take and pass both MA101 (Math 101) and EN101 (English 101) and some others, ignored here. That is, you must take both courses to graduate.

Conjunction can be extended to any number of operators. There are other logical operators for two-valued logic that are not needed here.

Information sign More: Logical conjunction

13. Conjunction
ConjunctionThe conjunction of two planets happens when the two planets are both in-line with the sun.

Example: Conjunction of Venus and the Earth.

14. Twins
Conjoined twins are born joined at some part of their body.

15. Pleiades and Orion
Verse routeJob 38:31 Canst thou bind the sweet influences of Pleiades, or loose the bands of Orion? [kjv]
Verse routeσυνηκας δε δεσμον πλειαδος και φραγμον ωριωνος ηνοιξας [lxx]
Verse routeconiungerePliadisArcturi … [v]

Sets A intersect B

The logical conjunction of two operands is true if (and only if) both operands are true. The English word "conjuction" comes, through French, from the Latin word "coniungere""join".

The LXX (Septuagint) uses the word "and" for conjunction while the English uses "or" for disjunction. Most translations use the word "or" or omit any use of "and" or "or" (e.g., the NIV (New International Version)).

Information sign More: Logical conjunction

16. Job 38:31
   Job 38:31 
 All 
KJV: Canst thou bind the sweet influences of Pleiades, or loose the bands of Orion?
Hebrew: התקשר מעדנות כימה או משכות כסיל תפתח׃
Greek: συνηκας δε δεσμον πλειαδος και φραγμον ωριωνος ηνοιξας
Latin: numquid coniungere valebis micantes stellas Pliadis aut gyrum Arcturi poteris dissipare
Wycliffe: Whether thou schalt mowe ioyne togidere schynynge sterris Pliades, ethir thou schalt mowe distrie the cumpas of Arturis?
Luther: Kannst du die Bande der sieben Sterne zusammenbinden, oder das Band des Orion auflösen?

17. Pleiades and Orion
Verse routeJob 38:31 Canst thou bind the sweet influences of Pleiades, or loose the bands of Orion? [kjv]
Verse routeσυνηκας δε δεσμον πλειαδος και φραγμον ωριωνος ηνοιξας [lxx]
Verse routeconiungerePliadisArcturi … [v]

The constellation Orion and the Pleiades are more related than they appear in the sky.

Future topic Details are left as a future topic.


18. Logical conjunction
Logical expressions deal with how the logical values True and False are combined. Some other symbols for And:

19. Conjunction
The conjunction or intersection of A & B or A and B is true=1 if both of A and B are true=1, else the result is false=0.

Venn diagrams Expression tree Extended truth table
Sets A intersect B Conjunction Expression tree for A & B
A B | A & B ----------- 0 0 | 0 0 0 0 1 | 0 0 1 1 0 | 1 0 0 1 1 | 1 1 1

The result is in the column under the "&" operator.



Information sign More: Logical conjunction

20. Conjunction


The word "and" is a conjunction in that both parts (on either side) are needed.

Example: You need to buy milk and cookies at the store.
Distribute as follows. You need to do both.

Information sign More: Logical conjunction

21. Sets and Venn diagram
Sets A intersect B Conjunction

Logical conjunction (i.e., "And", "&", etc.) is related to the intersection operation of sets.

Here is a mathematical definition of set intersection.
Math equation for intersection
Note how the set intersection operator "" and the logical conjunction symbol "" are related. They are wide at the bottom and narrow/close at the top. This did not just happen. They are related.

Information sign More: Logical conjunction

22. And operator
Expression tree for A & B
A B | A & B ----------- 0 0 | 0 0 0 0 1 | 0 0 1 1 0 | 1 0 0 1 1 | 1 1 1

Here is the extended truth table using 0 for false and 1 for true.
Here is a tree diagram for the conjunction of logical values A and B. Values flow up the tree. The result (under the operator "&") is true or 1 only if both A and B are 1 or true.



Information sign More: Logical conjunction

23. Short circuit evaluation: Nothing is something
Short circuit evaluation comes from the idea that, logically, the conjunction of A and B is false if either A is false or B is false.

If one evaluates A and it is false, one need not even look at B to determine that the conjunction is false.

If one evaluates B and it is false, one need not even look at A to determine that the conjunction is false.

The order does not matter!

This follows a general principle in computer science and logic and reasoning that there are times when one can determine that one need not even bother (spend time) looking (which takes time and resources).

Information sign More: Nothing is something: actions
Information sign More: Logical conjunction



24. Logical disjunction
Logical disjunction is true if either or both operands are true. Some other symbols for Or:

25. Sets and Venn diagram
Venn diagram set unionLogical disjunction (i.e., "Or") is related to the intersection operation of sets.

26. Set union
Here is a mathematical definition of set union Equation for set union


27. Natural language
Logical disjunction is not the same as the natural language "or", which is an exclusive "or" and not an inclusive "or".

Question: Would you like a piece of pie or a piece of cake?

28. Pie or cake
A logical answer is, "Yes", That is, I would like either a piece of pie, or a piece of cake, or both. I'll take both.

The natural language answer is to pick one of the two, but not both.

As a consequence, you must always be careful when using the word "or".


29. Exclusive or



30. Query
The query command is something like "find all pages that contain the specified text".

Search engines on the Internet allow logical operations to be used to limit the search criteria.

Question: When might we need more than two values for logical questions?

31. Multi-valued logic
In a modal dialog box, the user may need to decide between yes, no, and some other choices. Modal dialog box with three choicesA program that requests a user response to a question. Very often, the valid responses are yes, no, and escape (gracefully avoid the question).

32. Multi-valued logic
Determining the sign of an integer, which can be positive, negative, or zero (neither positive nor negative).

How many choices were there for Paul Revere's famous ride?

33. Disjunction
Exclusive OR Inclusive OR

How do you reply what asked if you would like a piece of pie or a piece of cake? Most people are used to exclusive "or".

Computer programmers take the "or" as a "logical" or "inclusive" "or". The negation of a conditional (statement) is needed with an inclusive "or" in order to address the something else of the conditional (statement).

34. End of page

by RS  admin@creationpie.com : 1024 x 640