Boolean Algebra

Boolean algebra is an algebra that deals with binary variables and logic operations.

A truth table is a table of all possible combinations of the variables, showing the relation between the values that the variables may take and the result of the operation.

There are three basic logical operations:

  • AND \((\cdot)\): This operation is represented by a dot \((\cdot)\) or by the absence of an operator.

    Truth table for AND operation,

    \(x\)\(y\)\(x \cdot y\)
    \(0\)\(0\)\(0\)
    \(0\)\(1\)\(0\)
    \(1\)\(0\)\(0\)
    \(1\)\(1\)\(1\)
  • OR \((+)\): This operation is represented by a plus \((+)\) sign.

    Truth table for OR operation,

    \(x\)\(y\)\(x + y\)
    \(0\)\(0\)\(0\)
    \(0\)\(1\)\(1\)
    \(1\)\(0\)\(1\)
    \(1\)\(1\)\(1\)
  • NOT \(({}^{\prime})\): This operation is represented by a prime \(({}^{\prime})\) or an overline \((\overline{})\), also referred to as the complement operation, since it changes a \(1\) to \(0\) and a \(0\) to \(1\).

    Truth table for NOT operation,

    \(x\)\(x^{\,\prime}\)
    \(0\)\(1\)
    \(1\)\(0\)

