1 of 95

Digital System Design Using Verilog�(21EC32)

2 of 95

Course Syllabus

2

M1. Principles of Combinational Logic

M2. Logic Design with MSI Components and Programmable Logic Devices

M3. Flip-Flops and its Applications

M4. Introduction to Verilog ,Verilog Data flow description

M5. Verilog Behavioral description ,Verilog Structural description

3 of 95

Course Outcomes

3

CO1

Develop simplified switching equation using Karnaugh Maps and Quine-McClusky techniques.

CO2

Analyze and design for Combinational Circuits by understanding the operation of decoders, encoder, multiplexers, adder, subtractors, comparators.

CO3

Analyze the concepts of Flip Flops (SR,D,T, and JK) and to design the synchronous sequential circuits.

CO4

Understand Verilog constructs and design combinational and sequential circuits using data flow description.

CO5

Understand Verilog constructs and design combinational and sequential circuits using data flow description.

4 of 95

Text Books

4

“Digital logic Applications and Design”,John M. Yarbrough, Cengage/Thomson Learning, 2001. ISBN 981-240-062-1.

Digital Principles and Design, Donald D, Givone, Mc Graw Hill, 2002. ISBN 978-0-07-052906-9.

5 of 95

Text Books

5

“HDL Programming VHDL and Verilog” by Nazeih M Botros, 2009 reprint, Dreamtech press.

6 of 95

References

6

1. Fundamentals of logic design, by Charles H Roth Jr., Cengage Learning

2. Logic Design, by Sudhakar Samuel, Pearson/ Sanguine, 2007

3. Fundamentals of HDL, by Cyril P R, Pearson/Sanguine 2010

7 of 95

Lesson Plan

7

SN

DATE PLANNED

TOPIC

DATE ENGAGED

REMARKS

1.1

Definition of Combinational Logic

1.2

Canonical forms

1.3

Generation of switching equations from truth tables

1.4

Karnaugh maps-3,4 variables

1.5

Incompletely specified functions (Don‘t care terms)

1.6

Simplifying Max term equations

1.7

Quine-McCluskey minimization technique

1.8

Quine-McCluskey using don‘t care terms

1.9

Reduced prime implicants Tables

8 of 95

Need for Digital Electronics and Applications

  • Easy to Design
  • Reliability
  • Highly flexible
  • Cheaper

Applications:

  • In the design of computer.
  • Multiplexer is used in graphic controllers, communication networks.
  • Encoder is used in character generator in monitor etc.

8

9 of 95

Combinational Logic Design :Boolean Logic

  • Constant :A fixed or non-changeable quantity is termed as constants.0 and 1 are treated as binary logic constants.
  • Variable: A changeable quantity is termed as variable. It can have 0 or 1 value. A symbol ,letter, number or short name is assigned to distinguish one variable from another.
  • Complement: Means to complete the binary set. In binary algebra the complement is opposite.
  • Literal: Is a Boolean variable or its complement.
  • Product term: Is a literal or the logical AND operation of multiple literals.
  • Sum term: Is a literal or the logical OR operation of multiple literals.
  • Theorem: A postulate or group of postulates that have been proven..

9

10 of 95

Combinational Logic Design :Boolean Logic

  • Perfect Induction: A method of proof by examination of all possible input variable combinations, therefore showing the output variable value in every possible condition.
  • Truth table: A tabular shows the truth ‘ relationship between a set of input and output variables.
  • Logic diagram: A drawing made up of logic symbols, distinctive shape or IEEE symbol, showing input and output connections between various logic functions.
  • Logical/Boolean Expression: Two logical variables are combined with logical operator to form logical expression

10

11 of 95

Boolean Laws and Theorems

  • Law of Identity
  • Law of Tautology or Idempotence
  • Law of Complement or Negation
  • Law of double negation or Involution
  • Law of Commutation

11

12 of 95

Standard Forms of Boolean Expressions

  • All Boolean expressions, regardless of their form, can be converted into either of two standard forms:
    • The sum-of-products (SOP) form
    • The product-of-sums (POS) form
  • Standardization makes the evaluation, simplification, and implementation of Boolean expressions much more systematic and easier.

12

13 of 95

Sum-of-Products (SOP)

13

14 of 95

Boolean Laws and Theorems

  • Law of Association
  • Law of Distribution
  • Law of Absorption or Redundancy
  • DeMorgan’s Theorem-I
  • DeMorgan’s Theorem-II

