0% found this document useful (0 votes)
18 views

chapter 4

Digital Logic Design Chapter 4 PPT best book
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
18 views

chapter 4

Digital Logic Design Chapter 4 PPT best book
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 38

Chapter 4

Boolean Algebra and Logic Simplification

1
Boolean Operations & Expressions
 Variable
 A symbol that represents a logical quantity
 Usually italic uppercase (A, B, C, D)
 A single variable can have a 1 or 0 value

 Complement
 The inverse of a variable
 Indicated by an over bar (Ā) or prime (A’)
 If A = 1 , then Ā = 0
 Literal = both variable and its complement in a term.
 Ā + B + C  3 literals

2
Laws & Rules of Boolean Algebra
 Basic laws of BA
1. Commutative Laws
 For addition and multiplication
2. Associative Laws
 For addition and multiplication
3. Distributive Laws
1. Commutative Laws

3
2. Associative Laws
 A + (B + C) = (A + B) + C

A A
A+B
A + (B + C)
B
B
(A + B) + C
B+C
C C
Associative law of addition

 A(BC) = (AB)C

A A
A(BC)
B

B
(AB)C
BC
C C

Associative law of multiplication


4
3. Distributive Law

 A(B + C) = AB + AC

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

5
Rules of Boolean Algebra

1 A+0=A
2 A+1=1
3 A 0=0
4 A 1=A
5 A+A=A
6 A+A=1
7 A A=A
8 A A=0
9 A=A
10 A + AB = A
11 A + AB = A + B
12 (A + B)(A + C) = A + BC
6
Rules of Boolean Algebra: Proof

Rule 1:
A= 1 A= 0
X=1 X=0
0 0

X=A+0=A

Rule 2:
A= 1 A= 0
X=1 X=1
1 1

X=A+1=1

7
Rule 3:
A= 1 A= 0
X=0 X=0
0 0

X=A 0=0
Rule 4:
A= 0 A= 1
X=0 X=1
1 1

X=A 1=A

Rule 5:
A= 0 A= 1
X=0 X=1
A= 0 A= 1

X=A+A=A
8
Rule 6:
A= 0 A= 1
X=1 X=1
A= 1 A= 0

X=A+A=1

Rule 7:
A= 0 A= 1
X=0 X=1
A= 0 A= 1

X=A A=A

Rule 8:
A= 1 A= 0
X=0 X=0
A=0 A=1

X=A A=0
Rule 9:
A =0
A =1
A= 1 A=1
A= 0 A=0

A=A
9
 Rules 10, 11 and 12 can be proven using BA laws.
Rule 10:
A + AB = A(1 + B) Factoring (distributive law)
=A.1 Rule 2: (1 + B) = 1
=A Rule 4: A . 1 = A

Rule 11:
A + AB = (A + AB) + AB Rule 10: A = A + AB
= (AA + AB) + AB Rule 7: A = AA
= AA + AB + AA + AB Rule 8: adding AA = 0
= (A + A)(A + B) Factoring
= 1 . (A + B) Rule 6: A + A = 1
= A+B Rule 4: drop the 1

Rule 12:
(A + B)(A + C) = AA + AC + AB + BC Distributive law
= A + AC + AB + BC Rule 7: AA = A
= A(1 + C) + AB + BC Factoring (distributive law)
= A . 1 + AB + BC Rule 2: 1 + C = 1
= A(1 + B) + BC Factoring (distributive law)
= A . 1 + BC Rule 2: 1 + B = 1 10

= A + BC Rule 4: A . 1 = A
DeMorgan’s Theorems

 Provides mathematical verification for:


 NAND ≡ negative-OR
 NOR ≡ negative-AND

 DM theorem 1: The complement of a product of


variables is equal to the sum of the complements of
the variables
11
 DM theorem 2:The complement of a sum of variables
is equal to the product of the complements of the
variables

 DeMorgan’s Theorem Application

12
Examples for DeMorgan’s Theorems

Boolean expression for a Logic Circuit


 To derive the Boolean expression for a given circuit, follow
left-2-right rule.
 Begin from the left-most inputs and work towards the last.

