Lecture 0: Course Introduction

advertisement
Lecture 4: Boolean Algebra II  Standard Forms
Our purpose here is to consider some further Boolean algebraic structures which provide
standardised ways of expressing logic functions and which later lead to non-algebraic
methods of simplification including computer-based methods.
Learning Outcomes:
On completing this lecture, you will be able to:
 Identify the minterms and maxterms of a given logic function;
 Express a Boolean function in canonical sum-of-products form;
 Convert the canonical sum-of-products to a product-of-sums;
 Specify the total set of functions of N variables.
4.1
Standard Forms
Consider a general Boolean function F of three variables A, B, C, in truth table form:
Row
0
1
2
3
4
5
6
7
A
0
0
0
0
1
1
1
1
B
0
0
1
1
0
0
1
1
C
0
1
0
1
0
1
0
1
F
f0
f1
f2
f3
f4
f5
f6
f7
Minterm
A’.B’.C’
A’.B’.C
A’.B.C’
A’.B.C
A.B’.C’
A.B’.C
A.B.C’
A.B.C
There are eight rows in the truth table and for each row we designate the value of the
function by fi, ie each fi represents a 1 or 0 as appropriate. Note also that each row in effect
corresponds to a three-literal product drawn from A, A’, B, B’, C, C’. The three-literal product
term is called a minterm
m5  A.B .C
eg
From the truth table specification we can express the function as follows:
F  f 0 .m0  f1 .m1  f 2 .m2  f 3 .m3  f 4 .m4  f 5 .m5  f 6 .m6  f 7 .m7
This particular formulation is referred to as the canonical sum-of-products or sum-ofminterms.
Example 4.1:
F  A  B.C
A  1 OR B  0 AND C  1
Consider the function
We can state in words:
F  1 if
statement we can generate the truth table:
4-1
and from this
A
0
0
0
0
1
1
1
1
B
0
0
1
1
0
0
1
1
C
0
1
0
1
0
1
0
1
F
0
1
0
0
1
1
1
1
Thus F can be written
F  0. AB C   1. AB C  0. ABC   0. ABC  1. AB C   1. AB C  1. ABC   1. ABC
 m1  m4  m5  m6  m7
or more compactly
F   1,4,5,6,7
4.2
Product of Sums1
Consider as before
F  m1  m4  m5  m6  m7
The complement of F will comprise those minterms which are NOT included in F:
F   m0  m2  m3
 AB C   ABC   ABC
Complementing this to get back to F, we get
F  [ AB C   ABC   ABC ]



  AB C   ABC   ABC 
  A  B  C  A  B   C  A  B   C 
This product-of-sums formulation is based on the following so-called maxterms:
A  B  C   M 0
 A  B  C   M 2
 A  B   C   M 3
The maxterm index can be found by mapping an uncomplemented variable to 0 and a
complemented variable to 1  the opposite convention to indexing a minterm.
The function F can thus be written
1
This section may be omitted; it will not be examined.
4-2
F  M 0M 2M 3
  0,2,3
Alternatively, the product-of-minterms can be read from truth table entries with a 0:
Row
0
1
2
3
4
5
6
7
A
0
0
0
0
1
1
1
1
B
0
0
1
1
0
0
1
1
C
0
1
0
1
0
1
0
1
F
0
1
0
0
1
1
1
1
Maxterm
A+B+C
A+B’+C
A+B’+C’
Note that, between the canonical sum-of-products and the product-of-sums, the full set of
indices in the range 0 to 2N-1 is used
4.3
All Possible Two-Variable Functions
Consider a two-input logic circuit described by a two-variable Boolean equation F(A,B). We
ask: how many different such logic circuits are there? Or equivalently: how many different
two-variable logic circuits are there?
Noting that a two-variable Boolean equation may be written in canonical sum-of-products
form
F  f 0 . AB  f1 . AB  f 2 . AB  f 3 . AB
the question is essentially: in how many different ways can we assign values to the set of
coefficients f0, f1, f2, f3? Since each f i  0 or 1 the number of such functions is 24 = 16. This
set of functions can be specified by means of a “function truth table” based on the f i
coefficients:
Function
f0
f1
f2
f3
F0
F1
F2
F3
F4
F5
F6
F7
F8
F9
F10
F11
F12
F13
F14
F15
0
0
0
0
0
0
0
0
1
1
1
1
1
1
1
1
0
0
0
0
1
1
1
1
0
0
0
0
1
1
1
1
0
0
1
1
0
0
1
1
0
0
1
1
0
0
1
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
4-3
Logic
Operation
F=AB
F=A
F=B
F=A+B
F=(A+B)’
F=B’
F=A’
F=(AB)’
Some of the more familiar logic functions such as AND, OR, NAND, NOR, etc are indicated.
The important point, however, is that the table lists all possible two-variable logic functions.
A more general question then would be: for a logic function/circuit of N variables, how many
functions/circuits would there be? Again, the first step is to ask: how many fi coefficients will
there be?
Number f i   2 N
4.4
and
Number functions  2 Number( fi )  2 2
N
The Exclusive-OR Function
One of the more useful of the two-variable Boolean function is the so-called Exclusive-OR
(XOR) function, denoted by the mathematical symbol ⊕ , and its complement, the
̅̅̅ . These functions are defined by the following
Exclusive-NOR (XNOR) function, denoted ⊕
truth table and associated Boolean equations:
A
0
0
1
1
B
0
1
0
1
𝑨⨁𝑩
0
1
1
0
𝑨⨁𝑩
1
0
0
1
𝐴 ⨁𝐵 = 𝐴. 𝐵′ + 𝐴′ . 𝐵
𝐴 ⨁ 𝐵 = 𝐴. 𝐵 + 𝐴′ . 𝐵′
We note that the XOR function corresponds to the regular OR function but excluding the
possibility of both variables being 1 yielding a 1 output. Applied to three variables, A, B, C,
the XOR function is given 𝐴 ⨁𝐵⨁𝐶 where it may readily be shown
𝐴⨁(𝐵⨁𝐶) = (𝐴⨁𝐵)⨁𝐶 = 𝐴⨁𝐵⨁𝐶
Although it is not a primitive gate in the sense that NAND or NOR gates are regarded as
primitive, the XOR gate is given its own logic symbol
A
B
X
The most efficient way of generating the XOR function from primitive gates is
4-4
A
X
B
The ouput X above is seen to be given by
𝑋 = {[𝐴 (𝐴 𝐵)′ ]′ [𝐵 (𝐴 𝐵)′ ]′ }′
= [𝐴 (𝐴𝐵)′ ] + [𝐵 (𝐴𝐵)′ ]
= 𝐴 (𝐴′ + 𝐵′ ) + 𝐵 (𝐴′ + 𝐵′ )
which is indeed the Exclusive-OR function.
= 𝐴 𝐵′ + 𝐴′ 𝐵
As will be seen later, both the XOR and XNOR functions are particularly useful in the
implementation of arithmetic logic circuits. For example, the XNOR function indicates when
two binary digits are equal  as may be verified by referring to the truth table. Thus the
following logic circuit can be used to indicate when two four-bit binary numbers are equal:
a3
b3
a2
b2
E
a1
b1
a0
b0
4.4
Conclusion
In this lecture, we have developed two standard formulations of Boolean functions; the
canonical sum-of-products/minterms and the canonical product-of-sums/maxterms. We
have also explored the finite nature of Boolean functions, given a specific number of
variables. We now proceed to employ this knowledge in developing further simplification
methods.
4-5
Download