0% found this document useful (0 votes)
17 views53 pages

DLD 02 Comb Logic Circuit Part1

The document outlines the structure of a digital logic design course, covering topics such as binary logic, Boolean algebra, circuit optimization, and additional gate types. It emphasizes the importance of truth tables, logic gates, and Boolean identities in designing and analyzing digital systems. Additionally, it introduces canonical forms like sum-of-minterms and product-of-maxterms for representing Boolean functions.

Uploaded by

apujan2430295
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)
17 views53 pages

DLD 02 Comb Logic Circuit Part1

The document outlines the structure of a digital logic design course, covering topics such as binary logic, Boolean algebra, circuit optimization, and additional gate types. It emphasizes the importance of truth tables, logic gates, and Boolean identities in designing and analyzing digital systems. Additionally, it introduces canonical forms like sum-of-minterms and product-of-maxterms for representing Boolean functions.

Uploaded by

apujan2430295
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/ 53

Overview

• Part 1: Gate Circuits and Boolean Equations


o Binary Logic and Gates
o Boolean Algebra
o Standard Forms
• Part 2: Circuit Optimization
o Two-Level Optimization
o Map Manipulation
o Multi-Level Circuit Optimization
• Part 3: Additional Gates and Circuits
o Other Gate Types
o Exclusive-OR Operator and Gates
o High-Impedance Outputs

4-Mar-25 CSE 1325: Digital Logic Design 2


In this Lecture
• Part 1: Gate Circuits and Boolean Equations
o Binary Logic and Gates
o Boolean Algebra
o Standard Forms
• Part 2: Circuit Optimization
o Two-Level Optimization
o Map Manipulation
o Multi-Level Circuit Optimization
• Part 3: Additional Gates and Circuits
o Other Gate Types
o Exclusive-OR Operator and Gates
o High-Impedance Outputs

4-Mar-25 CSE 1325: Digital Logic Design 3


Binary Logic and Gates
• Binary variables take on one of two values.
• Logical operators operate on binary values and binary
variables.
• Basic logical operators are the logic functions AND,
OR and NOT.
• Logic gates implement logic functions.
• Boolean Algebra: a useful mathematical system for
specifying and transforming logic functions.
• We study Boolean algebra as foundation for designing
and analyzing digital systems!

4-Mar-25 CSE 1325: Digital Logic Design 4


Binary Variables

• Recall that the two binary values have


different names:
o True/False
o On/Off
o Yes/No
o 1/0
• We use 1 and 0 to denote the two values.
• Variable identifier examples:
o A, B, y, z, or X1 for now
o RESET, START_IT, or ADD1 later

4-Mar-25 CSE 1325: Digital Logic Design 5


Logical Operations
• The three basic logical operations are:
o AND
o OR
o 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.

4-Mar-25 CSE 1325: Digital Logic Design 6


Notation Examples
• Examples:
oY = A × B is read “Y is equal to A AND B.”
o z = x + y is read “z is equal to x OR y.”
o X = A is read “X is equal to NOT A.”

§ Note: The statement:


1 + 1 = 2 (read “one plus one equals two”)
is not the same as
1 + 1 = 1 (read “1 or 1 equals 1”).

4-Mar-25 CSE 1325: Digital Logic Design 7


Operator Definitions
§ Operations are defined on the values "0"
and "1" for each operator:

AND
! OR NOT
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

4-Mar-25 CSE 1325: Digital Logic Design 8


Truth Tables
• Truth table - a 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

4-Mar-25 CSE 1325: Digital Logic Design 9