13
Constructing a Truth Table for a Logic Circuit
 A truth table shows the output for all possible input values.
 From a Boolean expression, a truth table can be developed.
 x = number of input variables
 Possible combinations of values, n = 2x
 E.g. A(B + CD)  x = 4; n = 24=16
Steps in constructing a truth table
 Step 1: Identify x and n from the Boolean exp.
 Step 2: Find the values of the variables that make the
expression equal to 1.(Hint: use the rules for Boolean
addition and multiplication)
 Step 3: List in a table
 all the n combinations of 1s and 0s (input)
 The values of variables from step 2 (output)
14
 All the other output values will be 0
Example A(B + CD)
 Step 1: x = 4 ; n = 2x = 24 = 16
 Step 2:
 A(B + CD) = 1 • 1 = 1  A = 1
 What makes B + CD = 1?
B + CD = 1 + 0 = 1
B + CD = 0 + 1 = 1
B + CD = 1 + 1 = 1  B = 1 or 0
 What makes CD = 1?
 CD = 1 . 1 = 1  C = 1; D = 1
 So for A(B + CD) = 1
A = 1, B = 1, C = 0/1, D = 1/0
A = 1, B = 1/0 , C = 1, D = 1
15
 Step 3 : Fill in the grid and results from Step 2
INPUTS OUTPUT
A B C D A(B + CD)

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 0
1 0 0 0 0
1 0 0 1 0
1 0 1 0 0
1 0 1 1 1
1 1 0 0 1
1 1 0 1 1
1 1 1 0 1
1 1 1 1 1
16
 Tips on ‘table-making’:
 For n possible combinations, the input part of the
table will register the binary value of 0 to n-1.
(e.g. n = 16; 0 to 15)
Simplification using Boolean Algebra
 Simplification:
 To reduce an expression to its simplest form
 To change a form to a more convenient one for
efficient implementation
 We use:- basic laws, rules, theorems of Boolean
algebra

17
 Example

 Assignment:

18
Standard Form of Boolean Expressions
 Boolean expression can be converted into one of 2 standards
forms:
 The sum-of-products (SOP) form
 The product-of-sums (POS) form
 Standardization makes the evaluation, simplification, and
implementation of Boolean expressions more systematic and
easier
 Product term = a term with the product (Boolean
multiplication) of literals
 Sum term = a term with the sum (Boolean addition) of literals
The Sum-of-Products (SOP) Form
 SOP = when 2 or more product terms are summed
e.g ABP1 + ABCP2
ABCP1 + CDEP2 + BCDP3
SOP can also contain a single variable term 19
 In SOP a single overbar cannot extend over more than 1
variable, but more than 1 variable can have an overbar.

 Domain is a set of variables contained in an


expression

 Implementation of the SOP expression AB + BCD + AC

20
 A logic expression can be changed to SOP form using
Boolean algebra techniques.
 A(B + CD) = AB + ACD
 AB + B(CD + EF) = AB + BCD + BEF
 Standard SOP form = where all the variables in the
domain appear in each product term in the expression.

 To convert product terms to standard SOP


 Multiplyeach of the nonstandard term with the missing
term using Boolean algebra rule 6 ( ).
 Repeat until all variables appear in each product term.

21
 Convert this Boolean expression to standard SOP form:

 Domain = A, B, C, D.
 What is missing?
 Term 1: missing D or D’
 Term 2: missing (C/C’) and (D/D’)
 Complete these terms by applying Boolean rule 6
Term 1: ABC  ABC( D  D)  ABCD  ABC D

Term 2 : AB  ABC  ABC


 ABC ( D  D)  ABC ( D  D)  ABCD  ABC D  ABCD  ABC D

 Now we have
ABC  AB  ABC D
 ABCD  ABC D  ABCD  ABC D  ABC D  ABC D  ABC D

22
Binary representation of a standard product term

 A product = 1 only if ALL variables in the term is


equal to 1.
 Remember: product = multiplication  1.1 = 1
 A sum = 1 when one or all of the variables in the
term is equal to 1.
Remember: sum = addition  1 + 0 = 1; 0 + 1 = 1;
1+1=1

23
Determine the binary value for which the following standard SOP
expression is equal to 1:

ABCD + ABCD + ABCD


