2-1 basic definitions€¦ · web view2-3 basic theorems and properties of boolean algebra duality...

32
2-1 Basic Definitions Boolean Algebra introduced by George Boole in 1854 a set of elements: E = {0, 1} a set of operators: O = {+, , ‘} binary operator – works on two operands a number of axioms or postulates (assumptions – do not need to be proved) a number of theorems (proven from the postulates) Common postulates used to formulate algebraic structures 1. Closure A set S is closed with respect to a binary operator if, for every pair of elements of S, the binary operator specifies a rule for obtaining a unique element of S. example: The set of natural numbers N = {1, 2, 3, 4, …} is closed with respect to the binary operator plus (+) by the rules of arithmetic addition, since a, b N we obtain a unique c N by the operation a + b = c. The set of natural numbers is not closed with respect to the binary operator minus (-) by the rules of arithmetic subtraction because 2 – 3 = -1 and 2, 3 N, while (-1) N. 2. Associative law A binary operator * on a set S is said to be associative whenever

Upload: others

Post on 15-Aug-2020

3 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: 2-1 Basic Definitions€¦ · Web view2-3 Basic Theorems and Properties of Boolean Algebra Duality Duality principle Huntington postulates (parts a and b) One part may be obtained

2-1 Basic Definitions

Boolean Algebra introduced by George Boole in 1854

a set of elements: E = {0, 1}

a set of operators: O = {+, , ‘}binary operator – works on two operands

a number of axioms or postulates (assumptions – do not need to be proved)

a number of theorems (proven from the postulates)

Common postulates used to formulate algebraic structures1. Closure

A set S is closed with respect to a binary operator if, for every pair of elements of S, the binary operator specifies a rule for obtaining a unique element of S.

example:The set of natural numbers N = {1, 2, 3, 4, …} is closed with respect to the binary operator plus (+) by the rules of arithmetic addition, since a, b N we obtain a unique c N by the operation a + b = c.

The set of natural numbers is not closed with respect to the binary operator minus (-) by the rules of arithmetic subtraction because 2 – 3 = -1 and 2, 3 N, while (-1) N.

2. Associative lawA binary operator * on a set S is said to be associative whenever

(x * y) * z = x * (y * z) for all x, y, z S

3. Commutative lawA binary operator * on a set S is said to be commutative whenever

x * y = y * x for all x, y S

Page 2: 2-1 Basic Definitions€¦ · Web view2-3 Basic Theorems and Properties of Boolean Algebra Duality Duality principle Huntington postulates (parts a and b) One part may be obtained

4. Identity elementA set S is said to have an identity element with respect to a binary operation * on S if there exists an element e S with the property

e * x = x * e = x for any x S

example:The element 0 is an identity element with respect to operation + on the set of integers I = {…, -3, -2, -1, 0, 1, 2, 3, …} since

x + 0 = 0 + x for any x I

5. InverseA set S having the identity element e with respect to a binary operator * is said to have an inverse whenever, for every x S, there exists an element y S such that

x * y = e

6. Distributive lawIf * and are two binary operators on a set S, * is said to be distributive over whenever

x * (y z) = (x * y) (x * z)

Ordinary algebra The binary operator + defines addition.

The additive identity is 0.

The additive inverse defines subtraction.

The binary operator defines multiplication.

The multiplicative identity is 1.

The multiplicative inverse of a = 1/a defines division, i.e., a 1/a = 1.

The only distributive law applicable is that of over +:

a (b + c) = (a b) + (a c)

Page 3: 2-1 Basic Definitions€¦ · Web view2-3 Basic Theorems and Properties of Boolean Algebra Duality Duality principle Huntington postulates (parts a and b) One part may be obtained

2-2 Axiomatic Definition of Boolean Algebra

Huntington Postulates1. (a) Closure with respect to the operator +.

(b) Closure with respect to the operator .

2. (a) An identity element with respect to +, designated by 0:x + 0 = 0 + x = x

(b) An identity element with respect to , designated by 1:x 1 = 1 x = x

3. (a) Commutative with respect to +:x + y = y + x

(b) Commutative with respect to :x y = y x

4. (a) is distributive over +:x (y + z) = (x y) + (x z)

(b) + is distributive over :x + (y z) = (x + y) (x + z)

5. For every element x B, there exists an element x’ B such that

(a) x + x’ = 1 and

(b) x x’ = 0

x’ is called the complement of x