Logic Gate Symbols and Behavior
• Logic gates have special symbols:
- -
@ " A- !A0 @ " A- ! A0 - A@ " A-
0 0
NO3A)+>? 4RA)+>? O4%A)+>?AY,
&(A?,>?,
!+#A6,+T8&9A:XD"YZ:
• And waveform behavior in time as follows:
- . . / /

0 . / . /

!NO3# - !A0 . . . /

!4R# - ! A0 . / / /

!O4%# - / / . .
!"#A%&D&()AG&+),+D

4-Mar-25 CSE 1325: Digital Logic Design 10


Logic Diagrams and Expressions
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.

4-Mar-25 CSE 1325: Digital Logic Design 11


Boolean Algebra
§ An algebraic structure defined on a set of at least two elements,
with three binary operators (denoted +, · and ) that satisfies the
following basic identities:

1. X+0= X 2. X.1=X
3. X+1=1 4. X .0=0
5. X+X=X 6. X .X = X
7. X+X=1 8. X .X = 0
9. X=X
10. X+Y =Y+X 11. XY = YX Commutative
12. (X + Y) + Z = X + (Y + Z) 13. (XY) Z = X(Y Z) Associative
14. X(Y + Z) = XY + XZ 15. X + YZ = (X + Y) (X + Z) Distributive
16. X + Y =X .Y 17. X .Y = X + Y DeMorgan’s

4-Mar-25 CSE 1325: Digital Logic Design 12


Some Properties of Identities & the Algebra
§ If the meaning is unambiguous, we leave out the symbol “·”
§ The identities above are organized into pairs. These pairs
have names as follows:
1-4 Existence of 0 and 1 5-6 Idempotence
7-8 Existence of complement 9 Involution
10-11 Commutative Laws 12-13 Associative Laws
14-15 Distributive Laws 16-17 DeMorgan’s Laws

§ The dual of an algebraic expression is obtained by


interchanging + and · and interchanging 0’s and 1’s.
§ The identities appear in dual pairs. When there is only
one identity on a line the identity is self-dual, i. e., the
dual expression = the original expression.
4-Mar-25 CSE 1325: Digital Logic Design 13
Proof of DeMorgan’s Laws
• Proof by truth table is trivial
x + y = x × y

• Similarly it can be proven that

x × y = x + y

4-Mar-25 CSE 1325: Digital Logic Design 14


Some Properties of Identities Algebra

• Unless it happens to be self-dual, the dual of an


expression does not equal the expression itself.
• Example: F = (A + C) · B + 0
dual F = (A · C + B) · 1 = A · C + B
• Example: G = X · Y + (W + Z)
dual G =
• Example: H = A · B + A · C + B · C
dual H =
• Are any of these functions self-dual?

4-Mar-25 CSE 1325: Digital Logic Design 15


Boolean Operator Precedence

§ The order of evaluation in a Boolean expression:


1. Parentheses
2. NOT
3. AND
4. OR
§ Consequence: Parentheses appear around
OR expressions

§ Example: F = A(B + C)(C + D)

4-Mar-25 CSE 1325: Digital Logic Design 16


Example 1: Boolean Algebraic Proof
• A + A·B = A (Absorption Theorem)
Proof Steps Justification (identity or theorem)
A + A·B
= A·1+A·B X=X·1
= A · ( 1 + B) X · Y + X · Z = X ·(Y + Z)(Distributive Law)
=A·1 1+X=1
=A X·1=X
• Our primary reason for doing proofs is to learn:
o Careful and efficient use of the identities and theorems of
Boolean algebra, and
o How to choose the appropriate identity or theorem to
apply to make forward progress, irrespective of the
application.

4-Mar-25 CSE 1325: Digital Logic Design 17


Example 2: Boolean Algebraic Proofs

• AB + AC + BC = AB + AC (Consensus Theorem)

Proof Steps Justification (identity or theorem)


AB + AC + BC
= AB + AC + 1 · BC ?
= AB +AC + (A + A) · BC ?
=

4-Mar-25 CSE 1325: Digital Logic Design 18


Example 3: Boolean Algebraic Proofs
• ( X + Y )Z + X Y = Y ( X + Z )

Proof Steps Justification (identity or theorem)


(X + Y )Z + X Y
=

4-Mar-25 CSE 1325: Digital Logic Design 19


Useful Theorems

+ + +!, = + + ! (+ + , ) = + *!"#A%&'(A)
x + x × y = x + y x × (x + y )= x × y Simplification

x + y = x×y x×y = x + y DeMorgan' s Laws

4-Mar-25 CSE 1325: Digital Logic Design 20


Boolean Function Evaluation

F1 = xyz !" #" $" %&" %'" %(" %F"


F2 = x + yz *" *" *" *" *" " "
F3 = xyz + x y z + xy *" *" &" *" &" " "
F4 = xy + x z *" &" *" *" *" " "
*" &" &" *" *" " "
&" *" *" *" &" " "
&" *" &" *" &" " "
&" &" *" &" &" " "
&" &" &" *" &" " "
"
4-Mar-25 CSE 1325: Digital Logic Design 21
Expression Simplification
• An application of Boolean algebra
• Simplify to contain the smallest number
of literals (complemented and
uncomplemented variables):
A B + A C D + A BD + A C D + A BC D
= AB + ABCD + A C D + A C D + A B D
= AB + AB(CD) + A C (D + D) + A B D
= AB + A C + A B D = B(A + AD) +AC
= B (A + D) + A C 5 literals
4-Mar-25 CSE 1325: Digital Logic Design 22
Complementing Functions
• Use DeMorgan's Theorem to complement a
function:
1. Interchange AND and OR operators
2. Complement each constant value and literal
• Example: Complement F = x y z + x y z
F = x y z + x y z = x y z.x y z
=(x + y + z).(x + y + z)
• Example: Complement G = (a + bc)d + e
G=

4-Mar-25 CSE 1325: Digital Logic Design 23


Complementing using Dual
1. Take dual of the function
2. Then complement each literal

Now complement F = x y z + xyz using dual

4-Mar-25 CSE 1325: Digital Logic Design 24


Where we are?
• Part 1: Gate Circuits and Boolean Equations
o Binary Logic and Gates
o Boolean Algebra
o Standard Forms
• Part 2: Circuit Optimization
o Two-Level Optimization
o Map Manipulation
o Multi-Level Circuit Optimization
• Part 3: Additional Gates and Circuits
o Other Gate Types
o Exclusive-OR Operator and Gates
o High-Impedance Outputs

4-Mar-25 CSE 1325: Digital Logic Design 25


Overview – Canonical Forms

• What are Canonical Forms?


• Minterms and Maxterms
• Index Representation of Minterms and Maxterms
• Sum-of-Minterm (SOM) Representations
• Product-of-Maxterm (POM) Representations
• Representation of Complements of Functions
• Conversions between Representations

4-Mar-25 CSE 1325: Digital Logic Design 26


Canonical Forms
• It is useful to specify Boolean functions in a form that:
o Allows comparison for equality.
o Has a correspondence to the truth tables

• Canonical Forms in common usage:


o Sum of Minterms (SOM)
o Product of Maxterms (POM)

4-Mar-25 CSE 1325: Digital Logic Design 27


Minterms
• Minterms are AND terms with every variable present
in either true or complemented form.
• Given that each binary variable may appear normal
(e.g., x) or complemented (e.g., x ), there are 2n
minterms for n variables.
• Example: Two variables (X and Y)produce
2 x 2 = 4 combinations:
XY (both normal)
X Y (X normal, Y complemented)
X Y (X complemented, Y normal)
X Y (both complemented)
• Thus there are four minterms of two variables.
• How many for 3 or 4 variables?

4-Mar-25 CSE 1325: Digital Logic Design 28


Maxterms
• Maxterms are OR terms with every variable in true or
complemented form.
• Given that each binary variable may appear normal
(e.g., x) or complemented (e.g., x), there are 2n
maxterms for n variables.
• Example: Two variables (X and Y) produce
2 x 2 = 4 combinations:
X + Y (both normal)
X + Y (x normal, y complemented)
X + Y (x complemented, y normal)
X + Y (both complemented)
• How many for 3 or 4 variables?

4-Mar-25 CSE 1325: Digital Logic Design 29


Maxterms and Minterms
• Examples: Two variable minterms and maxterms.

Index Minterm Maxterm


0 xy m0 x+y M0

1 xy m1 x+y M1

2 xy m2 x+y M2

3 xy m3 x+y M3

• The index above is important for describing


which variables in the terms are true and
which are complemented.

4-Mar-25 CSE 1325: Digital Logic Design 30


Standard Order
• Minterms and maxterms are designated with a subscript
• The subscript is a number, corresponding to a binary
pattern
• The bits in the pattern represent the complemented or
normal state of each variable listed in a standard order.
• All variables will be present in a minterm or maxterm
and will be listed in the same order (usually
alphabetically)
• Example: For variables a, b, c:
o Maxterms: (a + b + c), (a + b + c)
o Terms: (b + a + c), a c b, and (c + b + a) are NOT in
standard order.
o Minterms: a b c, a b c, a b c
o Terms: (a + c), b c, and (a + b) do not contain all
variables
4-Mar-25 CSE 1325: Digital Logic Design 31
Purpose of the Index
• The index for the minterm or maxterm, expressed as
a binary number, is used to determine whether the
variable is shown in the true form or complemented
form.
• For Minterms:
o “1” means the variable is “Not Complemented” and
o “0” means the variable is “Complemented”.

• For Maxterms:
o “0” means the variable is “Not Complemented” and
o “1” means the variable is “Complemented”.

4-Mar-25 CSE 1325: Digital Logic Design 32


Index Example in Three Variables
• Example: (for three variables)
• Assume the variables are called X, Y, and Z.
• The standard order is X, then Y, then Z.
• The Index 0 (base 10) = 000 (base 2) for three
variables). All three variables are
complemented for minterm 0 ( X , Y , Z ) and no
variables are complemented for Maxterm 0
(X,Y,Z).
o Minterm 0, called m0 is X Y Z .
o Maxterm 0, called M0 is (X + Y + Z).
o Minterm 6 ?
o Maxterm 6 ?
4-Mar-25 CSE 1325: Digital Logic Design 33
Index Examples – Four Variables
Index Binary Minterm Maxterm
i Pattern mi Mi
0 0000 a b c d $ + # + " + !
1 0001 a b c d ?
3 0011 ? a+ b + c+ d
5 0101 a b c d a + b + c + d
7 0111 ? a+ b + c+ d
10 1010 a b c d a + b + c + d
13 1101 a b c d ?
15 1111 a b c d a + b + c + d