The term ABCD is equal to 1 when A = 1, B = 1, C = 1, and D = 1

ABCD = 1.1.1.1 = 1
The term ABCD is equal to 1 when A = 1, B = 0, C = 0, and D = 1
ABCD = 1.0.0.1 = 1.1.1.1 = 1
The term ABCD is equal to 1 when A = 0, B = 0, C = 0, and D = 0
ABCD = 0.0.0.0 = 1.1.1.1 = 1
The SOP expression equals 1 when any or all of the three product
terms is 1.
24
Product-of-Sums (POS) Form

 POS = when 2 or more sum terms are


multiplied.
 (A + B)S1(A + B + C)S2
 (A + B + C)S1(C + D + E)S2(B + C + D)S3
 Like SOP, POS
 can also contain a single variable term
 a single over bar cannot extend over more than 1
variable, but more than 1 variable can have an over
bar.

A B C  A B C 
 Domain = a set of variables contained in an expression
 (A + B + C)(A + B + D)(A + B + C + D)  domain = A,
B, C, D
25
 Implementation of the POS expression (A + B(B + C + D)(A + C)
A
B
B
C X = (A + B)(B + C + D)(A + C)
D
A
C

 Standard POS form = where all the variables in the domain


appear in each sum term in the expression.
 To convert product terms to standard POS
 Multiply each of the nonstandard term with the missing
term using Boolean algebra rule 8:
A  A  0 = (A + B)(A + C)
 Apply rule 12 : A  BC  ( A  B)( A  C )
Repeat until all variables appear in each sum term.
26

 Convert this Boolean expression to standard POS form
( A  B  C)(B  C  D)( A  B  C  D)
 Domain = A, B, C, D.
 What is missing?
 Term 1: missing D or D’
 Term 2: missing A or A’
 Apply rules 8 and 12
Term 1: A  B  C  A  B  C  DD  ( A  B  C  D)( A  B  C  D)
Term 2 : B  C  D  B  C  D  A A
 ( A  B  C  D)( A  B  C  D)
 Now we have
( 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)
27
Binary representation of a standard sum term
 A product = 0 only if one or more of the sum term is
equal to 0.
 Remember: product = multiplication  1.1 = 1
 A sum = 1 when one or all of the variables in the term
is equal to 1.
 Remember: sum = addition  1 + 0 = 1; 0 + 1 = 1;
1+1=1
Converting Standard SOP to Standard POS
 Binary values in a standard SOP expression are not
present in the equivalent standard POS expression
Standard Standard
SOP POS
Then x is
If x is here
Binary not here
values (x) If x is not Then x is
here here 28
Steps to follow : SOP to POS
 Step 1: Evaluate each product term in the SOP expression
 i.e. determine the binary numbers of the product terms.
 Step 2: Determine all the binary numbers not included in
Step 1.
 Step 3: Write equivalent sum term for each binary number
from Step 2 and express in POS form.
 Use a similar procedure, to go from POS to SOP
Example: Convert this SOP exp. to an equivalent POS exp.
A B C + A B C + A BC + AB C + A B C

 Domain = A, B, C = 3. So, 23 = 8 possible combinations.


A B C + A B C + A BC + A B C + A B C
000 010 011 101 111
 The SOP have 5 of 8, so POS have the other 3 (001, 100,
110)  These 3 make sum term = 0 29
(A + B + C)(A + B + C)(A + B +C)
0 0 1 1 0 0 1 1 0
Boolean Expressions and Truth Tables
 Step 1: determine domain and combinations of binary values 
input
 Step 2: convert expression to Standard SOP/POS.
 Step 3: find the binary values that make the product = 1 (SOP) or
sum = 0 (POS)
 Step 4: the remaining combination will be
 Equal to 0 (SOP)
 Equal to 1 (POS)
 Fill in the truth table
 Develop a truth table for the standard SOP expression
ABC + ABC + ABC
 Domain = A, B, C. combinations = 23 = 8
 What binary value makes the product term = 1?
ABC
001 =111=1
ABC
100 =111=1
ABC 30
111 =111=1
 Fill the truth table INPUTS OUTPUT PRODUCT
TERM
A B C X
0 0 0 0
0 0 1 1 ABC
0 1 0 0
0 1 1 0
1 0 0 1 ABC
1 0 1 0
1 1 0 0
1 1 1 1 ABC

Determining Standard expressions from a truth table


 Replace each binary number with its corresponding variable.
 SOP = 1→ var. & 0 → var. complement
 POS = 0→ var. & 1 → var. complement
SOP POS
1010 ABCD 1001 A+B+C+D
ABCD = 1 0 1 0 A+B+C+D= 1+0+0+1
=1111=1 =0+0+0+0=0
31
Karnaugh Map (K-Map)
 K-Map is similar to the truth table, but it presents all of
the possible values of input and output.
 This is shown in an array of cells.
 K-Maps can be used for expressions with 2,3,4 or 5
variables.
 The number of cells in a K-Map = total number of possible
input variable combinations  3 = 23 = 8
 Cells that differ by only one variable are adjacent Cell
010 is adjacent to 000, 011 and 110
 Physically, cells that share their walls are adjacent
 In a K-map with 4-variable or more, the top-most &
bottom-most cells of a column (and row) are adjacent.

32
C C
0 1 0 1
AB AB
00 00 ABC ABC

01 01 ABC ABC
3-Variable Karnaugh Map
11 11 ABC ABC

10 10 ABC ABC

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

01 01 ABCD ABCD ABCD ABCD

11 11 ABCD ABCD ABCD ABCD

10 10 ABCD ABCD ABCD ABCD

4-Variable Karnaugh Map

33
K-Map SOP Minimization
 K-Map is used to simplify Boolean expressions to their
minimum form.
 A minimized SOP expression has the fewest possible
term with each term having fewest possible variables.
 A minimized SOP expression needs fewer logic gates
than standard expression.
 To map an SOP expression to a map:
 Step 1: determine the binary value of each product term
 Step 2: Place a 1 in a cell that have the same value as the
product term
Example: Map SOP expression of ABC + ABC + ABC + ABC

C ABC + ABC + ABC + ABC


AB
0 1 000 001 110 100
00 1 1

01
34
11 1

10 1
 Map the following expression
ABCD + ABCD + ABCD + ABCD + ABCD + ABCD + ABCD

ABCD + ABCD + ABCD + ABCD + ABCD + ABCD + ABCD


0011 0100 1101 1111 1100 0001 1010

ABCD
CD
AB 00 01 11 10
00 1 1 ABCD

01 1
ABCD
11 1 1 1

ABCD 10 1 ABCD

ABCD ABCD

35
 To use K-maps, expressions must be in standard form.
 For expressions that are not standard, it must be
converted to a standard form.
 Recall: AB + ABC
 AB(C/C’)  11(1/0)  ABC + ABC’
 So: ABC + ABC’ + ABC
 Map the following expression on a K-map:
C
A + AB + ABC 0 1
AB
000 100 110
00 1 1
001 101
010 01 1 1
011
11 1

10 1 1

36
K-Map Simplification of SOP Expressions
 There are 3 steps to obtain a minimum SOP
expression from a K-map.
1. Grouping the 1s
2. Determine product term for each group
3. Summing the resulting product terms
 Group must contain cells in 2x combination (i.e.
1,2,4,8,16
 Each cell must be adjacent to at least 1 other cell in
the group, but all cells in a group need not be adjacent
 Try to have the biggest possible group of 1s
 Each 1 must be in at least one group.
 The 1s already in a group may be included in another
group so long as the overlapping group includes non-
common 1s 37
(a) (b) (c) (d)
C C CD CD
AB 0 1 AB 0 1 00 01 11 10 AB 00 01 11 10
AB
00 1 00 1 1 00 1 1 00 1 1
01 1 01 1 01 1 1 1 1 01 1 1 1
11 1 1 11 1 11 11 1 1 1
10 10 1 1 10 1 1 10 1 1 1

C C
AB 0 1 0 1 CD CD
AB AB 00 01 11 10 AB 00 01 11 10
00 1 00 1 1
00 1 1 00 1 1
01 1 01 1 01 1 1 1
01 1 1 1 1
11 1 1 11 1 11 1 1 1
11
10 10 1 1 10 1 1 1
10 1 1

(a) (b) (c) (d)


38

You might also like