In mathematics, a semigroup with two elements is a semigroup for which the cardinality of the underlying set is two. There are exactly five nonisomorphic semigroups having two elements: O2, the null semigroup of order two, LO2, the left zero semigroup of order two, RO2, the right zero semigroup of order two, ({0,1}, ∧) (where "∧" is the logical connective "and"), or equivalently the set {0,1} under multiplication: the only semilattice with two elements and the only non-null semigroup with zero of order two, also a monoid, and ultimately the two-element Boolean algebra, (Z2, +2) (where Z2 = {0,1} and "+2" is "addition modulo 2"), or equivalently ({0,1}, ⊕) (where "⊕" is the logical connective "xor"), or equivalently the set {−1,1} under multiplication: the only group of order two. The semigroups LO2 and RO2 are antiisomorphic. O2, ({0,1}, ∧) and (Z2, +2) are commutative, and LO2 and RO2 are noncommutative. LO2, RO2 and ({0,1}, ∧) are bands. Choosing the set A = as the underlying set having two elements, sixteen binary operations can be defined in A. These operations are shown in the table below. In the table, a matrix of the form indicates a binary operation on A having the following Cayley table. In this table: The semigroup ({0,1}, ) denotes the two-element semigroup containing the zero element 0 and the unit element 1. The two binary operations defined by matrices in a green background are associative and pairing either with A creates a semigroup isomorphic to the semigroup ({0,1}, ). Every element is idempotent in this semigroup, so it is a band. Furthermore, it is commutative (abelian) and thus a semilattice. The order induced is a linear order, and so it is in fact a lattice and it is also a distributive and complemented lattice, i.e. it is actually the two-element Boolean algebra. The two binary operations defined by matrices in a blue background are associative and pairing either with A creates a semigroup isomorphic to the null semigroup O2 with two elements.