4-Mar-25 CSE 1325: Digital Logic Design 34


Minterm and Maxterm Relationship
• Review: DeMorgan's Theorem
x · y = x + y and x + y = x × y
• Two-variable example:
M 2 = x + y and m 2 = x·y
Thus M2 is the complement of m2 and vice-
versa.
• Since DeMorgan's Theorem holds for n
variables, the above holds for terms of n
variables
• giving:
M i = m i and m i = M i
Thus Mi is the complement of mi.
4-Mar-25 CSE 1325: Digital Logic Design 35
Function Tables for Both
• Minterms of Maxterms of
2 variables 2 variables
xy m0 m1 m2 m3 x y M0 M1 M2 M3
00 1 0 0 0 00 0 1 1 1
01 0 1 0 0 01 1 0 1 1
10 0 0 1 0 10 1 1 0 1
11 0 0 0 1 11 1 1 1 0

• Each column in the maxterm function table is the


complement of the column in the minterm
function table since Mi is the complement of mi.

4-Mar-25 CSE 1325: Digital Logic Design 36


Observations
• In the function tables:
o Each minterm has one and only one ‘1’ present in the 2n
terms (a minimum of 1s). All other entries are ‘0’.
o Each maxterm has one and only one ‘0’ present in the 2n
terms All other entries are ‘1’ (a maximum of 1s).
• We can implement any function by "ORing" the
minterms corresponding to "1" entries in the function
table. These are called the minterms of the function.
• We can implement any function by "ANDing" the
maxterms corresponding to "0" entries in the function
table. These are called the maxterms of the function.
• This gives us two canonical forms:
o Sum of Minterms (SOM)
o Product of Maxterms (POM)