6. There exists at least two elements x, y B such that x y.

Page 4: 2-1 Basic Definitions€¦ · Web view2-3 Basic Theorems and Properties of Boolean Algebra Duality Duality principle Huntington postulates (parts a and b) One part may be obtained

Two-Valued Boolean Algebra defined on a set of two elements, B = {0, 1}

rules for the two binary operators + and as shown in the following tables

rule for the unary operator ‘ (for verification of postulate 5)

1. ClosureClosure is obvious from the tables since the result of each operation is either 1 or 0 and 0, 1 B.

2. Identity elements (from the tables)(a) 0 + 0 = 0 0 + 1 = 1 + 0 = 1

(b) 1 1 = 1 1 0 = 0 1 = 0

3. Commutative lawCommutivity is obvious from the symmetry of the binary operator tables.

(AND)x y z0 0 00 1 01 0 01 1 1

+ (OR)x y z0 0 00 1 11 0 11 1 1

‘ (NOT)x z0 11 0

Page 5: 2-1 Basic Definitions€¦ · Web view2-3 Basic Theorems and Properties of Boolean Algebra Duality Duality principle Huntington postulates (parts a and b) One part may be obtained

4. Distributive law x (y + z) = (x y) + (x z)

x y z y + z x(y + z) xy xz (xy) + (xz)0 0 0 0 0 0 0 00 0 1 1 0 0 0 00 1 0 1 0 0 0 00 1 1 1 0 0 0 01 0 0 0 0 0 0 01 0 1 1 1 0 1 11 1 0 1 1 1 0 11 1 1 1 1 1 1 1

5. Complement(a) x + x’ = 1, since 0 + 0’ = 0 + 1 = 1 and 1 + 1’ = 1 + 0 = 1.

(b) x x’ = 0, since 0 0’ = 0 1 = 0 and 1 1’ = 1 0 = 0

which verifies postulate 5.

6. Postulate 6Postulate 6 is satisfied because the two-valued Boolean algebra has two distinct elements, 1 and 0, with 1 0.

Page 6: 2-1 Basic Definitions€¦ · Web view2-3 Basic Theorems and Properties of Boolean Algebra Duality Duality principle Huntington postulates (parts a and b) One part may be obtained

2-3 Basic Theorems and Properties of Boolean Algebra

DualityDuality principle

Huntington postulates (parts a and b)

One part may be obtained from the other

interchange binary operators and the identity elements

example: x + 0 = x x 1 = x (Postulate 2)

Basic Theorems

Postulates and Theorems of Boolean AlgebraPostulate 2 (a) x + 0 = x (b) x 1 = xPostulate 5 (a) x + x’ = 1 (b) x x’ = 0Theorem 1 (a) x + x = x (b) x x = x Theorem 2 (a) x + 1 = 1 (b) x 0 = 0Theorem 3,involution

(x’)’ = x

Postulate 3, commutative

(a) x + y = y + x (b) xy = yx

Theorem 4,associative

(a) x + (y + z) = (x + y) + z

(b) x(yz) = (xy)z

Postulate 4, distributive

(a) x(y + z) = xy + xz (b) x + yz = (x + y)(x + z)

Theorem 5,DeMorgan

(a) (x + y)’ = x’y’ (b) (xy)’ = x’ + y’

Theorem 6,absorption

(a) x + xy = x (b) x(x + y) = x

Theorem 1(b): x x = x

x x = xx + 0 by Postulate 2(a)

= xx + xx’ by Postulate 5(b)

= x(x + x’) by Postulate 4(a)

= x 1 by Postulate 5(a)

= x by Postulate 2(b)

Page 7: 2-1 Basic Definitions€¦ · Web view2-3 Basic Theorems and Properties of Boolean Algebra Duality Duality principle Huntington postulates (parts a and b) One part may be obtained

Theorem 1(a): x + x = x

x + x = (x + x) 1 by Postulate 2(b)

= (x + x)(x + x’) by Postulate 5(a)

= x + xx’ by Postulate 4(b)

= x + 0 by Postulate 5(b)

= x by Postulate 2(a)

Theorem 2(a): x + 1 = 1

x + 1 = 1 (x + 1) by Postulate 2(b)

= (x + x’)(x + 1) by Postulate 5(a)

= x + x’ 1 by Postulate 4(b)

= x + x’ by Postulate 2(b)

= 1 by Postulate 5(a)

Theorem 2(b): x 0 = 0 by duality

