81
Switching Theory and Logic Design Boolean Algebra

Switching theory and logic design

Embed Size (px)

Citation preview

Page 1: Switching theory and logic design

Switching Theory and Logic Design

Boolean Algebra

Page 2: Switching theory and logic design

Boolean Algebra

A set B of elements (a,b,c,….) with an equivalence

relation( =), two binary operations( + and .) and a

unary operation( complementation – denoted by ‘ ) is a

boolean algebra if and only if the following postulates

are satisfied.

Associativity

Commutativity

Distributivity

Identity

Complement

Page 3: Switching theory and logic design

P.1 ) Associativity :-

The + and . Operators are associative

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

(ab)c = a(bc) = abc

P.2) Commutativity :-

The + and . Operators are commutative

a + b = b+ a

ab = ba

Page 4: Switching theory and logic design

P.3) Distributivity :-

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

a( b+c) = ab+ ac

P.4) Identity Elements

There exists an identity element (denoted by 0) for the

+ operation and another (denoted by 1) for the .

Operation within B such that

a+ 0 = a

a 1=a

Page 5: Switching theory and logic design

P.5) Complement

Each member of B has a complement within B such

that if a’ is the complement of a , then

a + a’ = 1

aa‘ = 0

Page 6: Switching theory and logic design

Fundamental Theorms on Boolean Algebra

1) Closure of Identity Elements

For all a€B, a+1 = 1 and a0=0

2) Equality Theorem

For all a,b,c € B , if a+b = a+c and

ab= ac, then b = c

Page 7: Switching theory and logic design

Complementary Theorem

For all a,b €B, if a+b =1 and ab=0, then a = b’ and

b=a’

Page 8: Switching theory and logic design

DeMorgan’s Theorem

(a+b)’ = a’b’ and

(ab)’ = a’ + b’

Page 9: Switching theory and logic design

Show That (A+B)(A+B’) = A

Page 10: Switching theory and logic design

S T ABC + AB’C+ ABC’=A(B+C)

Page 11: Switching theory and logic design

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

Page 12: Switching theory and logic design

S T AB+ A(B+C) + B( B+C) = B+ AC

Page 13: Switching theory and logic design

S T (X + Y+XY)(X+Z) = (X+Y)(X+Z)

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

Page 14: Switching theory and logic design

Boolean Constants, Variables & Functions

The Boolean algebra contains two constants 0 and 1

Any characters in lowercase or uppercase are used

as Boolean Variables

Page 15: Switching theory and logic design

Boolean Functions

Any Boolean constants, variables, itself or combined

with any of three operations(logical sum, logical

product & complement) will give a Boolean

expression. Any boolean expression can be written

as a Boolean Function

F = A’B + (AB)’

The above mentioned Boolean algebra is also called

Switching algebra since the two constant values 0

and 1 represent off & on respectively in a circuit

Page 16: Switching theory and logic design

Electronic Gates

An electronic circuit that has one or more inputs and

one output, and in which the electrical condition of

the output at any time is dependent on those of the

inputs at that time is called an electronic gate.

Page 17: Switching theory and logic design
Page 18: Switching theory and logic design

Compute the Boolean Function represented by the

contact network

Page 19: Switching theory and logic design

Calculate the switching functions realized by the

contact network shown below

Page 20: Switching theory and logic design

Boolean Functions & Logical Operations

A Boolean variable in the true form or in the

complemented form is called a literal.

Eg: a,a’,b,b’

The Boolean product of two or more literals is called

a product term

Eg: ab’c , a’bc’

The Boolean sum of two or more literals is called a

sum term

Eg: (a+b’+c’) , (a’+b+c’)

Page 21: Switching theory and logic design

Disjunctive Normal Form

When a Boolean function appears as a sum of

several product terms, it is said to be expressed as a

sum of product(SOP) form.

The SOP form is also called the Disjunctive normal

form(DNF).

Eg: f(abcd)=a’b+bc’+abcd

Page 22: Switching theory and logic design

Conjunctive Normal Form

When a Boolean function appears as a product of

several sum terms, it is said to be expressed as a

