Boolean Logic Article Index for
Boolean
Shopping
Boolean
Website Links For
Logic
 

Information About

Boolean Logic




''Using the Algebra Of Sets , this article contains a basic intro to Set s, Boolean operations, Venn Diagram s, Truth Tables , and Boolean applications.
The Boolean Algebra article discusses the Algebraic Structure of applied Boolean logic. The Binary Arithmetic article discusses the use of Binary numbers in Computer systems.


TERMS


Let ''X'' be a set:
  • An element is one member of a set. This is denoted by \in. If it's not an element of the set, this is denoted by

  • otin.


  • The universe is the set ''X'', sometimes denoted by 1. Note that this use of the word universe means ''"all elements being considered"'', which are not necessarily the same as ''"all elements there are"''.


  • The empty set or '''null set''' is the set of no elements, denoted by arnothing and sometimes 0.


  • A unary operator applies to a single set. There is one unary operator, called logical '''NOT'''. It works by taking the Complement .


  • A binary operator applies to two sets. The basic binary operators are logical '''OR''' and logical '''AND'''. They perform the Intersection and Union of sets. There are also other derived binary operators, such as '''XOR''' (exclusive OR).


  • A subset is denoted by A \subseteq B and means every element in set A is also in set B.


  • A proper subset is denoted by A \subset B and means every element in set A is also in set B and the two sets are not equal.


  • A superset is denoted by A \supseteq B and means every element in set B is also in set A.


  • A proper superset is denoted by A \supset B and means every element in set B is also in set A and the two sets are not equal.



EXAMPLE


Let's imagine that set A contains all even numbers (multiples of two) in "the universe" and set B contains all multiples of three in "the universe". Then the intersection of the two sets (all elements in sets A AND B) would be all multiples of six in "the universe".

The complement of set A (all elements NOT in set A) would be all odd numbers in "the universe".


CHAINING OPERATIONS TOGETHER


While at most two sets are joined in any Boolean operation, the new set formed by that operation can then be joined with other sets utilizing additional Boolean operations. Using the previous example, we can define a new set C as the set of all multiples of five in "the universe". Thus "sets A AND B AND C" would be all multiples of 30 in "the universe". If more convenient, we may consider set AB to be the intersection of sets A and B, or the set of all multiples of six in "the universe". Then we can say "sets AB AND C" are the set of all multiples of 30 in "the universe". We could then take it a step further, and call this result set ABC.


Use of parentheses


While any number of logical ANDs (or any number of logical ORs) may be chained together without ambiguity, the combination of ANDs and ORs and NOTs can lead to ambiguous cases. In such cases, parentheses may be used to clarify the order of operations. As always, the operations within the innermost pair is performed first, followed by the next pair out, etc., until all operations within parentheses have been completed. Then any operations outside the parentheses are performed.


PROPERTIES


Let's define symbols for the two primary binary operations as \land / \cap (logical AND/intersection) and \lor / \cup (logical OR/union), and for the single unary operation \lnot / ~ (logical NOT/complement). We will also use the values 0 (logical FALSE/the empty set) and 1 (logical TRUE/the universe). The following properties apply to both Boolean algebra and Boolean logic:

The first three properties define a Lattice ; the first five define a Boolean Algebra .


TRUTH TABLES


For Boolean logic using only two values, 0 and 1, the INTERSECTION and UNION of those values may be defined using Truth Tables such as these:
  { Border "1" cellpadding="4" cellspacing="0"