Theorem 3: (x’)’ = x

From postulate 5, we have x + x’ = 1 and x x’ = 0, which defines the complement of x. The complement of x’ is x and is also (x’)’. Therefore, since the complement is unique, we have that (x’)’ = x.

Page 8: 2-1 Basic Definitions€¦ · Web view2-3 Basic Theorems and Properties of Boolean Algebra Duality Duality principle Huntington postulates (parts a and b) One part may be obtained

Theorem 6(a): x + xy = x

x + xy = x 1 + xy by Postulate 2(b)

= x(1 + y) by Postulate 4(a)

= x(y + 1) by Postulate 3(a)

= x 1 by Postulate 2(a)

= 1 by Postulate 2(b)

Theorem 6(b): x(x + y) = x by duality

DeMorgan’s Theorem by Truth Table

x y x + y (x + y)’ x’ y’ x’y’0 0 0 1 1 1 10 1 1 0 1 0 01 0 1 0 0 1 01 1 1 0 0 0 0

Operator Precedence(1) parentheses

(2) NOT

(3) AND

(4) OR

Page 9: 2-1 Basic Definitions€¦ · Web view2-3 Basic Theorems and Properties of Boolean Algebra Duality Duality principle Huntington postulates (parts a and b) One part may be obtained

Venn Diagram

Page 10: 2-1 Basic Definitions€¦ · Web view2-3 Basic Theorems and Properties of Boolean Algebra Duality Duality principle Huntington postulates (parts a and b) One part may be obtained

2-4 Boolean Functions

A Boolean variable can take the value of 0 or 1.

A Boolean function is an expression formed with binary variables, the two binary operators OR and AND, and unary operator NOT, parentheses, and an equal sign.

For a given value of the variables, the function can be either 0 or 1.

example: F1 = xyz’The function F1 is equal to 1 if x = 1 AND y = 1 AND z’ = 1; otherwise F1 = 0.

example: F2 = x + y + z’The function F2 is equal to 1 if x = 1 OR y = 1 OR z’ = 1; otherwise F2 = 0.

Truth Table of F1 and F2

x y z z’ F1 F2

0 0 0 1 0 10 0 1 0 0 00 1 0 1 0 10 1 1 0 0 11 0 0 1 0 11 0 1 0 0 11 1 0 1 1 11 1 1 0 0 1

Page 11: 2-1 Basic Definitions€¦ · Web view2-3 Basic Theorems and Properties of Boolean Algebra Duality Duality principle Huntington postulates (parts a and b) One part may be obtained

Algebraic Manipulation (From Digital Electronics, William H. Gothman, P.E.) A literal is a primed or unprimed variable.

A Boolean function may be simplified to minimize the number of literals or the number of terms. It is not always possible to minimize both simultaneously.

General Approach:A. Multiply all variables necessary to remove parentheses.

B. Look for identical terms. All but one can be eliminated.

C. Look for a variable and its complement in the same term. It can be eliminated.

example: AA’C = 0 C

= 0

D. Look for pairs of terms that are identical except for one variable. If one variable is missing, the larger term can be dropped.

example: ABCD + ABD = ABD(C + 1) = ABD 1

= ABD

If one variable is present but complemented in the second term, it can be reduced.

example: ABCD + AB’CD = ACD(B + B’)

= ACD 1

= ACD

example: Simplify the Boolean function F1 = A + A’B + AB to a minimum of literals.

F1 = A + A’B + AB

= A + B(A + A’)

= A + B(1)

= A + B

Page 12: 2-1 Basic Definitions€¦ · Web view2-3 Basic Theorems and Properties of Boolean Algebra Duality Duality principle Huntington postulates (parts a and b) One part may be obtained

example: Simplify the Boolean function F1 = (xy + w)(xy + z) to a minimum of literals.

F1 = (xy + w)(xy + z)

= xyxy + xyz + wxy + wz

= xy + xyz + wxy + wz

= xy(1 + z + w) + wz

= xy(1) + wz

= xy + wz

example: Simplify the Boolean function F1 = AB + A(B’ + C)’ to a minimum of literals.

F1 = AB + A(B’ + C)’

= AB + A(BC’)

= AB + ABC’

= AB(1 + C’)

= AB(1)

= AB

example: Simplify the Boolean function F1 = (xy’ + w’z)(wx’ + yz’) to a minimum of literals.

F1 = (xy’ + w’z)(wx’ + yz’)