product of sums(POS).

The POS form is also called the conjunctive normal

form(CNF).

F(abcd) = (a+b)(b’+c’+d)

Page 23: Switching theory and logic design

Express the following function in DNF

F = (a+b)(b+c+d)

Express the following Boolean function in CNF

F= ab+c’d

F= abc+b’d

Page 24: Switching theory and logic design

Canonical Forms

When each of the terms of a Boolean function

expressed either in SOP or POS form which has all

the variables in it, it is said to be in canonical form.

The canonical SOP form is called the disjunctive

canonical form(DCF) and the canonical POS form is

called the conjunctive canonical form(CCF)

Page 25: Switching theory and logic design

Express the following function in a canonical form

F = ab’+bc’+ac

F= a’+bc

Express the following function in a canonical form

F = (a+b)(b+c’)

F(a,b,c)= a+b

Page 26: Switching theory and logic design

Fundamental Products and Sums

A product term of n variables is called a minterm of n

variables.

Eg: ab’c’ , ab’c’

The no.of all possible minterms of n variables is 2n.

A minterm is also called a fundamental product.

A sum term of n variables is called a maxterm of n variables.

Eg: (a+b+c+d), (a+b’+c+d’)

The no.of all possible maxterms of n variables is 2n.

A maxterm is also called a fundamental sum.

Page 27: Switching theory and logic design
Page 28: Switching theory and logic design
Page 29: Switching theory and logic design

Disjunctive canonical normal form(DCNF) of a Boolean function is a sum of minterms and the conjunctive canonical normal form(CCNF) is a product of maxterms.

F=a’b’c’ + a’b’c + abc

= m0+m1+m7

= ∑(0,1,7)

F = (a+b+c)(a’+b’+c)(a’+b’+c’)

= M0M6M7

= ∏(0,6,7)

∑ Indicates that the

terms are minterms and

the function is a

summation

∏ Indicates that the

terms are maxterms and

the function is a product

Page 30: Switching theory and logic design

Properties

The Sum of all 2n minterms of n variables is 1.

The product of any two n-variable minterms, which are

different is 0.

mimj=0 when i!=j

Complement of mi is Mi

mi’=Mi & Mi’=mi

Page 31: Switching theory and logic design

Convert the given DCNF to CCNF

F=a’bc + ab’c’ + abc

Express the following function in both canonical

forms

F= a’+bc

F(abcd) = (a+b)(b’+c’+d)

Page 32: Switching theory and logic design

Theorem

(Conversion b/w minterms & maxterms)

A boolean function expressed as a sum of minterms

or as a product of maxterms can be converted into

the other forms as given by

∑mi = ∏Mj &

∏Mi=∑mj

Where the subsets i and j are two partitions of the

entire set of 2n subscripts of either m’s or M’s

Page 33: Switching theory and logic design

Express the function f = a’c’d’ + a’bc’+ a’bcd’ in both

types of canonical form

Express the function

f(a,b,c) = (a’+b+c)(a’+b’)(a+b+c) in both types of

canonical form

Page 34: Switching theory and logic design

Express the following function in CCF

F(a,b,c) = ab’ +c’

Page 35: Switching theory and logic design

Self Dual Function

If a Boolean function and its dual are the same, then

the function is called a self-dual function

Check whether the given function is self dual or not

f= ab+ac+bc

Check whether f = b’(a’c’+ac) + b(a’c +ac’) is self

dual or not

Page 36: Switching theory and logic design

Logical Operations

Like AND,OR etc. , there are three more significant

boolean operators. They are NAND, NOR and

EXCLUSIVE-OR

Page 37: Switching theory and logic design

Properties of NAND operation

SHOW That A↑B= B↑A

Check whether NAND operation is associative or not

Page 38: Switching theory and logic design

Properties of XOR operation

XOR is commutative

XOR is also associative

Page 39: Switching theory and logic design

Karnaugh Maps(Veitch Diagram)

The number of gates required and the number of

input terminals for the gates for the implementation

of a Boolean function get reduced considerably if the

Boolean function can be simplified.

Karnaugh Map method gives a systematic approach