For the operator precedence, expressions inside parentheses must be evaluated before all other operations. The next operation that holds precedence is the complement or NOT \((')\), and then follows the AND \((\cdot)\), and finally, the OR \((+)\).

Postulates and Theorems of Boolean Algebra

The Duality principle states that every algebraic expression deducible from the postulates of Boolean algebra remains valid if the operators and identity elements are interchanged. The dual of a Boolean algebraic expression is obtained by interchanging AND \((\cdot)\) and OR \((+)\) operators while complementing \(1\)’s and \(0\)’s.

PostulatesDuality
1\(\displaystyle 0 \cdot 0 = 0\)\(\displaystyle 1 + 1 = 1\)
2\(\displaystyle 0 \cdot 1 = 0\)\(\displaystyle 1 + 0 = 1\)
3\(\displaystyle 1 \cdot 0 = 0\)\(\displaystyle 0 + 1 = 1\)
4\(\displaystyle 1 \cdot 1 = 1\)\(\displaystyle 0 + 0 = 0\)
5\(\displaystyle 0^{\prime} = 1\)\(\displaystyle 1^{\prime} = 0\)
TheoremsDuality
Associative\(\displaystyle x + (y + z) = (x + y) + z\)\(\displaystyle x \cdot (y \cdot z) = (x \cdot y) \cdot z\)
Commutative\(\displaystyle x + y = y + x\)\(\displaystyle x \cdot y = y \cdot x\)
Distributive\(\displaystyle x \cdot (y + z) = x \cdot y + x \cdot z\)\(\displaystyle x + (y \cdot z) = (x + y) \cdot (x + z)\)
Identity\(\displaystyle x + 0 = x\)\(\displaystyle x \cdot 1 = x\)
Annihilator\(\displaystyle x + 1 = 1\)\(\displaystyle x \cdot 0 = 0\)
Idempotence\(\displaystyle x + x = x\)\(\displaystyle x \cdot x = x\)
Absorption\(\displaystyle x + x \cdot y = x\)\(\displaystyle x \cdot (x + y) = x\)
Involution\(\displaystyle \left(x^{\,\prime}\right)^{\prime} = x\)
Complementation\(\displaystyle x + x^{\,\prime} = 1\)\(\displaystyle x \cdot x^{\,\prime} = 0\)
De Morgan\(\displaystyle (x + y)^{\prime} = x^{\,\prime} \cdot y^{\,\prime}\)\(\displaystyle \left(x \cdot y\right)^{\prime} = x^{\,\prime} + y^{\,\prime}\)
Consensus\(\displaystyle x \cdot y + x^{\,\prime} \cdot z + y \cdot z = x \cdot y + x^{\,\prime} \cdot z\)\(\displaystyle (x + y) \cdot \left(x^{\,\prime} + z\right) \cdot (y + z) = (x + y) \cdot \left(x^{\,\prime} + z\right)\)
Transposition\(\displaystyle x \cdot y + x^{\,\prime} \cdot z = (x + z) \cdot \left(x^{\,\prime} + y\right)\)\(\displaystyle (x + y) \cdot \left(x^{\,\prime} + z\right) = x \cdot z + x^{\,\prime} \cdot y\)
\(\displaystyle x + x^{\,\prime} \cdot y = x + y\)\(\displaystyle x \cdot \left(x^{\,\prime} + y\right) = x \cdot y\)
\(\displaystyle x \cdot y + x \cdot y^{\,\prime} = x\)\(\displaystyle (x + y) \cdot \left(x + y^{\,\prime}\right) = x\)
\(\displaystyle x \cdot y + x^{\,\prime} \cdot y \cdot z = x \cdot y + y \cdot z\)\(\displaystyle (x + y) \cdot \left(x^{\,\prime} + y + z\right) = (x + y) \cdot (y + z)\)
\(\displaystyle x \cdot F\left(x,\,x^{\,\prime},\,y,\,z,\,\dots\right) = x \cdot F\left(1,\,0,\,y,\,z,\,\dots\right)\)\(\displaystyle x + F\left(x,\,x^{\,\prime},\,y,\,z,\,\dots\right) = x + F\left(0,\,1,\,y,\,z,\,\dots\right)\)
\(\displaystyle x^{\,\prime} \cdot F\left(x,\,x^{\,\prime},\,y,\,z,\,\dots\right) = x^{\,\prime} \cdot F\left(0,\,1,\,y,\,z,\,\dots\right)\)\(\displaystyle x^{\,\prime} + F\left(x,\,x^{\,\prime},\,y,\,z,\,\dots\right) = x^{\,\prime} + F\left(1,\,0,\,y,\,z,\,\dots\right)\)
\(\displaystyle F\left(x,\,x^{\,\prime},\,y,\,z,\,\dots\right) = x \cdot F\left(1,\,0,\,y,\,z,\,\dots\right) + x^{\,\prime} \cdot F\left(0,\,1,\,y,\,z,\,\dots\right)\)\(\displaystyle F\left(x,\,x^{\,\prime},\,y,\,z,\,\dots\right) = \left[x + F\left(0,\,1,\,y,\,z,\,\dots\right)\right] \cdot \left[x^{\,\prime} + F\left(1,\,0,\,y,\,z,\,\dots\right)\right]\)

Boolean Functions

A Boolean function \(F\) described by an algebraic expression consists of binary variables, the constants \(0\) and \(1\), and the logic operation symbols. For a given value of the binary variables, the function can be equal to either \(1\) or \(0\).

A Boolean function \(F\) can be represented in a truth table. The number of rows in the truth table is \(2^n\), where \(n\) is the number of variables in the function. The binary combinations for the truth table are obtained from the binary numbers by counting from \(0\) through \(2^n - 1\).

For example, a Boolean function \(\displaystyle F = x + y^{\,\prime} \cdot z\)

\(F\) is equal to \(1\) if \(x\) is equal to \(1\) or if both \(y^{\,\prime}\) and \(z\) are equal to \(1\). \(F\) is equal to \(0\) otherwise. The complement operation dictates that when \(y^{\,\prime} = 0\), \(y = 1\).

The truth table for function \(F\),

\(x\)\(y\)\(z\)\(\displaystyle F = x + y^{\,\prime}z\)
\(0\)\(0\)\(0\)\(0\)
\(0\)\(0\)\(1\)\(1\)
\(0\)\(1\)\(0\)\(0\)
\(0\)\(1\)\(1\)\(0\)
\(1\)\(0\)\(0\)\(1\)
\(1\)\(0\)\(1\)\(1\)
\(1\)\(1\)\(0\)\(1\)
\(1\)\(1\)\(1\)\(1\)

When a Boolean expression is implemented with logic gates, each term requires a gate and each variable within the term designates an input to the gate. A literal is a single variable within a term, in complemented or uncomplemented form.

There is only one way that a Boolean function can be represented in a truth table. However, when the function is in algebraic form, it can be expressed in a variety of ways, all of which have equivalent logic.

By manipulating a Boolean expression according to the rules of Boolean algebra, it is sometimes possible to obtain a simpler expression for the same function and thus reduce the number of gates in the circuit and the number of inputs to the gate.

Complement of a Function

The complement of a function \(F\) is \(F^{\prime}\) and is obtained from an interchange of \(0\)’s for \(1\)’s and \(1\)’s for \(0\)’s in the value of \(F\). The complement of a function may be derived algebraically through De Morgan’s theorems.

De Morgan’s theorems can be extended to \(n\) variables,

\(\boxed{\left(A_1 + A_2 + A_3 + \cdots + A_n\right)^{\prime} = A_{1}^{\prime} \cdot A_{2}^{\prime} \cdot A_{3}^{\prime} \cdots A_{n}^{\prime}}\)

By applying the duality principle,

\(\boxed{\left(A_1 \cdot A_2 \cdot A_3 \cdots A_n\right)^{\prime} = A_{1}^{\prime} + A_{2}^{\prime} + A_{3}^{\prime} + \cdots + A_{n}^{\prime}}\)

The generalized form of De Morgan’s theorems states that the complement of a function \(F\) is obtained by interchanging AND \((\cdot)\) and OR \((+)\) operators and complementing \(({}^{\prime})\) each literal. In other words, take the dual of the function \(F\) and complement each literal.

For example, find the complement of function \(\displaystyle F = x^{\,\prime} \cdot y \cdot z^{\,\prime} + x^{\,\prime} \cdot y^{\,\prime} \cdot z\)

By applying the duality principle,

The dual of \(F\) is \(\displaystyle \left(x^{\,\prime} + y + z^{\,\prime}\right) \cdot \left(x^{\,\prime} + y^{\,\prime} + z\right)\)

Then complement each literal,

\(\displaystyle F^{\prime} = \left(x + y^{\,\prime} + z\right) \cdot \left(x + y + z^{\,\prime}\right)\)

Links to this page
  • Latches

    Outputs \(Q\) and \(\bar{Q}\) are normally the complement of each other. However, when both inputs are equal to \(0\) at the same time, a condition in which both outputs are equal to \(1\) occurs. If both inputs are then switched to \(1\) simultaneously, the device will enter an unpredictable or undefined state.

    Outputs \(Q\) and \(\bar{Q}\) are normally the complement of each other. However, when both inputs are equal to \(1\) at the same time, a condition in which both outputs are equal to \(0\) occurs. If both inputs are then switched to \(0\) simultaneously, the device will enter an unpredictable or undefined state.

    The De Morgan (complement) equivalent of \(S\)-\(R\) NOR latch.

    The De Morgan (complement) equivalent of \(\bar{S}\)-\(\bar{R}\) NAND latch.

  • Karnaugh Map (K-map)

    The number of cells in a Karnaugh map, as well as the number of rows in a truth table, is equal to \(2^n\) possible input variable combinations, where \(n\) is the number of variables in a Boolean function.

  • Forms of Boolean Algebra

    Taking the complement of \(F^{\prime}\) by De Morgan’s theorem, the function \(F\) is obtained in a different form

    The maxterm with subscript \(i\) is a complement of the minterm with the same subscript \(i\) and vice versa.

    To express a Boolean function as a product of maxterms, it must first be brought into a form of OR terms. This may be done by using the distributive law. Then any missing variable \(x\) in each OR term is OR-ed \((+)\) with \(x \cdot x^{\,\prime}\). Similar maxterms can be combined by using the idempotence theorem.

    To express a Boolean function as a sum of minterms, it must first be brought into a form of AND terms. This may be done by using the distributive law. Then any missing variable \(x\) in each AND term is AND-ed \((+)\) with \(x + x^{\,\prime}\). Similar minterms can be combined by using the idempotence theorem.

    Boolean functions expressed as a sum of minterms or product of maxterms are said to be in canonical form.

  • Flip-Flops

    The logical properties of a flip-flop, as described in the characteristic table, can be expressed algebraically (Boolean expression) with a characteristic equation.

    The next state of a \(J\)-\(K\) flip-flop is equal to the present state when inputs \(J\) and \(K\) are both equal to \(0\). This condition can be expressed as \(Q(t + 1) = Q(t)\), indicating that the clock produces no change of state. When \(K = 1\) and \(J = 0\), the clock resets the flip-flop and \(Q(t + 1) = 0\). With \(J = 1\) and \(K = 0\), the flip-flop sets and \(Q(t + 1) = 1\). When both \(J\) and \(K\) are equal to \(1\), the next state changes to the complement of the present state, a transition that can be expressed as \(Q(t + 1) = Q'(t)\).

    When \(T = 0\), the clock edge does not change the state. When \(T = 1\), the clock edge complements (toggles) the state of the flip-flop. The characteristic equation for the \(T\) flip-flop can be expressed as

  • Combinational Logic Circuits

    A combinational circuit can be described by \(m\) Boolean functions, one for each output variable. Each output function is expressed in terms of the \(n\) input variables.

    For \(n\) input variables, there are \(2^n\) possible combinations of the binary inputs. For each possible input combination, there is one possible value for each output variable. Thus, a combinational circuit can be specified with a truth table that lists the output values for each combination of input variables.

    The design of combinational circuits starts from the specification of the design objective and culminates in a logic circuit diagram or a set of Boolean functions from which the logic diagram can be obtained. The procedure involves the following steps:

    To obtain the output Boolean functions of a combinational circuit from its logic diagram, the process involves:

    To obtain the truth table directly from the logic diagram without going through the derivations of the Boolean functions, the process involves:

#logic