Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

Chapter - 2 Boolean Algebra and Logic Simplification

Download as pdf or txt
Download as pdf or txt
You are on page 1of 72

Digital Electronics

Chapter 2

Boolean Algebra and Logic


simplification

1
MKAU
Algebras

◼ What is an algebra?
❑ Mathematical system consisting of
❑ Set of elements
❑ Set of operators
❑ Axioms or postulates
◼ Why is it important?
❑ Defines rules of “calculations”
◼ Example: arithmetic on natural numbers
❑ Set of elements: N = {1,2,3,4,…}
❑ Operator: +, –, *
❑ Axioms: associativity, distributivity, closure, identity elements, etc.

◼ Boolean Algebra: a useful mathematical system for specifying and


transforming logic functions.
2
Basic Definitions
• Boolean function: Mapping from Boolean variables to a
Boolean value.
• Truth table:
❑ Represents relationship between a Boolean function and its binary
variables.
❑ It enumerates all possible combinations of arguments and the
corresponding function values.
• Logic diagram:
❑ Composed of graphic symbols for logic gates. A simple circuit sketch
that represents inputs and outputs of Boolean functions.
Logic Diagram
X

Y F
Z
3
Binary Variables
◼ Recall that the two binary values have different names:
❑ True/False
❑ On/Off
❑ Yes/No
❑ 1/0
◼ We use 1 and 0 to denote the two values.
◼ Variable identifier examples:
❑ A, B, y, z, or X1