for stating any Boolean function.


4-Mar-25 CSE 1325: Digital Logic Design 37
Minterm Function Example
• Example: Find F1 = m1 + m4 + m7
• F1 = x y z + x y z + x y z
x y z index m1 + m4 + m7 = F1
000 0 0 + 0 + 0 =0
001 1 1 + 0 + 0 =1
010 2 0 + 0 + 0 =0
011 3 0 + 0 + 0 =0
100 4 0 + 1 + 0 =1
101 5 0 + 0 + 0 =0
110 6 0 + 0 + 0 =0
111 7 0 + 0 + 1 =1
4-Mar-25 CSE 1325: Digital Logic Design 38
Minterm Function Example
• F(A, B, C, D, E) = m2 + m9 + m17 + m23
• F(A, B, C, D, E) =

4-Mar-25 CSE 1325: Digital Logic Design 39


Maxterm Function Example
• Example: Implement F1 in maxterms:
F1 = M0 · M2 · M3 · M5 · M6
F1 = (x + y + z) ·(x + y + z)·(x + y + z)
·(x + y + z)·(x + y + z)
xyz i M0 × M2 × M3 × M5 × M6 = F1
000 0 0 × 1 × 1 × 1 × 1 =0
001 1 1 × 1 × 1 × 1 × 1 =1
010 2 1 × 0 × 1 × 1 × 1 =0
011 3 1 × 1 × 0 × 1 × 1 =0
100 4 1 × 1 × 1 × 1 × 1 =1
101 5 1 × 1 × 1 × 0 × 1 =0
110 6 1 × 1 × 1 × 1 × 0 =0
111 7 1 × 1 × 1 × 1 × 1 =1
4-Mar-25 CSE 1325: Digital Logic Design 40
Maxterm Function Example
F( A , B, C, D ) = M 3 × M8 × M11 × M14
F(A, B,C,D) =