14

15 of 95

The Sum-of-Products (SOP) Form

  • A SOP is the logical OR operation of multiple product terms.
  • Each product term is the logical AND operation of binary literals.
  • Example:

  • In an SOP form, a single overbar cannot extend over more than one variable; however, more than one variable in a term can have an overbar.

  • Example : is OK! But not:

15

16 of 95

Implementation of an SOP

  • AND/OR implementation
  • NAND/NAND implementation

16

X=AB+BCD+AC

A

B

B

C

D

A

C

X

A

B

B

C

D

A

C

X

17 of 95

General Expression 🡪 SOP

  • Any logic expression can be changed into SOP form by applying Boolean algebra techniques.

ex:

17

18 of 95

The Standard SOP Form

  • A standard SOP expression is one in which all the variables in the domain appear in each product term in the expression.
    • Example:

  • Standard SOP expressions are important in:
    • Constructing truth tables
    • The Karnaugh map simplification method

18

19 of 95

Minterm And Maxterm

  • A Minterm is a special case product(AND) term. A Minterm is a product term that contains all of the input variables (each literal no more than once)that makes up a Boolean expression.
  • For Minterms ,the binary words are formed by representing
  • Each non-complemented variable by a 1.
  • Each complemented variable by a 0
  • A Maxterm is a special case sum(OR) term.A maxterm is a sum term that contains all of the input variables (each literal no more than once) that makes up a Boolean expression.
  • For Maxterms , the binary words are formed by representing
  • Each non-complemented variable by a 0
  • Each complemented variable by a 1

19

20 of 95

Converting Product Terms to Standard SOP

  • Step 1: Multiply each nonstandard product term by a term made up of the sum of a missing variable and its complement. This results in two product terms.
    • As you know, you can multiply anything by 1 without changing its value.
  • Step 2: Repeat step 1 until all resulting product term contains all variables in the domain in either complemented or complemented form. In converting a product term to standard form, the number of product terms is doubled for each missing variable.
  • Canonical SOP : Is Sum of products is a complete set of minterms that defines when an output variable is a logical 1. Each minterm corresponds to the row in the truth table where the output function is 1

20

21 of 95

Converting Product Terms to Standard SOP (example)

  • Convert the following Boolean expression into standard SOP form:

21

8

22 of 95

Binary Representation of a Standard Product Term

  • A standard product term is equal to 1 for only one combination of variable values.
    • Example: is equal to 1 when A=1, B=0, C=1, and D=0 as shown below

    • And this term is 0 for all other combinations of values for the variables.

22

23 of 95

Product-of-Sums (POS)

23

24 of 95

The Product-of-Sums (POS) Form

  • When two or more sum terms are multiplied, the result expression is a product-of-sums (POS):
    • Examples:

    • Also:

24

  • In a POS form, a single overbar cannot extend over more than one variable; however, more than one variable in a term can have an overbar:
    • example: is OK!

    • But not:

25 of 95

Implementation of a POS

  • OR/AND implementation

25

X=(A+B)(B+C+D)(A+C)

A

B

B

C

D

A

C

X

26 of 95

The Standard POS Form

  • A standard POS expression is one in which all the variables in the domain appear in each sum term in the expression.
    • Example:

  • Standard POS expressions are important in:
    • Constructing truth tables
    • The Karnaugh map simplification method

26

27 of 95

Converting a Sum Term to Standard POS

  • Step 1: Add to each nonstandard product term a term made up of the product of the missing variable and its complement. This results in two sum terms.
    • As you know, you can add 0 to anything without changing its value.
  • Step 2: Apply rule 12 🡪 A+BC=(A+B)(A+C).
  • Step 3: Repeat step 1 until all resulting sum terms contain all variable in the domain in either complemented or uncomplemented form.

27

28 of 95

Converting a Sum Term to Standard POS (example)

  • Convert the following Boolean expression into standard POS form:

28

29 of 95

Binary Representation of a Standard Sum Term

  • A standard sum term is equal to 0 for only one combination of variable values.
    • Example: is equal to 0 when A=0, B=1, C=0, and D=1 as shown below

    • And this term is 1 for all other combinations of values for the variables.

29

30 of 95

SOP/POS

30

31 of 95

