0% found this document useful (0 votes)
48 views43 pages

Chapter 2 - Combinational Logic Circuits: Logic and Computer Design Fundamentals

This document provides an overview of Chapter 2 - Part 1 of a textbook on logic and computer design fundamentals. It covers binary logic, Boolean algebra, logic gates, truth tables, and canonical forms including minterms and maxterms. The key topics are that binary variables can take on values of 1 or 0, the basic logic operations are AND, OR, and NOT, and Boolean algebra provides a mathematical system for specifying and transforming logic functions.

Uploaded by

vishnu
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
48 views43 pages

Chapter 2 - Combinational Logic Circuits: Logic and Computer Design Fundamentals

This document provides an overview of Chapter 2 - Part 1 of a textbook on logic and computer design fundamentals. It covers binary logic, Boolean algebra, logic gates, truth tables, and canonical forms including minterms and maxterms. The key topics are that binary variables can take on values of 1 or 0, the basic logic operations are AND, OR, and NOT, and Boolean algebra provides a mathematical system for specifying and transforming logic functions.

Uploaded by

vishnu
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 43

Logic and Computer Design Fundamentals

Chapter 2 – Combinational
Logic Circuits
Part 1 – Gate Circuits and Boolean Equations
Overview
 Part 1 – Gate Circuits and Boolean Equations
2-1 Binary Logic and Gates
2-2 Boolean Algebra
2-3 Standard Forms
 Part 2 – Circuit Optimization
2-4 Two-Level Optimization
2-5 Map Manipulation
2-6 Pragmatic Two-Level Optimization (Espresso)
2-7 Multi-Level Circuit Optimization
 Part 3 – Additional Gates and Circuits
2-8 Other Gate Types
2-9 Exclusive-OR Operator and Gates
2-10 High-Impedance Outputs

Chapter 2 - Part 1 2
2-1 Binary Logic and Gates
 Digital circuits are hardware components
(based on transistors) that manipulate
binary information
 We model the transistor-based electronic
circuits as logic gates.
• Designer can ignore the internal electronics of a
gate

Chapter 2 - Part 1 3
Binary Logic
 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 a foundation for
designing and analyzing digital systems!
Chapter 2 - Part 1 4
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 for now
• RESET, START_IT, or ADD1 later

Chapter 2 - Part 1 5
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.
Chapter 2 - Part 1 6
Notation Examples
 Examples:
• Y  A  B is read “Y is equal to A AND B.”
• z  x  y is read “z is equal to x OR y.”
• 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”).

Chapter 2 - Part 1 7
Operator Definitions
 Operations are defined on the values
"0" and "1" for each operator:

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

Chapter 2 - Part 1 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
Chapter 2 - Part 1 9
Logic Function Implementation
 Using Switches Switches in parallel => OR
• For inputs:
 logic 1 is switch closed
 logic 0 is switch open
• For outputs: Switches in series => AND
 logic 1 is light on
 logic 0 is light off.
• NOT uses a switch such
that: Normally-closed switch => NOT
 logic 1 is switch open C
 logic 0 is switch closed

Chapter 2 - Part 1 10
Logic Function Implementation (Continued)
 Example: Logic Using Switches
B C
A

D
 Light is on (L = 1) for
L(A, B, C, D) =
and off (L = 0), otherwise.
 Useful model for relay circuits and for CMOS
gate circuits, the foundation of current digital
logic technology
Chapter 2 - Part 1 11
Logic Gates
 In the earliest computers, switches were opened
and closed by magnetic fields produced by
energizing coils in relays. The switches in turn
opened and closed the current paths.
 Later, vacuum tubes that open and close current
paths electronically replaced relays.
 Today, transistors are used as electronic
switches that open and close current paths.
 Optional: Chapter 6 – Part 1: The Design
Space

Chapter 2 - Part 1 12
Logic Gate Symbols and Behavior
 Logic gates have special symbols:

Chapter 2 - Part 1 13
Gate Delay
 In actual physical gates, if one or more input
changes causes the output to change, the output
change does not occur instantaneously.
 The delay between an input change(s) and the
resulting output change is the gate delay
denoted by tG:
1
Input
0
tG tG tG = 0.3 ns
1
Output
0
0 0.5 1 1.5 Time (ns)
Chapter 2 - Part 1 14
AND and OR gates with more than two
inputs

Chapter 2 - Part 1 15
2-2 Boolean Algebra
 Boolean expression: a expression formed by
binary variables, for example, DX  A
 Boolean function: a binary variable
identifying the function followed by an
equal sign and a Boolean expression for
example
L( D, X , A)  DX  A

Chapter 2 - Part 1 16
Truth table and Logic circuit

For the Boolean function


L( D, X , A)  DX  A

Fig. 2.3 Logic Circuit Diagram

Chapter 2 - Part 1 17
Basic identities of Boolean Algebra
 An algebraic structure defined on a set of at least two elements
together 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(YZ) 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

