Boolean logic: Difference between revisions

Content deleted Content added
Undid revision 416215833 by Aranoff (talk) that's a set operator, not a boolean operator. The first wasn't even a set operator
Aranoff (talk | contribs)
Cardinality is a unary operator.
Line 8:
{{Undue|section|date=August 2010}}
 
Sets canare containcollections anyof unordered objects called 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 isare only onetwo unary operator,operators. One is 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").