Converting Standard SOP to Standard POS

  • The Facts:
    • The binary values of the product terms in a given standard SOP expression are not present in the equivalent standard POS expression.
    • The binary values that are not represented in the SOP expression are present in the equivalent POS expression.

31

32 of 95

Converting Standard SOP to Standard POS

  • What can you use the facts?
    • Convert from standard SOP to standard POS.
  • How?
    • Step 1: Write complement of function by performing OR operation of minterms(SOP) when an output variable corresponding to minterm is a logical 0(instead of logical 1)
    • Step 2:Complement the function
    • Step 3: Apply De-Morgans theorem-II.

32

33 of 95

Converting Standard SOP to Standard POS (example)

  • Convert the SOP expression to an equivalent POS expression:

    • The evaluation is as follows:

    • There are 8 possible combinations. The SOP expression contains five of these, so the POS must contain the other 3 which are: 001, 100, and 110.

33

34 of 95

Boolean Expressions & Truth Tables

  • All standard Boolean expression can be easily converted into truth table format using binary values for each term in the expression.
  • Also, standard SOP or POS expression can be determined from the truth table.

34

35 of 95

Converting SOP Expressions to Truth Table Format

  • Recall the fact:
    • An SOP expression is equal to 1 only if at least one of the product term is equal to 1.
  • Constructing a truth table:
    • Step 1: List all possible combinations of binary values of the variables in the expression.
    • Step 2: Convert the SOP expression to standard form if it is not already.
    • Step 3: Place a 1 in the output column (X) for each binary value that makes the standard SOP expression a 1 and place 0 for all the remaining binary values.

35

36 of 95

Converting SOP Expressions to Truth Table Format (example)

  • Develop a truth table for the standard SOP expression

36

Inputs

Output

Product Term

A

B

C

X

0

0

0

0

0

1

0

1

0

0

1

1

1

0

0

1

0

1

1

1

0

1

1

1

Inputs

Output

Product Term

A

B

C

X

0

0

0

0

0

1

0

1

0

0

1

1

1

0

0

1

0

1

1

1

0

1

1

1

Inputs

Output

Product Term

A

B

C

X

0

0

0

0

0

1

1

0

1

0

0

1

1

1

0

0

1

1

0

1

1

1

0

1

1

1

1

Inputs

Output

Product Term

A

B

C

X

0

0

0

0

0

0

1

1

0

1

0

0

0

1

1

0

1

0

0

1

1

0

1

0

1

1

0

0

1

1

1

1

37 of 95

Converting POS Expressions to Truth Table Format

  • Recall the fact:
    • A POS expression is equal to 0 only if at least one of the product term is equal to 0.
  • Constructing a truth table:
    • Step 1: Write complement of function by performing AND operation of Maxterms when an output variable corresponding to a maxterm is a logical 1(instead of logical 0).
    • Step 2: Complement the function.
    • Step 3: Apply De-Morgan I

37

38 of 95

Converting POS Expressions to Truth Table Format (example)

  • Develop a truth table for the standard SOP expression

38

Inputs

Output

Product Term

A

B

C

X

0

0

0

0

0

1

0

1

0

0

1

1

1

0

0

1

0

1

1

1

0

1

1

1

Inputs

Output

Product Term

A

B

C

X

0

0

0

0

0

1

0

1

0

0

1

1

1

0

0

1

0

1

1

1

0

1

1

1

Inputs

Output

Product Term

A

B

C

X

0

0

0

0

0

0

1

0

1

0

0

0

1

1

0

1

0

0

1

0

1

0

1

1

0

0

1

1

1

Inputs

Output

Product Term

A

B

C

X

0

0

0

0

0

0

1

1

0

1

0

0

0

1

1

0

1

0

0

1

1

0

1

0

1

1

0

0

1

1

1

1

39 of 95

Determining Standard Expression from a Truth Table

  • To determine the standard SOP expression represented by a truth table.
  • Instructions:
    • Step 1: List the binary values of the input variables for which the output is 1.
    • Step 2: Convert each binary value to the corresponding product term by replacing:
      • each 1 with the corresponding variable, and
      • each 0 with the corresponding variable complement.
  • Example: 1010 🡪

39

40 of 95

Determining Standard Expression from a Truth Table

  • To determine the standard POS expression represented by a truth table.
  • Instructions:
    • Step 1: List the binary values of the input variables for which the output is 0.
    • Step 2: Convert each binary value to the corresponding product term by replacing:
      • each 1 with the corresponding variable complement, and
      • each 0 with the corresponding variable.
  • Example: 1001 🡪

