Boolean logic: Difference between revisions

Content deleted Content added
Aranoff (talk | contribs)
Cardinality is a unary operator.
Undid revision 416216611 by Aranoff (talk) that's an operator in set _theory_, not in "set logic", which is not the same as "boolean logic"
Line 8:
{{Undue|section|date=August 2010}}
 
Sets arecan collectionscontain of unordered objects calledany elements. We will first start out by discussing general set logic, then restrict ourselves to Boolean logic, where elements (or "bits") each contain only two possible values, called various names, such as "true" and "false", "yes" and "no", "on" and "off", or "1" and "0".
 
==Terms==
Line 22:
* The '''empty set''' or '''null set''' is the set of no elements, denoted by <math>\varnothing</math> and sometimes 0.
 
* A '''unary operator''' applies to a single set. There areis twoonly one unary operators. One isoperator, called logical '''NOT'''. It works by taking the [[complement (set theory)|complement]] with respect to the universe, i.e. the set of all elements under consideration. The other is the cardinality. This converts the set into a whole number, the number of elements. This is written as ''n(A)''.
 
* A '''binary operator''' applies to two sets. The basic binary operators are logical '''OR''' and logical '''AND'''. They perform the [[union (set theory)|union]] and [[intersection (set theory)|intersection]] of sets. There are also other derived binary operators, such as '''XOR''' (exclusive OR, i.e., "one or the other, but not both").