4
Logical Operations
◼ The three basic logical operations are:
❑ AND
❑ OR
❑ NOT
◼ AND is denoted by a dot (·).
◼ OR is denoted by a plus (+).
◼ NOT is denoted by an overbar ( ¯ ), a single quote mark (')
after, or (~) before the variable.

5
Truth Tables
◼ Tabular listing of the values of a function for all possible
combinations of values on its arguments
◼ Example: Truth tables for the basic logic operations:

AND OR NOT
X Y Z = X·Y X Y Z = X+Y X Z =X
0 0 0 0 0 0 0 1
0 1 0 0 1 1 1 0
1 0 0 1 0 1
1 1 1 1 1 1
6
Examples
Truth Table
Equation XYZ F = X + Y ×Z
000 0
F = X +Y Z 001 1
010 0
Logic Diagram
011 0
X
100 1

Y F 101 1
110 1
Z
111 1

◼ Boolean equations, truth tables and logic diagrams describe the


same function!
◼ Truth tables are unique; expressions and logic diagrams are not.
This gives flexibility in implementing functions.
7
Truth Tables – Cont’d

◼ Consider F(X, Y, Z) = X Y + Y Z: construct the truth table

X Y Z XY Y YZ F=XY+YZ
0 0 0 0 1 0 0
0 0 1 0 1 1 1
0 1 0 0 0 0 0
0 1 1 0 0 0 0
1 0 0 0 1 0 0
1 0 1 0 1 1 1
1 1 0 1 0 0 1
1 1 1 1 0 0 1
8
Basic Identities of Boolean Algebra
(Existence of 1 and 0 element) (Existence of complement)

(1) x+0=x (5) x + x = x


(2) x ·0=0 (6) x · x = x
(3) x+1=1 (7) x + x’ = 1
(4) x·1=x (8) x · x’ = 0
(9) (X’)’ = X

9
Fundamental Theorems
1. Idempotency
◼ 𝑎+𝑎 =𝑎 𝑎. 𝑎 = 𝑎
2. Null elements for + and .
◼ a+1=1 a.0 = 0
3. Involution: 𝑎ന = 𝑎
4. Absorption
◼ a+ ab =a a(a+b) = a
5. i. a+𝑎b
ത = a+ b ii. a(𝑎ത + b) = ab
6. i. ab + 𝑎𝑏ത = a ii. (a+b) (a+𝑏) ത =a
ത = ab + ac
7. i. ab + a𝑏c ത
ii. (a+b) (a+𝑏+c) = (a+b) (a+c)
8. De Morgan’s Theorem
◼ 𝑎 + 𝑏 = 𝑎.ത 𝑏ത 𝑎. 𝑏 = 𝑎ത + 𝑏ത
9. Consensus
◼ ab + 𝑎c
ത + bc = ab + 𝑎𝑐
ത (a+b) (𝑎ത + 𝑐) 𝑏 + 𝑐 = 𝑎 + 𝑏 (𝑎ത +
10
𝑐)
Basic Properties (Laws)

◼ Commutative ◼ Commutative
(10). X + Y = Y + X (11). X · Y = Y · X
◼ Associative ◼ Associative
(12). X+(Y+Z)=(X+Y)+Z (13). X(YZ) = (XY)Z
◼ Distributive ◼ Distributive
(14). X(Y+Z) =XY+XZ (15). X+YZ=(X+Y)(X+Z)
AND distributes over OR ❑ OR distributes over AND

11
Basic Properties
◼ DeMorgan’s Theorem
◼ Very important in simplifying equations
❑ 16. (X + Y)’ = X’ · Y’
❑ 17. (XY)’ = X’ + Y’

12
Operator Precedence
◼ The operator precedence for evaluating Boolean Expression
is
❑ Parentheses
❑ NOT
❑ AND
❑ OR
◼ Examples
❑ x y' + z
❑ (x y + z)'

13
Exclusive-OR and XNOR Functions
◼ Exclusive-OR (XOR)
❑ xy = xy'+x'y
◼ Exclusive-NOR (XNOR)
❑ (xy)' = xy + x'y'
◼ Some identities
❑ x0 = x
❑ x1 = x'
❑ xx = 0
❑ xx' = 1
❑ xy' = (xy)'
❑ x'y = (xy)'
◼ Commutative and associative
❑ AB = BA
❑ (AB) C = A (BC) = ABC

14
Exclusive-OR Implementations
◼ Implementations
❑ (x'+y')x + (x'+y')y = xy'+x'y = xy

Exclusive-OR Implementations 15
Logic Simplification Using Boolean Algebra

◼ A simplified Boolean expression uses the fewest gates


possible to implement a given expression.

AB+A(B+C)+B(B+C)
B
C

16
Logic Simplification Using Boolean Algebra
◼ AB+A(B+C)+B(B+C) A
❑ (distributive law)
❑ AB+AB+AC+BB+BC B
C AB+A(B+C)+B(B+C)
❑ ( BB=B)
❑ AB+AB+AC+B+BC
❑ ( AB+AB=AB)
❑ AB+AC+B+BC
❑ ( B+BC=B) B B+AC
❑ AB+AC+B
A
❑ ( AB+B=B)
C
❑ B+AC

17
Logic Simplification Using Boolean Algebra

◼ Try these:

1.[ AB (C + BD) + A B ]C
2. A BC + AB C + A B C + AB C + ABC
3. AB + AC + A B C

18
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.

19
The Sum-of-Products (SOP) Form
◼ A SOP expression → ◼ In a SOP form, a single
when two or more over bar cannot extend
product terms are over more than one
summed by Boolean variable; however,
addition. more than one variable
❑ Examples: in a term can have an
AB + ABC overbar:
ABC + CDE + B CD ◼ example: A B C is
OK!
A B + A BC + AC
❑ Also:
A + A B C + BCD ◼ But not: ABC
20
Implementation of SOP

X=AB+BCD+AC
◼ AND/OR implementation ◼ NAND/NAND implementation

A A
B B

B B
C X C X
D D

A A
C C

21
General Expression → SOP

◼ Any logic expression can be changed into SOP form


by applying Boolean algebra techniques.
ex:
A( B + CD) = AB + ACD
AB + B(CD + EF ) = AB + BCD + BEF
( A + B)( B + C + D) = AB + AC + AD + BB + BC + BD
( A + B) + C = ( A + B)C = ( A + B)C = AC + BC

22
The Standard (canonical) 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:
AB CD + A B CD + ABC D
◼ Standard SOP expressions are important in:
❑ Constructing truth tables
❑ The Karnaugh map simplification method

23
minterms
◼ For a function of n variables, if a product term contains each
of the n variables exactly one time in complemented or
uncomplemented form
◼ A Function represented in sum of minterms is in canonical
SOP form.
◼ Each minterm represented by n-bit binary code as
❑ Uncomplemented variable by 1
❑ Complemented variable by 0
◼ The sum of all minterms of n-variables equals 1
2𝑛 −1
i.e. σ𝑖=0 𝑚𝑖 =1

24
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
uncomplemented form.

25
Converting Product Terms to Standard SOP
(example)
◼ Convert the following Boolean expression into
standard SOP form:

AB C + A B + ABC D

AB C = AB C ( D + D ) = AB CD + AB CD

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

AB C + A B + ABC D = AB CD + AB CD + A B CD + A B CD + A B C D + A B C D + ABC D

◼ Try this
AB D + A C + BC D
26
Binary Representation of a Standard Product
Term
◼ A standard product term is equal to 1 for only one
combination of variable values.
❑ Example: AB CD is equal to 1 when A=1, B=0, C=1,
and D=0 as shown below
AB CD = 1• 0 •1• 0 = 1•1•1•1 = 1
❑ And this term is 0 for all other combinations of values
for the variables.

27
The Product-of-Sums (POS) Form

◼ When two or more sum ◼ In a POS form, a single


terms are multiplied, the overbar cannot extend over
result expression is a more than one variable;
product-of-sums (POS): however, more than one
❑ Examples: variable in a term can have
( A + B)( A + B + C ) an overbar:
( A + B + C )(C + D + E )( B + C + D) ◼ example: A + B + C is OK!
( A + B)( A + B + C )( A + C )
◼ But not:
❑ Also: A+ B +C
A ( A + B + C )(B + C + D )

28
Implementation of a POS

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

◼ OR/AND implementation

A
B

B
C X
D

A
C

29
The Standard (canonical) 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: ( A + B + C + D )( A + B + C + D)( A + B + C + D)

◼ Standard POS expressions are important in:


❑ Constructing truth tables
❑ The Karnaugh map simplification method

30
maxterm
◼ For a function of n variables, if a sum term contains each of the
n variables exactly one time in complemented or
uncomplemented form
◼ A function represented in product of maxterms is in canonical
POS form.
◼ Each maxterm represented by n-bit binary code as
❑ Uncomplemented variable by 0
❑ Complemented variable by 1
◼ The product of all maxterms of n-variables equals 0
2𝑛 −1
i.e. ς𝑖=0 𝑀𝑖 =0
◼ The r/ship between maxterm and minterm is
◼ 𝑚𝑖 = 𝑀𝑖 or 𝑀𝑖 = 𝑚𝑖

31
Converting a Sum Term to Standard POS

◼ Step 1: Add to each nonstandard sum 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.

32
Converting a Sum Term to Standard POS
(example)
◼ Convert the following Boolean expression into
standard POS form:
( A + B + C)( B + C + D )( A + B + C + D)

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

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

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

◼ Try this ( A + B + D)( B + A + D )( A + B + C )


33
Binary Representation of a Standard
Sum Term
◼ A standard sum term is equal to 0 for only one
combination of variable values.
❑ Example:A + B + C + D is equal to 0 when A=0, B=1, C=0,
and D=1 as shown below
A+ B +C + D = 0+ 1 + 0+ 1 = 0+ 0+ 0+ 0 = 0
❑ And this term is 1 for all other combinations of values
for the variables.

34
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.

35
Converting Standard SOP to Standard POS

◼ What can you use the facts?


❑ Convert from standard SOP to standard POS.

◼ How?
❑ Step 1: Evaluate each product term in the SOP expression. That is,
determine the binary numbers that represent the product terms.

❑ Step 2: Determine all of the binary numbers not included in the


evaluation in Step 1.

❑ Step 3: Write the equivalent sum term for each binary number from
Step 2 and express in POS form.

36
Converting Standard SOP to Standard POS
(example)
◼ Convert the SOP expression to an equivalent POS
expression:
A B C + A BC + A BC + AB C + ABC
❑ The evaluation is as follows:
000 + 010 + 011 + 101 + 111
❑ 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.
( A + B + C )( A + B + C )( A + B + C )

37
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.

38
Converting SOP Expressions to Truth Table
Format
◼ Recall the fact:
❑ A 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.

39
Converting SOP Expressions to Truth Table
Format (example)
◼ Develop a truth table for Inputs Output Product
the standard SOP A B C X Term
expression 0 0 0 0
0 0 1 1 ABC
A B C + AB C + ABC
0 1 0 0
0 1 1 0
1 0 0 1 AB C
1 0 1 0
1 1 0 0
1 1 1 1 ABC
40
Converting POS Expressions to Truth Table
Format

◼ Recall the fact:


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

41
Converting POS Expressions to Truth Table
Format (example)
◼ Develop a truth table for sum
Inputs Output Product
the standard POS A B C X Term
expression 0 0 0 0 ( A + B + C)

( A + B + C )( A + B + C )( A + B + C ) 0 0 1 1
( A + B + C )( A + B + C ) 0 1 0 0 ( A + B + C)
0 1 1 0 (A + B + C )
1 0 0 1
1 0 1 0 (A + B + C )
1 1 0 0 ( A + B + C)
1 1 1 1
42
Example
◼ Convert the given SOP to

❑ A truth table

❑ a standard POS

A C + A B + AB C + ABC

43
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 uncomplemented, and
❑ each 0 with the corresponding variable complement.
◼ Example: 1010 → AB CD

44
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
sum term by replacing:
❑ each 1 with the corresponding variable complement, and
❑ each 0 with the corresponding variable uncomplemented.
◼ Example: 1001 → A + B + C + D

45
Determining Standard Expression from a Truth
Table (example)
I/P O/P ◼ There are four 1s in ◼ There are four 0s in
A B C X the output and the the output and the
0
0
0
0
0
1
0
0
SOP
corresponding
binary value are
POS
corresponding
binary value are
011, 100, 110, and 000, 001, 010, and
0 1 0 0 111. 101.
011 → A BC
0 1 1 1 100 → AB C 000 → A + B + C
1 0 0 1 110 → ABC 001 → A + B + C

1 0 1 0 111 → ABC 010 → A + B + C


101 → A + B + C
1 1 0 1
X = A BC + AB C + ABC + ABC
1 1 1 1
X = ( A + B + C)( A + B + C )( A + B + C)( A + B + C )
46
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.

◼ A K-map is a 2D table showing the output level of possible


input variable combinations

47
What is K-Map
◼ 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.

◼ A K-map of n variables has 2n cells

◼ K-maps can be used for expressions with 2, 3, 4, and 5 variables.

◼ When moving from one cell to an adjacent cell of a K-map only

one variable changes


❑ It uses a gray code sequence (00. 01, 11, 10 or 000, 001, 011, 010, 110,
111, 101, 100) changes occur in only one bit position 48
Two-Variable Map
◼ A two-variable map
❑ Four minterms
❑ x' = row 0; x = row 1
❑ y' = column 0; y =
column 1
❑ A truth table in square
diagram
❑ In map (a): xy = m3 Figure 3.1 Two-variable Map
❑ In map (b): x+y =
x'y+xy' +xy =
m1+m2+m3

Representation of functions in the map


49
The 3 Variable K-Map
◼ There are 8 cells as shown:
C C
0 1 0 1
AB AB
00 00 m0 m1
ABC ABC
01 A BC 01 m2 m3
A BC
11 ABC ABC 11 m6 m7

10 10 m4 m5
AB C AB C
◼ The upper and lower edges are thought of as touching
(K-map appears as cylinder) the first & last rows are
adjacent 50
The 4-Variable K-Map

CD
00 01 11 10
AB
00 ABC D ABC D A B CD A B CD

01 A BC D A BC D A BCD A BCD

11 ABC D ABC D ABCD ABCD

10 AB C D AB C D AB CD AB CD

51
Cell Adjacency

CD
00 01 11 10
AB
00
01
11
10

52
The 5-Variable K-Map
A
A

DE DE
00 01 11 10 00 01 11 10
BC BC
00 A B C D E A B C DE A B C DE A B C D E
00 AB C D E AB C DE AB C DE AB C D E

01 A BC D E A B C DE A B CDE A B CD E
01 ABC D E AB C DE AB CDE AB CD E

11 A BC D E A BC DE A BCDE A BCD E
11 ABC D E ABC DE ABCDE ABCD E

10 A BC D E A BC DE A BC DE A BC D E
10 ABC D E ABC DE ABC DE ABC D E

53
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.

54
Mapping a Standard SOP Expression
◼ For an SOP expression
in standard form:
❑ A 1 is placed on the K- C
0 1
map for each product AB
term in the expression.
❑ Each 1 is placed in a cell 00 ABC ABC
corresponding to the
value of a product term.
01 A BC A BC
❑ Example: for the
product term AB’C , a 1
goes in the 101 cell on a 11 ABC ABC
3-variable map.
◼ A Boolean expression must 10 AB C AB1 C
be in standard form before
you use a K-map.
55
Mapping a Standard SOP Expression (full
example)
The expression:
C
A B C + A B C + ABC + AB C 0 1
AB
000 001 110 100
00
1 1
01

11 1
Practice:

10
A B C + A BC + ABC + ABC 1
A B CD + A BC D + ABC D + ABCD + ABC D + A B C D + AB CD
56
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 (rules)
1. Each cell on a K-map of n-variables has n logically adjacent cells
2. Each cell in a group must be adjacent to one or more cells in that same
group, but all cells in the group do not have to be adjacent to each other.
3. Always combine cells in power of 2. A group must contain either
1,2,4,8,16,32 cells (depending on number of variables in the expression)
4. Combine as many cells as possible. Always include the largest possible
number of 1s in a group in accordance with rule 1.
5. Each 1 on the map must be included in at least one group. The 1s
already in a group can be included in another group as long as the
overlapping groups include noncommon 1s.
6. Make as few groups as possible to cover all 1’s
7. In grouping cells, always begin with those cells for which there are the
fewest number of adjacent cells. 57
Grouping the 1s (example)

C C
AB 0 1 0 1
AB

00 1 00 1 1
01 1 01 1
11 1 1 11 1
10 10 1 1

58
Grouping the 1s (example)

CD CD
AB 00 01 11 10 AB 00 01 11 10

00 1 1 00 1 1

01 1 1 1 1 01 1 1 1

11 11 1 1 1

10 1 1 10 1 1 1

59
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 uncomplemented) within
the group. Variables that occur both complemented and
uncomplemented within the group are eliminated → called
contradictory variables.