4-Mar-25 CSE 1325: Digital Logic Design 41


Canonical Sum of Minterms
• Any Boolean function can be expressed as a
Sum of Minterms.
o For the function table, the minterms used are the
terms corresponding to the 1's
o For expressions, expand all terms first to explicitly
list all minterms. Do this by “ANDing” any term
missing a variable v with a term ( v + v ).
• Example: Implement f = x + x y as a sum of
minterms.
First expand terms: f = x ( y + y ) + x y
Then distribute terms: f = xy + x y + x y
Express as sum of minterms: f = m3 + m2 + m0

4-Mar-25 CSE 1325: Digital Logic Design 42


Another SOM Example
• Example: F = A + B C
• There are three variables, A, B, and C which we take
to be the standard order.
• Expanding the terms with missing variables:

• Collect terms (removing all but one of duplicate


terms):
• Express as SOM:

4-Mar-25 CSE 1325: Digital Logic Design 43


Shorthand SOM Form
• From the previous example, we started with:
F=A +BC
• We ended up with:
F = m1 + m4 + m5 + m6 + m7
• This can be denoted in the formal shorthand:
,( + # *# F! = !-('#C#B#A#" !
• Note that we explicitly show the standard
variables in order and drop the “m”
designators.

4-Mar-25 CSE 1325: Digital Logic Design 44


Canonical Product of Maxterms
• Any Boolean Function can be expressed as a
Product of Maxterms (POM).
o For the function table, the maxterms used are the terms
corresponding to the 0's.
o For an expression, expand all terms first to explicitly list all
maxterms. Do this by first applying the second distributive
law , “ORing” terms missing variable v with a term equal to v×v
and then applying the distributive law again.
• Example: Convert to product of maxterms:
f (x, y, z) = x + x y
Apply the distributive law:
x + x y = (x + x )(x + y ) = 1 × (x + y ) = x + y
Add missing variable z:
x + y + z × z = (x + y + z) (x + y + z )
Express as POM: f = M2 · M3
4-Mar-25 CSE 1325: Digital Logic Design 45
Another POM Example
• Convert to Product of Maxterms:
f(A, B, C) = A C + B C + A B
• Use x + y z = (x+y)·(x+z) with x = (A C + B C), y = A
, and z = B to get:
f = (A C + B C + A )(A C + B C + B)
• Then use x + x y = x + y to get:
f = ( C + BC + A )(A C + C + B )
and a second time to get:
f = ( C + B + A )(A + C + B )
• Rearrange to standard order,
f = ( A + B + C )(A + B + C) to give f = M5 · M2
4-Mar-25 CSE 1325: Digital Logic Design 46
Function Complements
• The complement of a function expressed as a sum of
minterms is constructed by selecting the minterms
missing in the sum-of-minterms canonical forms.
• Alternatively, the complement of a function expressed
by a Sum of Minterms form is simply the Product of
Maxterms with the same indices.
• Example: Given F ( x , y , z ) = Sm ( 1, 3 , 5 , 7 )
F ( x , y , z ) = S m( 0,2,4,6 )
F ( x , y , z ) = P M (1,3,5,7 )

4-Mar-25 CSE 1325: Digital Logic Design 47


Conversion Between Forms
• To convert between sum-of-minterms and product-of-
maxterms form (or vice-versa) we follow these steps:
o Find the function complement by swapping terms in the list with
terms not in the list.
o Change from products to sums, or vice versa.

• Example:Given F as before:+' * # F # ( ! = !,'&# %#$#" !


• Form the Complement: F ( x , y , z ) = Sm ( 0, 2,4,6 )
• Then use the other form with the same indices – this
forms the complement again, giving the other form of the
original function: +' * # F # ( ! = !, ' &# %#$#" !

4-Mar-25 CSE 1325: Digital Logic Design 48


Standard Forms
• Standard Sum-of-Products (SOP) form:
equations are written as an OR of AND terms
• Standard Product-of-Sums (POS) form:
equations are written as an AND of OR terms
• Examples:
o SOP: A B C + A B C + B
o POS: (A + B) · (A + B + C ) · C

• These “mixed” forms are neither SOP nor


POS
o (A B + C) (A + C)
o A B C + A C (A + B)

4-Mar-25 CSE 1325: Digital Logic Design 49


Standard Sum-of-Products (SOP)
• A sum of minterms form for n variables can be written
down directly from a truth table.
o Implementation of this form is a two-level network of gates
such that:
o The first level consists of n-input AND gates, and
o The second level is a single OR gate (with fewer than 2
n
inputs).
• This form often can be simplified so that the
corresponding circuit is simpler.

4-Mar-25 CSE 1325: Digital Logic Design 50


Standard Sum-of-Products (SOP)
• A Simplification Example:
• -( , # +# *! = !F('#C#B#A#" !
• Writing the minterm expression:
F = A B C + A B C + A B C + ABC + ABC
• Simplifying:
F=

• Simplified F contains 3 literals compared to 15


in minterm F
4-Mar-25 CSE 1325: Digital Logic Design 51
AND/OR Two-level Implementation of
SOP Expression
• The two implementations for F are shown below – it
is quite apparent which is simpler!
"
# A
!
A
" "
# #
A
"
# !
A
"
#
A
"
#
A
!
B
4-Mar-25 CSE 1325: Digital Logic Design 52
SOP and POS Observations
• The previous examples show that:
o Canonical Forms (Sum-of-minterms, Product-of-
Maxterms), or other standard forms (SOP, POS)
differ in complexity
o Boolean algebra can be used to manipulate
equations into simpler forms.
o Simpler equations lead to simpler two-level
implementations
• Questions:
o How can we attain a “simplest” expression?
o Is there only one minimum cost circuit?
o The next part will deal with these issues.

4-Mar-25 CSE 1325: Digital Logic Design 53

You might also like