Lecture 3: Boolean Algebra I  the Basics

A knowledge of Boolean algebra serves two main purposes: firstly, to formally describe and define the function of a logic circuit; and secondly, by simplifying the Boolean expression defining a particular circuit, one can simplify the or reduce the associated hardware, ie make more efficient use of the available hardware resources.

Learning Outcomes:

On completing this lecture, you will be able to

  • prove a number of useful basic theorems from given Boolean axioms;
  • simplify and complement Boolean expressions;
  • define the fundamental logic operations AND, OR, Invert;
  • relate Boolean expressions to truth tables and logic diagrams.

3.1Boolean Algebra Definitions and Axioms

So-called two-valued Boolean algebra comprises

  • the set of values ,
  • variables a, b, c, …….. x, y, z which represent either element of B,
  • a pair of binary operators “+” and “.” and a unary inverse operator denoted “  “
  • a set of basic algebraic relations called axioms which we subsequently use to build up a repertoire of useful theorems.

A binary operator here means a function f which operates on two variables, say a and b, to produce a dependent variable, say x

Clearly a unary operator applies to a single variable.

Because each variable is restricted to two possible values, it is most convenient to define the operations by means of truth tables, ie listings of function values for all possible value-combinations of the independent variables:

3-1

a / b / a+b
0 / 0 / 0
0 / 1 / 1
1 / 0 / 1
1 / 1 / 1
a / b / a.b
0 / 0 / 0
0 / 1 / 0
1 / 0 / 0
1 / 1 / 1
a / a
0 / 1
1 / 0

3-1

The + operator is known as the OR function in the logic domain; the function has a value of 1 if either or both of the independent variables has the value of 1. The Boolean multiplication operator is known as the AND function in the logic domain; the function evaluates to 1 only if both the independent variables have the value 1.

Based on these definitions the following axiomatic relationships hold:

A1Closure(a) (b)

A2Identity(a) (b)

A3Commutation(a) (b)

A4Distribution(a) (b)

A5Inverse(a) (b)

We must now check that the axioms do indeed accord with the definitions. Properties A1 are immediately obvious while the following truth tables verify A2:

3-1

a / a+0
0 / 0+0=0
1 / 1+0=1
a / a.1
0 / 0.1=0
1 / 1.1=1

3-1

A3 may also be verified by truth table:

a / b / a+b / b+a / a.b / b.a
0 / 0 / 0+0=0 / 0+0=0 / 0.0=0 / 0.0=0
0 / 1 / 0+1=1 / 1+0=1 / 0.1=0 / 1.0=0
1 / 0 / 1+0=1 / 0+1=1 / 1.0=0 / 0.1=0
1 / 1 / 1+1=1 / 1+1=1 / 1.1=1 / 1.1=1

We next consider A4(a)

a / b / c / b+c / a.(b+c) / a.b / a.c / (a.b)+(a.c)
0 / 0 / 0 / 0 / 0 / 0 / 0 / 0
0 / 0 / 1 / 1 / 0 / 0 / 0 / 0
0 / 1 / 0 / 1 / 0 / 0 / 0 / 0
0 / 1 / 1 / 1 / 0 / 0 / 0 / 0
1 / 0 / 0 / 0 / 0 / 0 / 0 / 0
1 / 0 / 1 / 1 / 1 / 0 / 1 / 1
1 / 1 / 0 / 1 / 1 / 1 / 0 / 1
1 / 1 / 1 / 1 / 1 / 1 / 1 / 1

Axiom A4(b) may be similarly verified and is left as an exercise.

Finally, the A5 relations are verified from

a / a / a+a / a.a
0 / 1 / 1 / 0
1 / 0 / 1 / 0

While much of the algebra is similar to standard algebra, the differences are that A4 (b) does not hold in standard algebra and there is no counterpart to the inverse function as defined here. Another important feature of Boolean algebra is duality. The set of (b) axioms are said to be duals of the (a) axioms, and vice versa, in that a (b) axiom can be formed from its (a) counterpart by exchanging operators and identity elements:

Thus for every theorem derived from one particular set of axioms, one can construct a dual theorem based on the corresponding set of dual axioms.

3.2Some Theorems of Boolean Algebra

As stated earlier these theorems will subsequently be used for simplifying logic circuits and also, sometimes, for devising alternative logic networks to realise a particular function. The theorems are mainly proved using algebraic manipulation of the given axioms. Where this method becomes awkward, the truth table method may be used as an alternative.

T1 (a)

Proof:

From the Duality Principle, we have the dual theorem T1 (b)

T2 (a)

Proof:

Again from duality, we have the dual theorem T2 (b)

T3

By truth table analysis we have

X / X / (X)’
0 / 1 / 0
1 / 0 / 1

T4(a)and (b)