60
Determining the Minimum SOP Expression
from the Map
2. 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:
1. A 1-cell group yields a 4-variable product term
2. A 2-cell group yields a 3-variable product term
3. A 4-cell group yields a 2-variable product term
4. An 8-cell group yields a a 1-variable product term
5. 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.

61
Determining the Minimum SOP Expression from
the Map (example)

CD
00 01 11 10 B + A C + AC D
AB
00 1 1 AC
01 1 1 1 1 B
11 1 1 1 1
10 1 AC D

62
Determining the Minimum SOP Expression
from the Map (exercises)

C C
AB 0 1 0 1
AB

00 1 00 1 1
01 1 01 1
11 1 1 11 1
10 10 1 1

AB + BC + A B C B + A C + AC

63
Determining the Minimum SOP Expression from
the Map (exercises)
CD CD
AB 00 01 11 10 AB 00 01 11 10

00 1 1 00 1 1

01 1 1 1 1 01 1 1 1

11 11 1 1 1

10 1 1 10 1 1 1
A B + A C + AB D D + AB C + BC
64
Practicing K-Map (SOP)
AB C + A BC + A B C + A B C + AB C
B + AC

B C D + A BC D + ABC D + A B CD + AB CD +
A B CD + A BCD + ABCD + AB CD

D + BC