40

41 of 95

Determining Standard Expression from a Truth Table (example)

  • There are four 1s in the output and the corresponding binary value are 011, 100, 110, and 111.

41

POS

SOP

I/P

O/P

A

B

C

X

0

0

0

0

0

0

1

0

0

1

0

0

0

1

1

1

1

0

0

1

1

0

1

0

1

1

0

1

1

1

1

1

  • There are four 0s in the output and the corresponding binary value are 000, 001, 010, and 101.

42 of 95

The Karnaugh Map

42

43 of 95

The Karnaugh Map

  • Feel a little difficult using Boolean algebra laws, rules, and theorems to simplify logic?
  • A K-map provides a systematic method for simplifying Boolean expressions and, if properly used, will produce the simplest SOP or POS expression possible, known as the minimum expression.
  • It is pictorial form of a truth table and can handle upto 6 variables.
  • It is an array of cells/squares in which each cell represents a binary value of the input variables.
  • It reduces extensive calculations.
  • It is a chart or graph composed of an arrangement of adjacent cells,each representing a particular combination of variables.

43

44 of 95

What is K-Map?

  • It’s similar to truth table; instead of being organized (i/p and o/p) into columns and rows, the K-map is an array of cells in which each cell represents a binary value of the input variables.
  • The cells are arranged in a way so that simplification of a given expression is simply a matter of properly grouping the cells.
  • K-maps can be used for expressions with 2, 3, 4, and 5 variables.

44

45 of 95

Karnaugh maps

  • Karnaugh maps, or K-maps, are often used to simplify logic problems with 2, 3 or 4 variables.

45

For the case of 2 variables, we form a map consisting of 22=4 cells

as shown in Figure

A

B

0

1

0

1

Cell = 2n ,where n is a number of variables

00

10

01

11

A

B

0

1

0

1

A

B

0

1

0

1

Maxterm

Minterm

0

2

1

3

46 of 95

The 3 Variable K-Map

  • There are 8 cells as shown:

46

C

AB

0

1

00

01

11

10

47 of 95

Karnaugh maps

  • 4 variables Karnaugh map

47

AB

CD

00

01

11

10

00

01

11

10

5

3

1

7

6

2

0

4

9

15

13

11

10

14

12

8

48 of 95

The 4-Variable K-Map

48

CD

AB

00

01

11

10

00

01

11

10

49 of 95

Cell Adjacency

49

CD

AB

00

01

11

10

00

01

11

10

50 of 95

K-Map SOP Minimization

  • The K-Map is used for simplifying Boolean expressions to their minimal form.
  • A minimized SOP expression contains the fewest possible terms with fewest possible variables per term.
  • Generally, a minimum SOP expression can be implemented with fewer logic gates than a standard expression.

50

51 of 95

Mapping a Standard SOP Expression

  • For an SOP expression in standard form:
    • A 1 is placed on the K-map for each product term in the expression.
    • Each 1 is placed in a cell corresponding to the value of a product term.
    • Example: for the product term , a 1 goes in the 101 cell on a 3-variable map.

51

C

AB

0

1

00

01

11

10

1

52 of 95

Mapping a Standard SOP Expression (full example)

The expression:

52

C

AB

0

1

00

01

11

10

000

001

110

100

1

1

1

1

Practice:

53 of 95

Mapping a Nonstandard SOP Expression

  • A Boolean expression must be in standard form before you use a K-map.
    • If one is not in standard form, it must be converted.

53

54 of 95

Mapping a Nonstandard SOP Expression

  • Numerical Expansion of a Nonstandard product term
    • Assume that one of the product terms in a certain 3-variable SOP expression is .
    • It can be expanded numerically to standard form as follows:
      • Step 1: Write the binary value of the two variables and attach a 0 for the missing variable : 100.
      • Step 2: Write the binary value of the two variables and attach a 1 for the missing variable : 100.
    • The two resulting binary numbers are the values of the standard SOP terms 🡪 and
  • If the assumption that one of the product term in a 3-variable expression is B. How can we do this?

54

55 of 95

Mapping a Nonstandard SOP Expression

  • Map the following SOP expressions on K-maps:

55

56 of 95