Chapter 2 - Part 1 18
Truth Table to Verify DeMorgan’s
Theorem

Extension of DeMorgan’s Theorem:

X1  X 2    X n  X 1 X 2  X n
Some Properties of Identities & the Algebra

 If the meaning is unambiguous, we leave out the symbol “·”

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

Chapter 2 - Part 1 20
Some Properties of Identities & the Algebra
(Continued)

 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?
Chapter 2 - Part 1 21
Boolean Operator Precedence
 The order of evaluation in a Boolean
expression is:
1. Parentheses
2. NOT
3. AND
4. OR
Example: F = A(B + C)(C + D)

Chapter 2 - Part 1 22
Boolean Algebraic Manipulation

F  XYZ  XYZ  XZ
 XY ( Z  Z )  XZ
 XY  XZ

Fig. 2-4

Chapter 2 - Part 1 23
Boolean Algebraic Manipulation
 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 ?
=

What is the duality?

Chapter 2 - Part 1 24
Example: Complementing Function

F1  XYZ  XY Z
F2  X (Y Z  YZ )

F1  ?
F2  ?

 By DeMorgan’s Theorem (Example 2-2)


 By duality (Example 2-3)

Chapter 2 - Part 1 25
2-3 Canonical Forms
 It is useful to specify Boolean functions in
a form that:
• Allows comparison for equality.
• Has a correspondence to the truth tables
 Canonical Forms in common usage:
• Sum of Minterms (SOM)
• Product of Maxterms (POM)

Chapter 2 - Part 1 26
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)
XY (X complemented, Y normal)
X Y (both complemented)
 Thus there are four minterms of two variables.
Chapter 2 - Part 1 27
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)
Chapter 2 - Part 1 28
Maxterms and Minterms
 Examples: Two variable minterms and
maxterms.
Index Minterm Maxterm
0 xy x+y
1 xy x+y
2 xy x+y
3 xy x+y
 The index above is important for describing
which variables in the terms are true and which
are complemented.
Chapter 2 - Part 1 29
Minterms for three variables

Chapter 2 - Part 1 30
Maxterms for three variables

Chapter 2 - Part 1 31
Minterm and Maxterm Relationship
 Review: DeMorgan's Theorem
x · y  x  y and x  y  x  y
 Two-variable example:
M2  x  y and m2  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:
Mi  mi and mi  Mi
Thus Mi is the complement of mi.

Chapter 2 - Part 1 32
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.
Chapter 2 - Part 1 33
Observations
 In the function tables:
• Each minterm has one and only one 1 present in the 2n terms (a minimum of
1s). All other entries are 0.
• 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:
• Sum of Minterms (SOM)
• Product of Maxterms (POM)
for stating any Boolean function.

Chapter 2 - Part 1 34
Conversion of Minterm and
Maxterm
F  XY Z  XYZ  XY Z  XYZ  m0  m2  m5  m7   m(0, 2, 5, 7)
F  XY Z  XYZ  XY Z  XYZ  m1  m3  m4  m6   m(1, 3, 4, 6)

Chapter 2 - Part 1 35
Conversion of Minterm and
Maxterm

F  m1  m3  m4  m6
 F  m1  m3  m4  m6  m1  m3  m4  m6

 F  M 1  M 3  M 4  M 6  ( X  Y  Z )( X  Y  Z )( X  Y  Z )( X  Y  Z )
  M (1, 3, 4, 6)

Chapter 2 - Part 1 36
Canonical Sum of Minterms
 Any Boolean function can be expressed as a
Sum of Minterms.
• For the function table, the minterms used are the
terms corresponding to the 1's
• 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

Chapter 2 - Part 1 37
Another SOM Example
Expand by using truth table

E  Y  XZ
According to truth table Table 2-8,

E  m(0,1,2,4,5)   M (???)

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

Fig. 2-5

 a two-level implementation/two-level circuit

Product-of-Sums (POS): F  X (Y  Z )( X  Y  Z )

What’s the implementation?


Chapter 2 - Part 1 40
Convert non-SOP expression to SOP
expression

F  AB  C ( D  E )  AB  CD  CE

 The decision whether to use a two-level or multiple-level


implementation is complex.
 no. of gates
No. of gate inputs
 amount of time delay

Chapter 2 - Part 1 41
Simplification of two-level implementation of
SOP expression
 The two implementations for F are shown
below – it is quite apparent which is simpler!

A
F
B
C

Chapter 2 - Part 1 42
SOP and POS Observations
 The previous examples show that:
• Canonical Forms (Sum-of-minterms, Product-of-
Maxterms), or other standard forms (SOP, POS)
differ in complexity
• Boolean algebra can be used to manipulate
equations into simpler forms.
• Simpler equations lead to simpler two-level
implementations
 Questions:
• How can we attain a “simplest” expression?
• Is there only one minimum cost circuit?
• The next part will deal with these issues.

Chapter 2 - Part 1 43

You might also like