= xy’wx’ + xy’yz’ + w’zwx’ + w’zyz’

= y’w(xx’) + xz’(yy’) + x’z(ww’) + w’y(zz’)

= y’w(0) + xz’(0) + x’z(0) + w’y(0)

= 0 + 0 + 0 + 0

= 0

Page 13: 2-1 Basic Definitions€¦ · Web view2-3 Basic Theorems and Properties of Boolean Algebra Duality Duality principle Huntington postulates (parts a and b) One part may be obtained

2-5 Canonical and Standard Forms

Minterms and Maxterms Consider two binary variables x and y combined with an AND operation.

x’y’, x’y, xy’, xy

Each of these four AND terms represents one of the distinct areas in the Venn diagram and is called a minterm or standard product.

Consider two binary variables x and y combined with an OR operation.x’+ y’, x’+ y, x + y’, x + y

Each of these four OR terms represents one of the distinct areas in the Venn diagram and is called a maxterm or standard sum.

n Variables can be combined to form 2n minterms or maxterms.

Minterms and Maxterms for Three Binary VariablesMinterms Maxterms

x y z Term Designation Term Designation0 0 0 x’y’z’ m0 x+y+z M0

0 0 1 x’y’z m1 x+y+z’ M1

0 1 0 x’yz’ m2 x+y’+z M2

0 1 1 x’yz m3 x+y’+z’ M3

1 0 0 xy’z’ m4 x’+y+z M4

1 0 1 xy’z m5 x’+y+z’ M5

1 1 0 xyz’ m6 x’+y’+z M6

1 1 1 xyz m7 x’+y’+z’ M7

Page 14: 2-1 Basic Definitions€¦ · Web view2-3 Basic Theorems and Properties of Boolean Algebra Duality Duality principle Huntington postulates (parts a and b) One part may be obtained

A Boolean function may be represented algebraically from a given truth table by forming a minterm for each combination of the variables that produces a 1 in the function and then taking the OR of all those terms.

Functions of Three Variablesx y z Function f1 Function f2

0 0 0 0 00 0 1 1 00 1 0 0 00 1 1 0 11 0 0 1 01 0 1 0 11 1 0 0 11 1 1 1 1

f1 = x’y’z + xy’z’ + xyz = m1 + m4 + m7

f2 = x’yz + xy’z + xyz’ + xyz = m3 + m5 + m6 + m7

The complement of a Boolean function may be read from the truth table by forming a minterm for each combination that produces a 0 in the function and then ORing those terms.

f1’ = x’y’z’ + x’yz’ + x’yz + xy’z + xyz’

example: Express the Boolean function F(A,B,C) = AB + C as a sum of minterms.

step 1 – each term must contain all variablesAB = AB(C + C’) = ABC + ABC’

C = C(A + A’) = AC + A’C

= AC(B + B’) + A’C(B + B’)

= ABC + AB’C + A’BC + A’B’C

step 2 – OR all new terms, eliminating duplicatesF(A,B,C) = A’B’C + A’BC + AB’C + ABC’ + ABC

= m1 + m3 + m5 + m6 + m7

= (1, 3, 5, 6, 7)

Page 15: 2-1 Basic Definitions€¦ · Web view2-3 Basic Theorems and Properties of Boolean Algebra Duality Duality principle Huntington postulates (parts a and b) One part may be obtained

example: Express the Boolean function F(x,y,z) = x’y + xz as a product of maxterms.

step 1 – convert the function into OR terms using the distributive lawF(x,y,z) = (x’y + x)(x’y + z)

= (x + x’)(y + x)(x’ + z)(y + z)

= (y + x)(x’ + z)(y + z)

step 2 – each term must contain all variablesy + x = y + x + zz’ = (x + y + z)(x + y + z’)

x’ + z = x’ + z + yy’ = (x’ + y + z)(x’ + y’ + z)

y + z = y + z + xx’ = (x + y + z)(x’ + y + z)

step 3 – AND all new terms, eliminating duplicates F(x,y,z) = (x + y + z)(x + y + z’)(x’ + y + z)(x’ + y’ + z)

= M0M1M4M6

= (0, 1, 4, 6)

Conversion Between Canonical Forms The complement of a function expressed as the sum of minterms equals the sum

of minterms missing from the original function. This is because the original function is expressed by those minterms that make the function equal to 1, whereas its complement is a 1 for those minterms that the function is 0.

