Digital Logic Design: Basics Combinational Circuits Sequential Circuits Pu-Jen Cheng
Digital Logic Design: Basics Combinational Circuits Sequential Circuits Pu-Jen Cheng
Digital Logic Design: Basics Combinational Circuits Sequential Circuits Pu-Jen Cheng
Basics
Combinational Circuits
Sequential Circuits
Pu-Jen Cheng
Output is always 0
{OR, NOT}
{NAND}
{NOR}
10-100 gates
100-10,000 gates
0 0 0 0
0 0 1 0
0 1 0 0
0 1 1 1
1 0 0 0
1 0 1 1
1 1 0 1
1 1 1 1
Logical Equivalence
All three circuits implement F = A B function
Logical Equivalence (cont.)
Proving logical equivalence of two circuits
Derive the logical expression for the output of each
circuit
Show that these two expressions are equivalent
Two ways:
variables
You can also use algebraic manipulation
Need Boolean identities
Logical Equivalence (cont.)
Derivation of logical expression from a circuit
Trace from the input to output
Write down intermediate logical expressions along the path
Logical Equivalence (cont.)
Proving logical equivalence: Truth table method
A B F1 = A B F3 = (A + B) (A + B) (A + B)
0 0 0 0
0 1 0 0
1 0 0 0
1 1 1 1
Boolean Algebra
Boolean Algebra (cont.)
Boolean Algebra (cont.)
Proving logical equivalence: Boolean algebra
method
To prove that two logical functions F1 and F2 are
equivalent
Start with one function and apply Boolean laws to
and when
Practice helps
Sometimes it may be convenient to reduce both
functions to the same expression
Example: F1= A B and F3 are equivalent
Logic Circuit Design Process
A simple logic design process involves
Problem specification
Truth table derivation
Derivation of logical expression
Simplification of logical expression
Implementation
Deriving Logical Expressions
Derivation of logical expressions from truth tables
sum-of-products (SOP) form
product-of-sums (POS) form
SOP form
Write an AND term for each input combination that
produces a 1 output
Write the variable if its value is 1; complement
otherwise
OR the AND terms to get the final expression
POS form
Dual of the SOP form
Deriving Logical Expressions (cont.)
3-input majority function SOP logical expression
A B C F Four product terms
Because there are 4 rows
0 0 0 0 with a 1 output
0 0 1 0
0 1 0 0
0 1 1 1 F=ABC+ABC+
1 0 0 0 ABC+ABC
1 0 1 1
1 1 0 1
1 1 1 1
Deriving Logical Expressions (cont.)
3-input majority function POS logical expression
A B C F Four sum terms
Because there are 4 rows
0 0 0 0 with a 0 output
0 0 1 0
0 1 0 0
0 1 1 1 F = (A + B + C) (A + B + C)
1 0 0 0 (A + B + C) (A + B + C)
1 0 1 1
1 1 0 1
1 1 1 1
Logical Expression Simplification
Two basic methods
Algebraic manipulation
Use Boolean laws to simplify the expression
Difficult to use
Don’t know if you have the simplified form
Karnaugh map (K-map) method
Graphical method
Easy to use
BC+AC+AB
AB+CD=AB+CD
Using de Morgan’s law
AB+CD=AB.CD
Can be generalized
Majority function
A B + B C + AC = A B . BC . AC
Idea: NAND Gates: Sum-of-Products, NOR Gates: Product-of-Sums
Implementation Using NAND Gates
(cont.)
Majority function
Introduction to Combinational Circuits
Combinational circuits
Output depends only on the current inputs
Combinational circuits provide a higher level of
abstraction
Help in reducing design complexity
Reduce chip count
We look at some useful combinational circuits
Multiplexers
Multiplexer
2n data inputs 4-data input MUX
n selection inputs
a single output
Selection input
determines the
input that should
be connected to
the output
Multiplexers (cont.)
4-data input MUX implementation
Multiplexers (cont.)
MUX implementations
Multiplexers (cont.)
(Full Adder)
Comparator
Used to implement comparison operators (= , > , < , , )
A=B: Ox = Ix (x=A<B, A=B, & A>B)
Comparator (cont.)
xn>yn x>y
xn=yn CMP x=y
xn<yn x<y
x y
Adders
Half-adder
Adds two bits
Produces a sum and carry
Internally uses
An AND array
An OR array
Programmable Logic Arrays (cont.)
A blank PLA with 2 inputs and 2 outputs
Programmable Logic Arrays (cont.)
Implementation examples
Programmable Logic Arrays (cont.)
Simplified notation
1-bit Arithmetic and Logic Unit
Preliminary ALU design
2’s complement
Required 1 is added via Cin
1-bit Arithmetic and Logic Unit
(cont.)
Final design
Arithmetic and Logic Unit (cont.)
16-bit ALU
Arithmetic and Logic Unit (cont’d)
4-bit ALU
Introduction to Sequential Circuits
Output depends on current as well as past inputs
Depends on the history
Have “memory” property
Sequential circuit consists of
Combinational circuit
Feedback circuit
Simple feedback
Uses flip flops
Introduction (cont.)
End of a cycle
levels
Timing information
Clock period, ON, and OFF periods
Propagation delay
Time required for the output to react to changes in the
inputs
Clock Signal (cont.)
Latches
Can remember a bit
Level-sensitive (not edge-sensitive)
Latches Flip-flops
74164 shift
Register chip
Memory Design with D Flip Flops
Require separate data in and out lines