Warning: Update in progress. Before adding new content, I'm going through and updating the content that already existed that I haven't touched in years. Also fixing up a lot of CSS. I wrote bad code a very long time ago and it's taking a while to update it.
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
{ "width":312, "height":108, "showToolbox":false, "devices":[ {"type":"Toggle","id":"dev0","x":108,"y":12,"label":"X"}, {"type":"Toggle","id":"dev1","x":108,"y":60,"label":"Y"}, {"type":"DC","id":"dev2","x":52,"y":36,"label":"DC"}, {"type":"OR","id":"dev3","x":164,"y":36,"label":"OR"}, {"type":"LED","id":"dev4","x":220,"y":36,"label":"LED"} ], "connectors":[ {"from":"dev0.in0","to":"dev2.out0"}, {"from":"dev1.in0","to":"dev2.out0"}, {"from":"dev3.in0","to":"dev0.out0"}, {"from":"dev3.in1","to":"dev1.out0"}, {"from":"dev4.in0","to":"dev3.out0"} ] }

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?



Back To Top