K-Map Simplification of SOP Expressions

  • After an SOP expression has been mapped, we can do the process of minimization:
    • Grouping the 1s
    • Determining the minimum SOP expression from the map

Grouping the 1s

  • You can group 1s on the K-map according to the following rules by enclosing those adjacent cells containing 1s.
  • The goal is to maximize the size of the groups and to minimize the number of groups.

56

57 of 95

Grouping the 0’s and 1’s

Objective is to maximize the number of elements in a group and to minimize the number of groups.

  1. Always group adjacent cell containing 1’s (or 0’s) in a group in powers of 2[1,2,4,8,16,32 or 64 1’s (or 0’s) .Start by combining the maximum number of adjacent cell containing 1’s (or 0’s).
  2. Always include the largest possible number of 1’s (or 0’s) in a group in accordance with rule(a) to reduce the number of literals in a term.
  3. Ensure that each 1’s (or 0’s) are covered when combining the squares. The 1’s (or 0’s) already in a group can be included in another group as long as the overlapping groups include non-common 1’s (or 0’s).
  4. Minimize the number of groups to reduce the number of terms in the simplified function. Avoid redundant grouping.
  5. Cells may be only grouped/looped together in two's, four's or eight's. As few groups as possible must be formed. Groups may overlap one another and may contain only one cell.
  6. The larger the number of 1s grouped/looped together in a group the simpler is the product term that the group represents

57

58 of 95

Number of Input literals to represent the group on K-MAP

58

NO OF Adjacent cells Group

NAMED

NUMBER OF INPUT LITERALS TO REPRESENT THE GROUP

Two-variable K-Map

NUMBER OF INPUT LITERALS TO REPRESENT THE GROUP

Three-variable K-Map

NUMBER OF INPUT LITERALS TO REPRESENT THE GROUP

four-variable K-Map

NUMBER OF INPUT LITERALS TO REPRESENT THE GROUP

five-variable K-Map

1

Single

2

3

4

5

2

Pair

1

2

3

4

4

Quad

F=1 or 0

1

2

3

8

Octet

F=1 or 0

1

2

16

----

F=1or 0

1

32

----

F=1 or 0

59 of 95

Grouping the 1s (example)

59

C

AB

0

1

00

1

01

1

11

1

1

10

C

AB

0

1

00

1

1

01

1

11

1

10

1

1

60 of 95

Grouping the 1s (example)

60

CD

AB

00

01

11

10

00

1

1

01

1

1

1

1

11

10

1

1

CD

AB

00

01

11

10

00

1

1

01

1

1

1

11

1

1

1

10

1

1

1

61 of 95

Determining the Minimum SOP Expression from the Map

  • The following rules are applied to find the minimum product terms and the minimum SOP expression:
    1. Group the cells that have 1s. Each group of cell containing 1s creates one product term composed of all variables that occur in only one form (either complemented or complemented) within the group. Variables that occur both complemented and uncomplemented within the group are eliminated 🡪 called contradictory variables.

61

62 of 95

Determining the Minimum SOP Expression from the Map

    • Determine the minimum product term for each group.
      • For a 3-variable map:
        1. A 1-cell group yields a 3-variable product term
        2. A 2-cell group yields a 2-variable product term
        3. A 4-cell group yields a 1-variable product term
        4. An 8-cell group yields a value of 1 for the expression.
      • For a 4-variable map:
        • A 1-cell group yields a 4-variable product term
        • A 2-cell group yields a 3-variable product term
        • A 4-cell group yields a 2-variable product term
        • An 8-cell group yields a a 1-variable product term
        • A 16-cell group yields a value of 1 for the expression.

3. When all the minimum product terms are derived from the K-map, they are summed to form the minimum SOP expression.

62

63 of 95

Determining the Minimum SOP Expression from the Map (example)

63

CD

AB

00

01

11

10

00

1

1

01

1

1

1

1

11

1

1

1

1

10

1

64 of 95

Determining the Minimum SOP Expression from the Map (exercises)

64

C

AB

0

1

00

1

01

1

11

1

1

10

C

AB

0

1

00

1

1

01

1

11

1

10

1

1

65 of 95

Determining the Minimum SOP Expression from the Map (exercises)

65

CD

AB

00

01

11

10

00

1

1

01

1

1

1

1

11

10

1

1

CD

AB

00

01

11

10

00

1

1

01

1

1

1

11

1

1

1

10

1

1

1

66 of 95

Practicing K-Map (SOP)

66

67 of 95

Mapping Directly from a Truth Table

67

I/P

O/P

A

B

C

X

0

0

0

1

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

C

AB

0

1

00

01

11

10

1

1

1

1

68 of 95

Few definitions of Important terms

  • Prime Implicants : A prime implicant is a group of minterms that cannot be combined with any other minterm or groups.
  • Essential Prime Implicants :An essential prime implicant is a prime implicant that covers the output of the function but no other prime implicant is able to cover. A prime implicant is essential prime implicant if it covers a minterm that cannot be covered by any other prime implicant.Essential prime implicant is one in which one or more minterms are unique.
  • Redundant group or non essential prime implicant :Group is known as redundant group if all the 1’s or 0’s forming the group already have been participated in other groups. In other words all the participating minterms are not unique.

68

69 of 95

Determination of Simplified Boolean function in SOP and POS Form

  1. Obtain a simplified product term for each group of cell containing 1’s by considering only variables that occur in common(either un-complemented or complemented) within the group.Different variables that occur both un-complemented and complemented within each group are eliminated.
  2. When the entire simplified product terms are derived from the K-map they are summed to form the simplified Boolean function in SOP form.
  3. Table below gives simplified derived product terms obtained after forming groups,i.e pair for two variable K-Map

69

PAIR (horizontal direction)

Derived product term

Derived sum term

Pair (Vertical direction)

Derived product term

Derived sum term

(0,1)

A

(0,2)

B

(2,3)

A

(1,3)

B

70 of 95

Determination of Simplified Boolean function in SOP and POS Form

  •  

70

PAIR (horizontal direction)

Derived product term

Derived sum term

Pair (Vertical direction)

Derived product term

Derived sum term

Pair(on rolling over K-MAP)

Derived Product terms

Derived Sum terms

(0,1)

X Y

X + Y

(0,4)

Y Z

Y + Z

(0 , 2)

X Z

X + Z

(1,3)

X Z

X + Z

(1,5)

Y Z

Y + Z

(4, 6)

X Z

X + Z

(3,2)

X Y

X + Y

(3,7)

Y Z

Y + Z

(4,5)

X Y

X + Y

(2,6)

Y Z

Y + Z

(5,7)

X Z

X + Z

(7,6)

X Y

X + Y

71 of 95

Complete K-MAP Simplication Process

  1. Construct K-map and place 1’s and 0’s in the squares according to the truth table.
  2. Group the isolated 1’s or 0’s which are not adjacent to any other 1’s or 0’s .(Single loops)
  3. Group any pair which contains a 1 or 0 adjacent to only one other 1 or 0.(double loops)
  4. Group any octet even if it contains one or more 1’s or 0’s that have already been grouped.
  5. Group any quad that contains one or more 1’s or 0’s that have not already been grouped ,making sure to use the minimum number of groups.
  6. Group any pairs necessary to include any 1’s or 0’s that have not yet been grouped being adjacent, making sure to use the minimum number of groups.
  7. In case of SOP, form the OR operation of all the product terms generated by each group. In case of POS ,form AND operation of sum of all the terms generated by each group.

71

72 of 95

Karnaugh MAP with “Don’t Care” Conditions

  • Sometimes a situation arises in which some input variable combinations are not allowed, i.e. BCD code:
    • There are six invalid combinations: 1010, 1011, 1100, 1101, 1110, and 1111.
  • Since these unallowed states will never occur in an application involving the BCD code 🡪 they can be treated as “don’t care” terms with respect to their effect on the output.
  • The “don’t care” terms can be used to advantage on the K-maps. The X’s can be treated as 1’s or 0’s to maximize the number of elements in a group. Maximizing the number of element per group would result to simpler product term (or sum term).

72

73 of 95

“Don’t Care” Conditions

73

INPUTS

O/P

A

B

C

D

Y

0

0

0

0

0

0

0

0

1

0

0

0

1

0

0

0

0

1

1

0

0

1

0

0

0

0

1

0

1

0

0

1

1

0

0

0

1

1

1

1

1

0

0

0

1

1

0

0

1

1

1

0

1

0

X

1

0

1

1

X

1

1

0

0

X

1

1

0

1

X

1

1

1

0

X

1

1

1

1

X

CD

AB

00

01

11

10

00

01

1

11

x

x

x

x

10

1

1

x

x

Without “don’t care”

With “don’t care”

74 of 95

K-Map POS Minimization

  • The approaches are much the same (as SOP) except that with POS expression, 0s representing the standard sum terms are placed on the K-map instead of 1s.

74

75 of 95

Mapping a Standard POS Expression (full example)

The expression:

75

C

AB

0

1

00

01

11

10

000

010

110

101

0

0

0

0

76 of 95

K-map Simplification of POS Expression

76

C

AB

0

1

00

01

11

10

0

0

0

0

0

1

1

1

77 of 95

Quine-MCCluskey Minimization technique

77

78 of 95

QM-Method

  • Developed by W.V.Quine and Edward J.MCCluskey in 1956.
  • Functionally identical to K-Map but the tabular form makes it more efficient for use in computer algorithms and it also gives a deterministic way to check that the minimal form of a Boolean function has been reached.
  • Also known as tabulation method.
  • Involves two steps 1) Finding all the prime implicants of the function.