for simplifying a Boolean expression.

Page 40: Switching theory and logic design

K-map contains boxes called cells. Each of the cell

represents one of the 2n possible products(of the

variables) that can be formed from n variables.

Thus a 3-variable map contains 8 cells, 2 variable-4

cells, 4 variable-16 cells.

Each nearby cells represents only one bit change.

Numbering of each cells will be done based on the

gray code sequence.

Page 41: Switching theory and logic design

K-map representation

Page 42: Switching theory and logic design
Page 43: Switching theory and logic design
Page 44: Switching theory and logic design

Plotting SOP form in K-map

If a Boolean function is given as a sum of its

minterms(ie in its DCF form), then the function is

plotted on the map by writing 1’s on those cells

which represent the minterms that are present in the

function.

Page 45: Switching theory and logic design

Plot the Boolean function

Y = ABC’ + ABC + A’B’C on the K-map

Plot the boolean function

Y = A’BC’D’ + AB’C

Plot the boolean function Y = AB + BC

Plot f(abc) = ∑(0,2,6,7) in the K-map

Plot f(abcd) = ∑(1,3,4,7-10,12,15)

Page 46: Switching theory and logic design

Plotting POS form in K-map

If a Boolean function is given as a product of

maxterms (ie in CCF), then the function is plotted on

the map by writing 0’s on those cells which represent

the maxterms that are present in the function.

Page 47: Switching theory and logic design
Page 48: Switching theory and logic design
Page 49: Switching theory and logic design

Represent f = ∏(0,3,6,7)

Plot function f(a,b,c)= a +b in K-map

Plot f= c’d’ + a’bd

Plot f = b’c + d + abc’

Page 50: Switching theory and logic design

K-map minimization

Two cells are said to be adjacent if there is only one

bit change among the cells.

Group those cells and eliminate variables which is in

true form and complementary form.

Page 51: Switching theory and logic design
Page 52: Switching theory and logic design
Page 53: Switching theory and logic design
Page 54: Switching theory and logic design
Page 55: Switching theory and logic design
Page 56: Switching theory and logic design
Page 57: Switching theory and logic design
Page 58: Switching theory and logic design
Page 59: Switching theory and logic design
Page 60: Switching theory and logic design
Page 61: Switching theory and logic design

Minimum Sum Of Products

Minimize the expression

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

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

Page 62: Switching theory and logic design

Minimize the expression

Y= A’BC’D’ + A’BC’D + ABC’D’ + ABC’D + AB’C’D +

A’B’CD’

Page 63: Switching theory and logic design

Minimum Product of Sums

Minimize the expression

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

Write each Maxterms. Plot 0 for the Maxterm cells

Page 64: Switching theory and logic design

Minimize the expression

F= ∏(0,2,3,8,9,12,13,15)

Page 65: Switching theory and logic design

5-variable K-map

Simplify

F = ∑(0,2,4,6,9,11,13,17,21,25,27,29,31)

Page 66: Switching theory and logic design

Don’t care terms

The combinations for which the values of the

expression are not specified are called don’t care

combinations. The output is a don’t care term for

these invalid combinations

Page 67: Switching theory and logic design

Minimize the boolean expression of the below circuit

logic

A B C Y

0 0 0 0

0 0 1 1

0 1 0 0

0 1 1 1

1 0 0 0

1 0 1 1

Page 68: Switching theory and logic design

Prime Cubes

Each cells in the k-map corresponds to minterms is

called a cube.

A cube of a given function that can not grow larger

by expanding into other cubes of the function is

called a prime cube(PC) or a prime implicant (PI) of

the function.

Page 69: Switching theory and logic design

Find the prime implicants/ prime cubes of the

function

f = ∑(2,5,6)

Page 70: Switching theory and logic design

Essential Prime Cubes

If among the minterms subsuming a prime cube,

there is at least one that is covered by this and only

this prime cube, then the prime cube is called an

essential prime cube (EPC) or an essential prime

implicant(EPI)

Page 71: Switching theory and logic design

Redundant Prime Cubes

If each of the minterms subsuming a prime cube is

