boolean algebra

25
Boolean Algebra

Upload: renie

Post on 22-Jul-2016

44 views

Category:

Documents


1 download

DESCRIPTION

Logic Circuits

TRANSCRIPT

Page 1: Boolean Algebra

Boolean Algebra

Page 2: Boolean Algebra

We will find a lot of similarities between Boolean algebra and

"normal" algebra, the kind of algebra involving so-called real numbers.

Just bear in mind that the system of numbers defining Boolean algebra

is severely limited in terms of scope, and that there can only be one of

two possible values for any Boolean variable: 1 or 0. Consequently, the

"Laws" of Boolean algebra often differ from the "Laws" of real-number

algebra, making possible such statements as 1 + 1 = 1, which would

normally be considered absurd. Once you comprehend the premise of

all quantities in Boolean algebra being limited to the two possibilities of

1 and 0, and the general philosophical principle of Laws depending on

quantitative definitions, the "nonsense" of Boolean algebra disappears.

Page 3: Boolean Algebra

Boolean Algebra

• Invented by George Boole in 1854

• Considered as the backbone of computer circuit

analysis and design

• It is a branch of mathematics that is directly

applicable to digital design.

• It is a set of elements, a set of operators that act

on these elements, and a set of axioms or

postulates that govern the actions of these

operators on these elements.

Page 4: Boolean Algebra

Theorems and Postulates

• The postulates are basic axioms of the algebraic

structure and need no proof.

Basic Identity (a) x+ 0 = x (b) x. 1 = x

Commutative

Property

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

Distributive

Property

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

(x+z)

Basic Identity (a) x+ x’ = 1 (b) xx’ = 0

Postulates of Boolean Algebra

Page 5: Boolean Algebra

• The theorems must be proven from the

postulates

Theorem 1. Identity x + x = x xx = x

Theorem 2. Identity x+ 1= 1 x.0 = 0

Theorem 3. Involution (x’)’ = x

Theorem 4.

Associative

x+(y+z) = (x+y) + z x(yz) = (xy)z

Theorem 5. De

Morgan’s

(x+y)’ = x’.y’ (xy)’ = x’ + y’

Theorem 6.

Absorption

x + xy = x x(x+y) = x

Page 6: Boolean Algebra

Operations with Boolean Algebra

• Complementation (‘)

– To complement a variable is to reverse its value

– Represented by placing a bar over the variable or by the (‘) symbol after the variable.

Page 7: Boolean Algebra

• Addition (+)

– Boolean Addition is equivalent to logical OR.

– The (+) plus symbol is used to indicate the addition or ORing

Page 8: Boolean Algebra

• Multiplication (.)

– Boolean multiplication is equivalent to a logical AND operation

Note:

Prohibited Operations: The operations of subtraction and division do not exist in Boolean Algebra

Page 9: Boolean Algebra

Truth Table

• It lists every possible combination of inputs and the

output corresponding to each combination of inputs.

• Given a function N inputs, the possible combinations will

then be equal to 2N.

• Example: using a truth table prove that x (x+y) = x.

x y x+y x(x+y)

0 0 0 0

0 1 1 0

1 0 1 1

1 1 1 1

Page 10: Boolean Algebra

Boolean Functions

• It is defined using an equal sign and an

expression comprise of binary variables,

two binary operators OR and AND, the

unary operator NOT and the parentheses.

• It may also be represented by a truth

table, showing all the possible 1’s and 0’s

combination of the N binary variable

Page 11: Boolean Algebra

Example: 1. F1=x(y+z)

• F1=1 only when : x=1, y=1, z =1 or

x=1, y =1, z=0 and

x=1, y=0, z=1

X y z y+z F1

0 0 0 0 0

0 0 1 1 0

0 1 0 1 0

0 1 1 1 0

1 0 0 0 0

1 0 1 1 1

1 1 0 1 1

1 1 1 1 1

Page 12: Boolean Algebra

Algebraic Manipulation

• A Boolean function may be transformed

from an algebraic expression into a logic