2) Finding the essential prime implicants of the function ,as well as the prime implicants that are necessary to cover the function using prime implicant.

78

79 of 95

QM-Method Procedure

  • STEP1: Describe individual minterms/ maxterms and don’t care terms of the given Boolean expression by their equivalent binary numbers. Differentiate don’t care terms using *symbol.
  • STEP2:Form the table by grouping numbers representing the minterms/maxterms having equivalent number of 1’s and arrange them in ascending order ,i.e. first having no 1’s then numbers having one 1 ,and then numbers having two 1’s etc.
  • STEP3: Compare each number in the mth top group with each minterm /maxterm including don’t care term in the next(m+1)th lower group looking for one variable change. If the two numbers are the same in every position but one place is different ,then mark a check sign to the right of both numbers to show that these numbers have been paired. Then enter the newly formed number in the next column. The number replaces the old paired numbers but where the literal differ, an X is placed in the position of that literal.
  • STEP 4:Using STEP3 ,form second table and repeat the process again until no further pairing is possible. On second repeat, compare numbers of mth to numbers in the next m+1th group that have the same ‘X’ position.

79

80 of 95

QM-Method Procedure

  • STEP5: Terms which were not covered are the prime implicants and are Or ed and ANDed together to form final function.
  • STEP6: Construct the prime implicant map and determine essential prime implicants.Dont consider don’t care term part of group. Select the row corresponding to column that has one ‘x’ and mark the minterms included by that row and columns. Repeat the process of selection of rows and columns till all the minterms grouped by all the prime-implicants are marked.