may also be readily proved by truth table analysis and again are left as exercises.

T5 (a)

X / Y / X+Y / (X+Y)’ / X’ / Y’ / X’ . Y’
0 / 0 / 0 / 1 / 1 / 1 / 1
0 / 1 / 1 / 0 / 1 / 0 / 0
1 / 0 / 1 / 0 / 0 / 1 / 0
1 / 1 / 1 / 0 / 0 / 0 / 0

The dual is the relation T5 (b)

T5 (a) and (b) constitute what are known as De Morgan’s laws.

3.3Boolean Simplifications

As stated earlier, one of the primary purposes of developing a familiarity with Boolean algebra is to allow for the possibility of simplifying Boolean expressions and thereby saving hardware resources. We demonstrate some examples of such simplifications.

Example 3.1: Simplify the expression

Result:

Example 3.2: Simplify the expression

Result

The complexity of a Boolean expression is specified by the number of literals in the expression  a literal is each occurrence of a variable or its complement. Thus, the left hand side of Example 3.2 has 6 literals while the final right hand side has 4 literals.

3.4Logic Gates

These are electronic circuits which are specifically designed

(a)to operate on digital signals VH and VL representing the Boolean values 1 and 0, and

(b)to carry out the basic logic functions already defined in the context of Boolean algebra.

The basic logic gates and their associated logic diagrams are as follows:

AND Gate

OR Gate

Inverter

For reasons to do with the way electronic devices function in a switching mode, the most primitive or fundamental logic circuits are:

NAND Gate

3-1

a / b / (a.b)’
0 / 0 / 1
0 / 1 / 1
1 / 0 / 1
1 / 1 / 0

3-1

From a logic point of view, this gate is equivalent to an AND gate followed by an inverter. However, electronically it contains fewer devices than the AND gate.

NOR Gate

3-1

a / b / (a+b)’
0 / 0 / 1
0 / 1 / 0
1 / 0 / 0
1 / 1 / 0

3-1

Again this is logically equivalent to an OR gate followed by an Inverter but is more simple electronically than the OR gate.

For the present, we will stick with the more intuitively accessible AND/OR/Inverter elements. Later, we will demonstrate how to generate equivalent circuits using NAND/NOR elements.

3.5The Logic Circuit

Consider the following logic circuit based on AND, OR and Inverter elements:

By following the circuit through from the three inputs X, Y, Z, to the output F, it should be clear that the output can be described by the Boolean equation

In effect, the equation is stating:

The statement may also be encapsulated in the following truth table

Row / X / Y / Z / F
0 / 0 / 0 / 0 / 0
1 / 0 / 0 / 1 / 1
2 / 0 / 1 / 0 / 0
3 / 0 / 1 / 1 / 1
4 / 1 / 0 / 0 / 1
5 / 1 / 0 / 1 / 1
6 / 1 / 1 / 0 / 0
7 / 1 / 1 / 1 / 0

The column marked “Row” is simply used as a means of tagging particular input combinations. Note that the output 1 in row 1 is associated with the X’.Y’.Z term in F, the 1 in row 3 is associated with X’.Y.Z while the 1’s in rows 4 and 5 are associated with X.Y’

It is also worth emphasising that precisely the same information is conveyed by the logic circuit, the Boolean equation, and the truth table.

From our knowledge of Boolean algebra, we can manipulate the F expression as follows:

and this alternative formulation leads to the following logic diagram which is clearly a more simple circuit:

Formally, whereas the original expression for F has a complexity of 8 literals, the alternative has a complexity of 4 literals.

3.6Complements

Sometimes, rather than implementing a particular Boolean function, we might consider implementing its logical complement. Consider for example the function

We can find the complementary function through repeated application of De morgan’s laws:

where the last line follows from Example 3.2. We note that in this particular case there is no reduction in complexity.

Comparing truth tables for F and F’, we get

Row / X / Y / Z / F=X’.Z+X.Y’ / F’=X.Y+X’.Z’
0 / 0 / 0 / 0 / 0 / 1
1 / 0 / 0 / 1 / 1 / 0
2 / 0 / 1 / 0 / 0 / 1
3 / 0 / 1 / 1 / 1 / 0
4 / 1 / 0 / 0 / 1 / 0
5 / 1 / 0 / 1 / 1 / 0
6 / 1 / 1 / 0 / 0 / 1
7 / 1 / 1 / 1 / 0 / 1

As might be expected, the 1’s and 0’s are interchanged as one goes from F to F’.

3.7Conclusion

In this lecture, we have defined and set out the basic concepts and theorems of Boolean algebra. We have seen the one-to-one relationship between Boolean algebra and logic circuits composed of AND, OR, and Invert gates. Our next task is to develop further the Boolean formalism.

3-1