This page has not been looked at yet My apologies for any issues this may cause.
4.2.2 : Or
Now that we've done a simple one input one output inversion, let's move onto two inputs one output. OR is an operator that renders true when at least one of two statements is true. Let's consider the weather. It is a good day if "The sky is blue" OR "It is sunny". If the sky is blue and it's not sunny, it's still a good day. If the both the sky is blue and it is sunny, then it's a good day. Let's set up a truth table and further analyze this operator. Our truth table now has 4 rows. If you look closely, the rows count upwards, 0 1 2 3 in binary. Whenever you set up a truth table, this is the best way to do it.
Notation: x + y , x ∨ y
x | y | x ∨ y |
---|---|---|
0 | 0 | 0 |
0 | 1 | 1 |
1 | 0 | 1 |
1 | 1 | 1 |
In regular algebra, OR is comparable to addition. Let's think of adding 0 and random positive values. The only way to get 0 from adding not negative values is to add 0 and 0. If we add 0 to any positive value, we get that positive value. If we add two positive values, we got a different positive value. This is similar to how when performing OR, the only way to get F is to have all values be False. One of the notations for OR is the plus sign (+) just as addition.
We see a similar relation to addition in set theory. A union of two sets is all the elements in both sets. I included a venn diagram below. The highlighted in blue is what would be in the union of A and B. Once again, the union is everything in A added to everything in B. The symbol for union (∪) also looks very similar to that of OR (∨).
Practice Problem
If y is false and (x ∨ y) is true, what is x?