65
Mapping Directly from a Truth Table

I/P O/P
A B C X C
0 1
0 0 0 1 AB
0 0 1 0
00 1
0 1 0 0
0 1 1 0 01
1 0 0 1
1 0 1 0 11 1 1
1 1 0 1
10 1
1 1 1 1

66
“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 not allowed 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-


map (how? see the next slide).

67
“Don’t Care” Conditions
INPUTS O/P CD
A B C D Y 00 01 11 10
0 0 0 0 0 AB
0 0 0 1 0
0 0 1 0 0 00
0
0
0
1
1
0
1
0
0
0
01 1
0
0
1
1
0
1
1
0
0
0
11 x x x x
0
1
1
0
1
0
1
0
1
1
10 1 1 x x
1 0 0 1 1
Without “don’t care”
1 0 1 0 X
Y = AB C + A BCD
1 0 1 1 X
1 1 0 0 X
1 1 0 1 X With “don’t care”
1 1 1 0 X
Y = A + BCD
1 1 1 1 X
68
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.
◼ Grouping the 0 (rule)
1. Each cell on a K-map of n-variables has n logically adjacent cells
2. Each cell in a group must be adjacent to one or more cells in that same group, but
all cells in the group do not have to be adjacent to each other.
3. Always combine cells in power of 2. A group must contain either 1,2,4,8,16,32
cells (depending on number of variables in the expression)
4. Combine as many cells as possible. Always include the largest possible number of
0s in a group in accordance with rule 1.
5. Each 0 on the map must be included in at least one group. The 0s already in a
group can be included in another group as long as the overlapping groups include
noncommon 0s.
6. Make as few groups as possible to cover all 0’s
7. In grouping cells, always begin with those cells for which there are the fewest
number of adjacent cells. 69
Mapping a Standard POS Expression
(example)
The expression:
C
( A + B + C)( A + B + C )( A + B + C)( A + B + C ) 0 1
AB
000 010 110 101
00
0
01
0
11 0
10
0
70
K-map Simplification of POS
Expression
( A + B + C)( A + B + C )( A + B + C)( A + B + C )( A + B + C)

C
0 1
AB A

00 0 0 A( B + C)

01 AB + AC
0 0
11 AC
0 1
B +C
10 1 1 AB

71
Exercise
◼ Simplify the following functions using K-Map, and
implement them with Logic gate circuits.
(hint: first change the terms to their respective standard forms)
1. ABC + CD + AB' CD + AB(C '+ D) + A' D

2.
3.
4. ( A + B + D)( A + B + C + D)( A + B + CD)( A + B + C )
5. A B D + BC D + ABC D + ABCD + AB (C + D )

6. A B D + BC ( D + A) + ABC D + ABC + AB D

72

You might also like