covered by other essential prime cubes, then the

prime cube is a redundant prime cube(RPC) or a

redundant prime implicant

Find the EPC and RPC of the following boolean

function

∑(1,3,6,7)

Page 72: Switching theory and logic design

Quine-Mc Cluskey Minimization

wrt to minimization, K-maps Only good for:

Small functions (<6variables)

Single output function at a time

Not Implementable on Computer

Subjective Interpretation, Different Coverings

Q-M (Tabular Minimization) Solves These Problems

Page 73: Switching theory and logic design

Basic Definitions

Any single or group of ones that can be

combined is called an implicant.

A prime implicant of a function F is a product

term implicant which is no longer an implicant if

any literal is deleted from it.

Essential prime implicants are the implicant

which will definitely in the final expression.

Page 74: Switching theory and logic design

Procedure

F (w,x,y,z)= (0,1,2,3,5,7,8,10,14,15)

Write the binary equivalent of all the minterms.

Group all the minterms by the no of 1s they contain.

Page 75: Switching theory and logic design

Step 1

0 0000

1 0001

2 0010

8 1000

3 0011

5 0101

10 1010

7 0111

14 1110

15 1111

Page 76: Switching theory and logic design

Combine the members of new groups to create more

new groups.

Combined group must differ by one bit and must

have – in the same position.

Combine as much as possible.

Select prime implicants to cover all the ones.

Page 77: Switching theory and logic design

Finding Prime Implicants

0 0000

1 0001

2 0010

8 1000

3 0011

5 0101

10 1010

7 0111

14 1110

15 1111

Step 1 Step 2

(0,1) 000-

(0,2) 00-0(0,8) -000

(1,3) 00-1

(1,5) 0-01(2,3) 001-

(2,10) -010

(8,10) 10-0

(3,7) 0-11

(5,7) 01-1

(10,14) 1-10

(7,15) -111

(14,15) 111-

Step 3

(0,1,2,3) 00--

(0,2,1,3) 00--

(0,2,8,10) -0-0

(0,8,2,10) -0-0

(1,3,5,7) 0--1

(1,5,3,7) 0--1

6 Prime Implicants

1-10

-111

111-

00--

-0-0

0--1

(0,1) 000-

(0,8) -000

(2,3) 001-

Page 78: Switching theory and logic design

Finding Prime Implicants

0 0000

1 0001

2 0010

8 1000

3 0011

5 0101

10 1010

7 0111

14 1110

15 1111

Step 1 Step 2

(0,1) 000-

(0,2) 00-0(0,8) -000

(1,3) 00-1

(1,5) 0-01

(2,3) 001-

(2,10) -010

(8,10) 10-0

(3,7) 0-11

(5,7) 01-1

(10,14) 1-10

(7,15) -111

(14,15) 111-

Step 3

(0,1,2,3) 00--

(0,2,1,3) 00--

(0,2,8,10) -0-0

(0,8,2,10) -0-0

(1,3,5,7) 0--1

(1,5,3,7) 0--1

6 Prime Implicants

1-10

-111

111-

00--

-0-0

0--1

(0,1) 000-

(0,8) -000

(2,3) 001-

Page 79: Switching theory and logic design

Find Essential Prime Implicants –

Prime Cube table

Prime

ImplicantCovered

minterms

1-10

-111

111-

00--

-0-0

0--1

Minterms

0 1 2 3 5 7 8 10 14 15

10,14

7,15

14,15

0,1,2,3

0,2,8,101,3,5,7

X XX X

X X

X X X X

X X X XX X X X

Essential Prime implicant

Here essential prime cubes are x’z’ & w’z

Page 80: Switching theory and logic design

Selective Prime Cube Table

• In an SPC table, If a row I has crosses in

all columns where another row J has

crosses, and there is at least one more

column with a cross under I but not under

J, row I is said to dominate row J

• A row in an SPC table that is dominated

by another row of the same or smaller cost

can be deleted from the SPC table

Page 81: Switching theory and logic design

14 15

A(10,14) *

B(7,15) *

C(14,15) * *

• As per the theorem , Here C can be

selected.