ELEC0004 Digital Electronics 1
TOPIC 1 Boolean algebra
Objectives
To introduce Boolean algebra which serves as a mathematical framework for the design and
analysis of digital logic circuits.
To look at the operations and theorems of Boolean algebra.
To introduce the principle of duality.
To introduce the Venn diagram.
To verify Boolean algebra relationships using truth tables and Venn diagrams.
To apply Boolean algebra to logic design.
1.1 Introduction
In the ELEC0002 Introduction to Electronic Engineering module, the basic concepts of binary logic
circuits were introduced and the principal logic gates, such as AND, OR and NOT gates were
described (Table 1). We studied how, from a truth table or verbal proposition describing the desired
functionality of a system, we can write a Boolean expression, from which the design of a logic circuit,
based on the principal gates, can be obtained.
However, that expression does not necessarily lead to the simplest set of logic gates. Just as you use
algebra to simplify mathematical equations, you can use Boolean algebra to simplify Boolean
equations. The rules of Boolean algebra are much like those of ordinary algebra but are in some cases
simpler, because variables have only two possible values: 0 or 1.
Boolean algebra is based on a set of axioms that we assume are correct. Axioms are unprovable in the
sense that a definition cannot be proved. From these axioms, we prove all the theorems of Boolean
algebra. These theorems have great practical significance, because they allow us (or automated digital
circuit design software tools) to simplify logic to produce smaller and less costly circuits.
ELEC0004 Digital Electronics 1: Boolean algebra
Table 1 The principal logic gates
2
ELEC0004 Digital Electronics 1: Boolean algebra
1.2 Principles of logic
The principles of logic were developed by George Boole, who, along with Augustus De Morgan
developed a basic set of rules that govern the relationship between the true-false statements of logic.
Boole's work laid the foundation to what later became known as Boolean algebra. 100 years later,
Claude Shannon, working at Bell Laboratories, applied Boole's work to analysis of switching circuits in
telephone exchanges.
a mathematical basis for the electronic processing of binary information.
The theory of electronic logic systems is often called 'switching theory'.
At 21 years old, Augustus De Morgan (b. 1806, d. 1871) was the
youngest of the original UCL professors when he was appointed in
1828. De Morgan taught logic and mathematics, and was a prolific
writer, who made a key contribution to the development of modern
symbolic logic. He published the book Formal Logic: or, the Calculus
of Inference, Necessary and Probable.
In the following sections, the axioms and theorems of Boolean algebra are described.
1.3 Boolean theorems
1.3.1 Logical operations on constants
We first consider the case of logical operations on constants (1s and 0s). From the truth tables for
AND OR and NOT functions,
Truth Table
Function
A
B
Z
AND
0
0
1
1
0
1
0
1
0
0
0
1
OR
0
0
1
1
0
1
0
1
0
1
1
1
NOT
0
1
1
0
3
ELEC0004 Digital Electronics 1: Boolean algebra
We obtain directly
AND
OR
NOT
0.0=0
0+0=0
0.1=0
0+1=1
0 =1
1.0=0
1+0=1
1=0
1.1=1
1+1=1
In the AND operations, 0 dominates; if one or more inputs are at 0, then the output becomes 0.
In the OR expressions, a logical 1 on the inputs is dominant. The output becomes 1 if one or more
inputs are at 1.
These expressions are known as Huntington's postulates.
1.3.2 Logical operations on one variable
From the truth tables for AND OR and NOT functions,
AND
OR
A.0=0
A+0=A
A.1=A
A+1=1
A.A=A
A+A=A
A.A =0
A+A =1
NOT
A =A
1.3.3 Logical operations on two or more variables
Commutation
A+B=B+A
A.B = B.A
The commutation rule states that there is no significance in the order of the variables.
A OR B is identical to B OR A.
Absorption
(1)
(2)
A + A.B = A
Proof:
Use A.1=A and 1 + B = 1
A + A.B = A.1 + A.B = A.(1 + B) = A.1 = A
A.(A + B) = A
Proof:
A.(A + B) = A.A + A.B = A + A.B = A
4
ELEC0004 Digital Electronics 1: Boolean algebra
The absorption rule can be used to simplify logic expressions. The two absorption rules are duals of
each other.
A dual function has the same variables in the same position but the AND and OR operations are
interchanged. All Boolean theorems have duals.
Association
A + (B + C) = (A + B) + C = (A + C) + B = A + B + C
A.(B.C) = (A.B).C = (A.C).B = A.B.C
The association rule allows variables within the same logic operation to be grouped together in any
order.
For example, the OR of three variables A, B and C can be achieved either with one three-input OR
gate, A + B + C.
A
B
C
A+B+C
or two gates each having two inputs.
A
B
A+B+C
C
The first gate can produce the OR of any two input variables. The output is then OR’ed with the third
variable giving
(A + B) + C or
(A + C) + B or
A + (B + C).
All four versions are logically identical.
5
ELEC0004 Digital Electronics 1: Boolean algebra
De Morgan’s theorem
De Morgan's theorems are most important in logic design.
They relate AND to OR (or NOR) and OR to AND (or NAND).
(1) 𝐴 + 𝐵 = 𝐴. 𝐵
(2)
𝐴. 𝐵 = 𝐴 + 𝐵
To change AND to OR
Negate original variables of the AND
Change AND to OR
Negate the whole expression
To change OR to AND
Negate original variables of the OR
Change OR to AND
Negate the whole expression
De Morgan’s theorem is not limited to two variables, e.g.
A B C D A.B.C.D
A.B.C.D A B C D
Distributive laws
(1)
(2)
A.(B + C) = A.B + A.C
A + (B.C) = (A + B).(A + C)
Proof of (2):
(A + B).(A + C)
= A.A + A.C + B.A + B.C
= A.(1 + B + C) + B.C
= A + (B.C)
Distribution is a process similar to factorisation in arithmetic. The distributive laws are self-duals.
Minimisation theorems
(1a)
A.B + A B = A
(1b)
(A + B).(A + B) = A
(2a)
A + A .B = A + B
(2b)
A.( A + B) = A.B
6
ELEC0004 Digital Electronics 1: Boolean algebra
Theorems (1a, 1b) and (2a, 2b) are self-duals.
Proof of theorem (1b)
(A + B).(A + B) = A.A + A.B + B.A + B.B
= A.(1 + B + B)
=A
Distribution is a process similar to factorisation in arithmetic.
The distributive laws are self-duals.
Order of precedence of operations
Order of precedence for operations in Boolean algebra:
1 Bracketed functions e.g. (A + B) and ‘barred’ or inverted functions
2 AND operations
3 OR operations
Note: INVERSION is the same as NOT.
The expression A + B.C means: B AND’ed with C and the result OR’ed with A.
It is not: A OR’ed with B and the result AND’ed with C. This would have to be written (A + B).C
The digital systems engineer must be aware of the principles of Boolean algebra.
The operations on logical constants and single variables are rather obvious and can easily be
established from first principles. The associative and commutative properties occur in arithmetic.
De Morgan’s theorems, however, are important in the design of logic systems. They do not have a
parallel in arithmetic and must be learnt.
Graphical and tabular methods of simplifying logic equations can replace the absorption and
minimisation theorems.
7
ELEC0004 Digital Electronics 1: Boolean algebra
1.4 Verification of Boolean theorems and Venn diagrams
Boolean theorems can be verified in three ways
(1) logical reasoning
(ii) demonstrating equivalence relationships on a Venn diagram
(iii) using a truth table
1.4.1 Verification of Boolean theorems by logical reasoning
Let’s consider an example to illustrate the idea of verifying a theorem by logical reasoning.
Worked example
Show that A + A = 1 using logical reasoning
Solution
Let
F=A+ A
The equation reads
F is 1 iff A is 1 or not A is 1
Note: 'iff' reads 'if and only if'.
But
not A is 1 means A is 0.
Therefore
F is l iff A is l or A is O
But A is binary and must be either 0 or 1, so one of the conditions for
A is always satisfied.
F is always 1
A+ A =1
8
ELEC0004 Digital Electronics 1: Boolean algebra
1.4.2 The Venn diagram
We can use Venn diagrams to represent Boolean expressions, and to verify Boolean theorems.
Binary variables are represented as overlapping areas in a universe:
B
A
OR function - combination or union of areas:
A+B
AND function - intersection or common part between two or more overlapping areas:
AB
The NOT function is the remainder of the universe outside a given area
_
A
Equivalent functions have identical areas on a Venn diagram.
9
ELEC0004 Digital Electronics 1: Boolean algebra
Worked Example
Show that A. B + A. B = A by using Venn diagrams.
Solution
The final Venn diagram is identical to the Boolean expression F = A.
1.4.3 Truth tables
To demonstrate the truth of a Boolean theorem, write down the truth tables for both sides of the
equation. If they are identical for all input values, then the identity is true.
Worked Example
Show that A. B + A. B = A by using truth tables.
Solution
Let
F = A. B + A. B . The truth table for F is
10
ELEC0004 Digital Electronics 1: Boolean algebra
A
B
A.B
A. B
F= AB + A B
0
0
0
0
0
0
l
0
0
0
1
0
0
1
1
1
1
1
0
1
By comparing columns A and F, it can be seen that they are identical.
Worked Example 2.7
Verify De Morgan's theorem A.B = A + B using truth tables.
Solution
Let F1 = A.B and F2 = A + B.
The truth tables for F1 and F2 are
A
B
A.B
F1=A.B
0
0
0
1
0
1
0
1
1
0
0
1
1
1
1
0
A
B
A
B
F2=A + B
0
0
1
1
1
0
1
1
0
1
1
0
0
1
1
1
1
0
0
0
Comparing F1 and F2 we see that they are identical for every input AB.
Hence
A.B = A + B
11
ELEC0004 Digital Electronics 1: Boolean algebra
1.5 Truth table equivalence
Consider the case of two logic systems, where
- one is extremely complex
- the other is simple
It is important to know whether they perform the same process. If they do, then the engineer would
always choose the simpler system. Boolean algebra can be used to prove identities. However, in
practice
- this depends largely on the person's expertise
- success cannot be guaranteed.
A more reliable method of demonstrating equivalence between two systems is to generate their
respective truth tables.
If two or more systems have identical truth tables, then they perform the same function.
Worked Example
If F1 = A(A +B) + BC(A + B) + B(A C)
and F2 = A + C
determine whether F1 = F2 by means of truth tables.
Remember A C is the EX.OR function and equal to A. C + A .C
Solution
F1 is a function of A, B and C.
F2 can be considered a function of A, B and C with its output independent of B.
12
ELEC0004 Digital Electronics 1: Boolean algebra
npu t
I Inputs
s
Inter
m ed iate terms
term s
Intermediate
O ut puts
Outputs
A
B
C
A (A + B )
BC( A + B)
B (A C )
F1
F2
0
0
0
0
1
1
1
1
0
0
1
1
0
0
1
1
0
1
0
1
0
1
0
1
0
0
0
0
1
1
1
1
0
0
0
1
0
0
0
1
0
1
0
0
1
0
0
0
0
1
0
1
1
1
1
1
0
1
0
1
1
1
1
1
By comparing the output columns, we can see that F1 and F2 always have the same value for each and
every output. Hence F1 = F2. The two functions are equivalent, and can be implemented with a single
OR gate.
1.6 Summary
In this topic, we have looked at the axioms and theorems of Boolean algebra, and studied its
application to logic circuit design, in particular in minimising circuit complexity (reducing the number
of logic gates needed to achieve a given functionality).
We have studied a number of methods for Boolean theorem verification and to test for the
equivalence of two Boolean functions:
- logical reasoning
- Venn diagram
- truth table equivalence
In some cases, truth table equivalence may provide a quicker and more efficient means of proving an
identity than the use of Boolean algebra.
13