80

81 of 95

Quine-McCluskey Method

  • Tabular Representations
  • Prime Implicants
  • Essential Prime Implicants

81

82 of 95

Tabular Representations

82

1

1

1

1

1

WX

YZ

00

01

11

10

00

01

11

10

1

1

1

1

F = X & Y # !W & Y & !Z

# W & !Y & Z # !W & X

!W & X

01--

!W & Y & !Z

0-10

X & Y

-11-

W & !Y & Z

1-01

83 of 95

Prime Implicants

83

F = X & !Y & Z

# !X & !Z

# !X & Y

Each product term

is an implicant

A product term that cannot have any of its

variables removed and still imply the logic

function is called a prime implicant.

84 of 95

Prime Implicants

84

X

YZ

00

01

11

10

0

1

1

1

1

1

F = Y & !Z

# X

1

-10

1--

85 of 95

Prime Implicants

85

F = Y & !Z

# X

X

YZ

00

01

11

10

0

1

1

1

1

1

1

Minterm X Y Z F

0 O O O 0

1 0 0 1 0

2 0 1 0 1

3 1 1 1 0

4 1 O O 1

5 1 0 1 1

6 1 1 0 1

7 1 1 1 1

-10

1--

86 of 95

Finding Prime Implicants

86

2 0 1 0

4 1 O 0

5 1 0 1

6 1 1 0

7 1 1 1

Step 1

Step 2

(2,6) - 1 0

(4,5) 1 0 -

(4,6) 1 - 0

(5,7) 1 - 1

(6,7) 1 1 -

Step 3

(4,5,6,7) 1 - -

(4,6,5,7) 1 - -

All unchecked entries are Prime Implicants

-10 Y & !Z

1-- X

87 of 95

Prime Implicants

87

F = Y & !Z

# X

X

