Ch4 a
Ch4 a
EEE240
Dr. Sajid Sarwar
Chapter 4
Combinational Logic
1
Combinational Logic
Outline
Combinational Circuits
Analysis
Design
Binary Adder/Subtractor
Multiplier
Comparator
Encoder/Decoder
Multiplexers/Demultiplexers
2
Combinational Circuits
[Section 4.2]
Recall
Single/multiple inputs Single output
Many realistic problems use multiple outputs
Named as combinational circuits
Combinational circuit
Output depends only on input(s)
3
Combinational Circuits
What happens if we add memory to the circuit?
4
Combinational Circuit
Analysis [Section 4.3]
Determine the function of circuit
Instead of developing the circuit based on the function
Circuit analysis
Determine the output functions as algebraic expressions
Determine the truth table of the outputs
What is the output function of this circuit?
5
Combinational Circuit
Analysis
Analysis steps
1. Label all gate outputs with symbols
2. Determine Boolean function at the output of each gate
3. Express functions in terms of input variables + simplify
6
Combinational Circuit
Analysis
Substitution
T1 ( xy )
T2 ( xT1 )
T3 ( yT1 )
F (T2T3 ) (( xT1 )( yT1 ))
xT1 yT1 x( xy ) y ( xy )
x( x y) y ( x y)
xx xy xy yy
xy xy x y
7
Combinational Circuit Analysis:
Example
What are the outputs F1 and F2 of the following circuit?
Here
T2 = ABC
T1 = A+B+C
F2 = AB + AC + BC
T3 = F2’ T1
F1 = T 3 + T 2
8
Combinational Circuit Analysis:
Example
Analysis by truth table
T2 = ABC
T1 = A+B+C
F2 = AB + AC + BC
T3 = F2’ T1
F1 = T 3 + T 2
9
Combinational Circuit Design
Design procedure
[Section 4.4]
1.
2.
Determine the number of inputs and outputs
Assign symbols
3. Derive the truth table
4. Obtain simplified functions for each output
5. Draw the logic diagram
Issues to consider
Number of gates
Gate inputs
Propagation delay
Number of interconnections
10
Combinational Circuit Design:
Example
Design a circuit that converts a BCD number to Excess-3
code
11
Friday, June 27, 2025 12
Combinational Circuit Design:
Example
Step 3: Minimize output functions
13
Combinational Circuit Design:
Example
Step 4: Simplification
z = D’
y = CD+C’D’
= CD+(C+D)’
x = B’C+B’D+BC’D’
= B’(C+D)+BC’D’
= B’(C+D)+B(C+D)’
w = A+BC+BD
= A+B(C+D)
14
Binary Adder-Subtractor
[Section 4.5]
Addition is important function in computer system
Binary Adders
What does an adder do?
Add binary digits
Generate carry if necessary
Consider carry from previous computation
15
Binary Half Adder
Specification
Design a circuit that adds two bits and generates the sum and a carry
Input/Output
Two inputs: x, y
Two outputs: S (sum), C (carry)
Functionality
16
Binary Half Adder
17
Full Adder
Half adder works only for a single bit
When multiple bits are involved, carry bits should be considered
Solution Full adder
Specifications
A circuit that adds three bits and
generates a sum and a carry
Input/output
Three inputs: x, y, z
Two outputs: S (Sum), C (Carry)
Truth table
18
Full Adder
Derive and minimize Boolean expressions
19
Full Adder
Circuit
20
Full Adder from Half Adders
How can two half adders make a full adder?
Observations
Three inputs x, y, z can be added in two steps
x+y+z = (x+y) + z
What about the carry?
Carry can occur when adding x+y and when adding z
21
Full Adder
22
Full Adder from Half Adders
23
Binary n-bit Adder
How can we build an n-bit adder from full adders?
One adder for each bit (n total)
Connect carry to next adder’s input
Output: sequence of sums and a final carry
4-bit adder circuit (Ripple Carry Adder)
24
Ripple Carry Adder
25
Ripple Carry Adder
26
Ripple Carry Adder
27
Ripple Carry Adder
28
Ripple Carry Adder
29
Ripple Carry Adder
30
Ripple Carry Adder
31