example: F(A,B,C) = (0, 2, 4, 6, 7)F’(A,B,C) = (1, 3, 5) = m1 + m3 + m5

Take the complement of F’ by DeMorgan’s theorem to obtain F in a different form:F(A,B,C) = (m1 + m3 + m5)’ = (m1’ m3’ m5’) = M1M3M5 = (1, 3, 5)

To convert from one canonical form to the other, interchange the symbols and , and list those numbers missing from the original form.

Page 16: 2-1 Basic Definitions€¦ · Web view2-3 Basic Theorems and Properties of Boolean Algebra Duality Duality principle Huntington postulates (parts a and b) One part may be obtained

Standard Forms The two canonical forms of Boolean algebra are basic forms that one obtains from

reading a function from the truth table. By definition, each minterm or maxterm must contain all variables in either complemented or uncomplemented form.

Another way to express Boolean functions is in standard form. In this configuration, the terms that form the function may contain one, two, or any number of literals.

There are two types of standard forms: the sum of products and the product of sums.

The sum of products is a Boolean function containing AND terms, called product terms, of one or more literals each. The sum denotes the ORing of these terms.

example: f1 = y’ + xy + x’yz’

The product of sums is a Boolean expression containing OR terms, called sum terms. Each term may have one or more literals. The product denotes the ANDing of these terms.

example: f2 = x(y’ + z)(x’ + y + z’ + w)

A Boolean function may also be expressed in nonstandard form.

example: f3 = (AB + CD)(A’B’ + C’D’)

Page 17: 2-1 Basic Definitions€¦ · Web view2-3 Basic Theorems and Properties of Boolean Algebra Duality Duality principle Huntington postulates (parts a and b) One part may be obtained

2-6 Other Logic Operations

There are sixteen possible functions for two variables. We will only concern ourselves with the most commonly encountered ones.

Any function can be equal to a constant, but a binary function can be equal to only 1 or 0. Functions of this type are called constant functions.

The transfer function does not have any effect on the variable.

example: f1 = y

The NAND function is equivalent to an AND function followed by a NOT function.

example: f2 = x y = (xy)’

The NOR function is equivalent to an OR function followed by a NOT function.

example: f3 = x y = (x + y)’

The XOR (exlusive-OR) function is similar to OR but excludes the combination where both x and y are equal to 1.

example: f4 = x y

The XNOR (exclusive-NOR) function is also called the equivalence function.

example: f5 = (x y)’

Page 18: 2-1 Basic Definitions€¦ · Web view2-3 Basic Theorems and Properties of Boolean Algebra Duality Duality principle Huntington postulates (parts a and b) One part may be obtained

2-7 Digital Logic Gates

A logic gate is a digital electronic circuit which performs one basic Boolean function such as, AND, NAND, OR, NOR, XOR, XNOR, transfer, and NOT.

Extension to Multiple Inputs Any logic gate which performs a binary operation can be extended to multiple

inputs.

Page 19: 2-1 Basic Definitions€¦ · Web view2-3 Basic Theorems and Properties of Boolean Algebra Duality Duality principle Huntington postulates (parts a and b) One part may be obtained

2-8 Integrated Circuits

Digital circuits are constructed with integrated circuits. An integrated circuit (IC) is a small silicon semiconductor crystal, called a chip, containing the electronic components for the digital gates.

The chip is mounted in a plastic or ceramic package and electrical connections are made via external pins.

Page 20: 2-1 Basic Definitions€¦ · Web view2-3 Basic Theorems and Properties of Boolean Algebra Duality Duality principle Huntington postulates (parts a and b) One part may be obtained

Levels of Integration Small-scale integration (SSI) devices contain several independent gates in a

single package. The number of gates is usually fewer than 10.

Medium-scale integration (MSI) devices have a complexity of approximately 10 to 100 gates in a single package.

Large-scale integration (LSI) devices contain between 100 and a few thousand gates in a single package.

Very large-scale integration (VLSI) devices contain thousands of gates in a single package.

Digital Logic Families TTL – tranistor-transistor logic

ECL emitter-coupled logic

MOS metal-oxide semiconductor

CMOS complementary metal-oxide semiconductor

Positive and Negative Logic The terms positive and negative logic do not refer to the polarity of the electrical

signals, but rather the assignment of logic values to the relative amplitudes of the two signal levels.

Positive logic: 1 = true = on

Negative logic: 0 = true = on