YZ

00

01

11

10

0

1

1

1

1

1

1

Minterm X Y Z F

0 O O O 0

1 0 0 1 0

2 0 1 0 1

3 1 1 1 0

4 1 O O 1

5 1 0 1 1

6 1 1 0 1

7 1 1 1 1

-10

1--

88 of 95

Essential Prime Implicants

88

1

1

1

1

1

WX

YZ

00

01

11

10

00

01

11

10

1

1

1

1

1

Find the essential

prime implicants

using the Q-M

method.

89 of 95

Essential Prime Implicants

89

1

1

1

1

1

WX

YZ

00

01

11

10

00

01

11

10

1

1

1

1

1

minterms

0 0000

1 0001

2 0010

8 1000

3 0011

5 0101

10 1010

7 0111

14 1110

15 1111

90 of 95

Finding Prime Implicants

90

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,5,3,7) 0--1

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

6 Prime Implicants

1-10

-111

111-

00--

-0-0

0--1

91 of 95

Find Essential Prime Implicants

91

Prime

Implicant

Covered

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,10

1,3,5,7

X

X

X

X

X

X

X

X

X

X

X

X

X

X

X

X

X

X

*

92 of 95

3 Prime Implicants

92

1

1

1

1

1

WX

YZ

00

01

11

10

00

01

11

10

1

1

1

1

1

0--1

-0-0

111-

!W & Z

W & X & Y

!X & !Z

F = !W & Z # W & X & Y # !X & !Z

93 of 95

University Questions

1 Explain the following canonical form:

i) F(X,Y,Z)=X+XY+XZ

ii) F(X,Y,Z)=(X+Z)(X+Y)(Y+Z) 10M

2. Find the minimal POS expression of incompletely specified Boolean function using K-Map. 05M

f(a,b,c,d)=ΠM(1,2,3,4,9,10)+πd(0,4,15).

3. Find all the minimal SOP expression of f(a,b,c,d)=Σ(6,7,9,10,13)+Σd(1,4,5,11,15) using K-Map. 05M

4. Find all the Prime Implicants of the function:

f(a,b,c,d)= Σ(7,9,12,13,14,15)+ Σd(4,11) using Quine-McClusky’s Algorithm. 10M

5. For a given incomplete Boolean function ,find the minimal sum and minimal Product expression using MEV technique taking least significant bit as map entered variable.

f(a,b,c,d)= Σ(1,5,6,7,9,11,12,13)+ Σd(0,3,4) 10M

6. Simplify the following function using Quine-McClusky’s method and realize the simplified using Nor gates. P=f(w,x,y,z)= Σ m(7,9,12,13,14,15)+ Σ d(4,11) 12M

7. Simplify f(a,b,c,d)= Σ m(0,4,5,6,13,14,15)+ Σ d(2,7,8,9)using MEV technique using basic gates. 08M

93

94 of 95

University Questions

8. Reduce the following Boolean function using K-Map and Realize the simplified expression using NAND gates.

T=f(a,b,c,d)= Σ m(1,3,4,5,13,15)+d(8,9,10,11) 08M

9. Convert the following Boolean function into their proper canonical form in decimal notation.

i) M=P(Q+S) ii)N=(W+X)(Y+Z) 07M

10. Define combinational logic. Two Motors M2 and M1 are controlled by three sensors S1,S2,S3.One motor M2 is to run anytime when all three sensors are on. The other M1 is to run whenever sensors S2 or S1 but not both are on and S3 is off. For all sensors combination where M1 is on ,M2 is to be off except when all sensors are off and then both motors remain off. Construct the truth table and write the Boolean output equation. 05M

94

95 of 95

Assignment Questions

  1. Obtain the simplified expressions in SOP for the following Boolean functions:

a) f(A,B,C,D)= Σm(7,13,14,15)

b) f(w,x,y,z)= Σm(2,3,12,13,14,15)

  1. Obtain the simplified expressions in POS for the following Boolean functions:

a) f(a,b,c,d)=ΠM(0,1,2,3,4,10,11)

b) f(w,x,y,z)=ΠM(1,3,5,7,13,15)

  1. Simplify the following Boolean function by means of the tabulation method:

a) f=ΠM(0,1,2,3,5,6,10,11) d=ΠM(13,14,15)

b)f =Σm(1,3,5,7,13,15) d=Σm(0,2,6)

95