diagram composed of AND, OR and NOT.

• There is an AND gate for each term in the

expression, and an OR gate is used to

combined two or more terms.

Page 13: Boolean Algebra

Examples

Page 14: Boolean Algebra

Complement of a Function

• The function F and F’ are complementary if:

– they depend on the same set of input variables

– for every combination of values of the input variables, the values of F and F’ are inverses to each other.

The complement of a function may be derived algebraically using De Morgan’s theorem.

Page 15: Boolean Algebra

Canonical Forms

• A binary variable may appear either in its normal

form (x) or in its complemented form (x’).

• Combining x and y with the AND operator, the

following 4 combinations will result: x’y’, x’y, xy’

and xy.

Page 16: Boolean Algebra

Canonical Form

X Y

X’Y’

XY

XY’ X’Y

Page 17: Boolean Algebra

Possible Combination for Three

Variables x y Z Minterm Designation Maxterm Designation

0 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 18: Boolean Algebra

• Minterm or Standard Products

– Obtained from an AND terms of the N

variables

– It is represented by the symbol mj where j

denotes the decimal equivalent of the binary

value

• Maxterm or Standard Sums

– Obtained from an OR term of the N variables

– It is represented by the symbol Mj where j

denotes the decimal equivalent of the binary

value

Page 19: Boolean Algebra

Sum of Minterms

• The ORing of terms which result in

a 1-value of the function. Ex.

• Boolean Function:

F1=x’y’z + xy’z’ + xy’z

=m1 + m4 +m5

or F1=∑(1, 4, 5)

• Complement of the Function

F1’=x’y’z’ + x’yz’ + x’yz + xyz’ + xyz

= m0, m2, m3, m6, m7

or F1’ =∑(0, 2, 3, 6, 7)

x y z F1

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 0

1 1 1 0

Page 20: Boolean Algebra

Product of Maxterms

• The ANDing of terms which

each result in a 0-value of the

function

• Ex. Express the Boolean

function F= AB + AC’ as a

product of maxterms

• F= π(M0,M1, M2,M3,M5)

• F=(A + B +C) (A+B+C’)

(A+B’+C) (A+B’+C’) (A’+B+C’)

A B C F

0 0 0 0

0 0 1 0

0 1 0 0

0 1 1 0

1 0 0 1

1 0 1 0

1 1 0 1

1 1 1 1

Page 21: Boolean Algebra

Standard Forms:

• Two types of Standard Form

– Sum of Products

• A Boolean expression containing AND terms of one or more

literals each.

• The sum denotes the ORing of the AND terms.

• Ex. F1= y + x’y’z + xz

– Product of Sums

• A Boolean expression containing OR terms of one or more

literals each.

• The sum denotes the ANDing of the OR terms.

• Ex. F2=y (x’+z) (x+y+z) (x’+y+z+w’)

Page 22: Boolean Algebra

Exercises

1. Simplify the following Boolean

expressions to a minimum using Boolean

Algebra

a. (x’y’ + z)’ + z + xy + wz

b. x’ + xy + xz’ + xy’z’

c. AB(C’D +CD’) + A’B’(C’+D)(C+D’)

Page 23: Boolean Algebra

2. For the Boolean function F given in the

truth table, find the following:

a) List the minterms of the function.

b) List the minterms of F’

c) Express F in sum of minterms in

algebraic form

d) Simply the function to an expression

with the minimum number of literals.

Page 24: Boolean Algebra

x y z F

0 0 0 0

0 0 1 0

0 1 0 1

0 1 1 1

1 0 0 0

1 0 1 0

1 1 0 1

1 1 1 1

Page 25: Boolean Algebra

3. Given the following Boolean function:

F=xy’z +x’y’z + w’xy + wx’y + wxy

a) Obtain the truth table of the function.

b) Draw the logic diagram using the original

Boolean expression.

c) Simplify the function to a minimum number of

literals using Boolean algebra.

d) Obtain the truth table of the simplifed

expression and compare with the original table.