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, and are commutative, and LO2 and RO2 are noncommutative. LO2, RO2 and are bands and also inverse semigroups. Determination of semigroups with two elements Choosing the set 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 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 . 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. The binary operation defined by the matrix in an orange background is associative and pairing it with A creates a semigroup. This is the left zero semigroup LO2. It is not commutative. The binary operation defined by the matrix in a purple background is associative and pairing it with A creates a semigroup. This is the right zero semigroup RO2. It is also not commutative. The