Logic Design-Unit-II
Logic Design-Unit-II
Logic Design-Unit-II
UNIT-II
COMBINATIONAL CIRCUITS
▪ Sequential circuits
▪ whose outputs are depends not only on present inputs, but also on past inputs, and the
circuit behavior must be specified by a time sequence of inputs and internal states.
(outputs are a function of the inputs and the state of the memory elements)
▪ employ memory elements (binary cells) in addition to logic gates. The state of
memory elements, in turn, is a function of previous inputs.
▪ Ex: Flip-flops, registers, counters etc.
COMBINATIONAL CIRCUIT
▪ A combinational circuit consists of input variables, logic gates, and output variables.
▪ The logic gates accept signals from the inputs and generate signals to the outputs. This
process transforms binary information from the given input data to the required output data.
▪ For n input variables, there are 2n possible combinations of binary input values. For each
possible input combination, there is one and only one possible output combination.
▪ A combinational circuit can be described by m Boolean functions, one for each output
variable. Each output function is expressed in terms of the n input variables.
DESIGN PROCEDURE
The design of combinational circuits starts from the verbal outline of the problem
and ends in a logic circuit diagram, or a set of Boolean functions from which the
logic diagram can be easily obtained.
Steps in design procedure:
1. State the problem statement. Determine the number of input and required output
variables from given specifications. Assign the letter symbols to the input and output
variables.
2. Construct the truth table that defines the required relationships between inputs and
outputs.
3. Write the Boolean function for each output (sum-of-products (SOP) form) and Simplify
these Boolean functions if possible.
4. Implement the minimized/ simplified Boolean function for outputs using minimum
number of logic gates.
DESIGN PROCEDURE CONT…
2. Label the gates that are a function of input variables and previously labeled
gates with other arbitrary symbols. Find the Boolean functions for these
gates.
3. Repeat the process outlined in step 2 until the outputs of the circuit are
obtained.
▪ Addition and subtraction are the two most commonly used arithmetic operations.
Half adder
FULL ADDER
Step 4: Implementation in sum-of-products form
BINARY PARALLEL ADDER
▪ A binary parallel adder is a digital function that produces the arithmetic sum
of two binary numbers in parallel.
BINARY PARALLEL ADDER
▪ It consists of full-adders connected in cascade. with the output carry from one
full-adder connected to the input carry of the next full-adder.
▪ This causes a unstable factor on carry bit, and produces a longest propagation delay.
▪ The signal from Ci to the output carry Ci+1, propagates through an AND and OR gates, so, for
an n-bit adder, there are 2n gate levels for the carry to propagate from input to output.
CARRY LOOK AHEAD ADDER
▪ Because the propagation delay will affect the output signals on different
time, so the signals are given enough time to get the precise and stable
outputs.
▪ The most widely used technique employs the principle of carry look-ahead to
improve the speed of the algorithm.
Pi = Ai ⊕ Bi steady state value
Gi = AiBi steady state value
Output sum and carry
Si = Pi ⊕ Ci
Ci+1 = Gi + PiCi
Gi : carry generate Pi : carry propagate C0 = input carry
C1 = G0 + P0C0
C2 = G1 + P1C1 = G1 + P1G0 + P1P0C0
C3 = G2 + P2C2 = G2 + P2G1 + P2P1G0 + P2P1P0C0
Fig: Logic diagram of a look-ahead carry generator
Fig: 4-bit full-adders with carry look-ahead
HALF SUBTRACTOR
Step 1: Two binary inputs and two binary outputs. The input variables designate the
minuend (x) and subtrahend (y) bits; the output variables produce the difference (D) and
borrow (B).
Step 2: Truth table
Step 4:
Inputs Outputs
x y D B x 𝑆
0 0 0 0 y
0 1 1 1
1 0 1 0
B
1 1 0 0
Step 3: Boolean function for each output
𝑆 = 𝑥𝑦
ҧ + 𝑥 𝑦ത = 𝑥 ⊕ 𝑦
𝐵 = 𝑥𝑦 ҧ
FULL SUBTRACTOR
Step 1: Needs three binary inputs (x, y and z) and two binary outputs (D and B)
Step 2: Truth table
Step 3: Boolean function and its simplification for each
Inputs Outputs
x y z D B output
0 0 0 0 0 Sum: D = 𝑥ҧ 𝑦𝑧
ത + 𝑥𝑦
ҧ 𝑧ҧ + 𝑥𝑦ത 𝑧ҧ + 𝑥𝑦𝑧
0 0 1 1 1
0 1 0 1 1 𝑆 = 𝑥ҧ 𝑦𝑧
ത + 𝑦𝑧ҧ + 𝑥 𝑦ത𝑧ҧ + 𝑦𝑧 = 𝑥 ⊕ 𝑦 ⊕ 𝑧
0 1 1 0 1 Or 𝑆 = (𝑥 ⊕ 𝑦) ⊕ 𝑧
1 0 0 1 0 yz
Borrow: B = 𝑥ҧ 𝑦𝑧
ത + 𝑥𝑦
ҧ 𝑧ҧ + 𝑥𝑦𝑧
ҧ + 𝑥𝑦𝑧
1 0 1 0 0 x 00 01 11 10
1 1 0 0 0 𝐵 = 𝑥ҧ 𝑦 ⊕ 𝑧 + 𝑦𝑧 0 1 1 1
1 1 1 1 1
Or B = 𝑥 ⊕ 𝑦 𝑧 + 𝑥𝑦
ҧ 1 1
Or using K-map: B = 𝑥𝑦
ҧ + 𝑥𝑧
ҧ + 𝑦𝑧
FULL SUBTRACTOR
Step 5: Implementation with two half-subtractors and an OR gate
x
y
D
z
𝐵
BINARY SUBTRACTOR
▪ The subtraction of unsigned binary numbers can be done most conveniently by
means of complements.
▪ That is the subtraction A - B can be done by taking the 2’s complement of B and
adding it to A . The 2’s complement can be obtained by taking the 1’s complement
and adding 1 to the least significant pair of bits.
▪ The 1’s complement can be implemented with inverters, and a 1 can be added to the
sum through the input carry.
▪ The circuit for subtracting A - B consists of an adder with inverters placed between
each data input B and the corresponding input of the full adder. The input carry C0
must be equal to 1 when subtraction is performed. The operation thus performed
becomes A , plus the 1’s complement of B , plus 1. This is equal to A plus the 2’s
complement of B .
BINARY ADDER/SUBTRACTOR
When M = 0, we have 𝐵 ⊕ 0 = B. The full adders receive the value of B , the input
carry is 0, and the circuit performs A plus B . When M = 1, we have 𝐵 ⊕ 1 = 𝐵ത and
C0 = 1.
DECIMAL ADDER
▪ In digital system, the decimal number is represented in the form of binary coded
decimal (BCD).The ten digit (0-9) decimal numbers are represented by the binary
digits. The circuit which add the two BCD number is called BCD adder.
▪ When the binary sum is greater than 1001 or 9, we obtain a non-valid BCD
representation.
▪ The addition of 6 = (0110)2 to the binary sum converts it to the correct digit and
also produces a carry as required.
BCD ADDITION
▪ If four bit sum is less than or equal to zero, then correction is needed.
▪ If the four bit sum is greater than 9 or if carry is generated then add 0110.
Implementation:
▪ Logic circuit to detect sum greater than 9, and second 4 bit binary adder to
add 0110
BCD ADDER
4 5 7 6
01
Z4Z8
12 13 15 14
11 1 1 1 1
8 9 11 10
10 1 1
Z4Z2
IMPLEMENTATION OF BCD ADDER
▪ A decimal parallel
adder that adds n
decimal digits needs n
BCD adder stages.
I1
MUX
IN-1
Selection/control lines
TWO-TO-ONE-LINE MULTIPLEXER
The 2 × 1 MUX has two data input lines, one output Select line (S) Output (Y)
line, and one selection line S . 0 I0
When S = 0, I0 has a path to the output. When S = 1, I1
has a path to the output. 1 I1
𝑌 = 𝐼0 𝑆ҧ + 𝐼1 𝑆
The 4 × 1 MUX has four data input lines, one output line, and two selection line S0 and S1 .
𝑌 = 𝐼0 𝑆ഥ1 𝑆0 + 𝐼1 𝑆ഥ1 𝑆0 + 𝐼2 𝑆1 𝑆0 + 𝐼1 𝑆1 𝑆0
MUX WITH ENABLE INPUT
Another type of multiplexer has an additional input called an enable. The enable
signal E is connected to the each of the AND gates.
For positive logic if E = 0, Y= 0 independent of the gate inputs and if E = 1, then
the MUX functions as an ordinary multiplexer.
For negative logic if E = 0, then the MUX functions as an ordinary multiplexer and
if E=1, Y=0
Quad Two-input MUX (74ALS157/HC157
Eight-input MUX (74ALS157/HC157
LARGE SIZE MUX
The larger size multiplexers can be implemented using the smaller size multiplexers
If 2n input lines in the available MUX and 2m is the number of input lines in the
desired MUX then the number of required MUXs = 2m-n
Example: 8x1 MUX implementation using 4x1 MUX and 2x1 MUX
I0
I1 4x1
I2 MUX
I3 𝐸ത 𝑆1 𝑆0
𝑆2
𝑆1 I0 2x1
𝑆0 Y
I1 MUX
𝑆
I4 𝐸ത 𝑆1 𝑆0
I5 4x1 𝑆2
I6 MUX
I7
BOOLEAN FUNCTION IMPLEMENTATION USING MUX
Implementation table
Alternate Implementation for F(A,B,C) = Σ (1,3,5,6,)
EXAMPLE
O0
O1
.
1x2n
I .
De-MUX
.
.
𝑆𝑛−1 . . . 𝑆1 𝑆0 ON
1X4 DE-MUX
I
O0
Selection Outputs O1
lines
S1 S0 O0 O1 O 2 O3 O2
0 0 I 0 0 0
0 1 0 I 0 0
O3
1 0 0 0 I 0
1 1 0 0 0 I
S1 S0
Reference Text Book:
1. M. Morris Mano, “Digital Logic and Computer Design,” Pearson
Education Limited, 2016.
2. Charles H. Roth, “Fundamentals of Logic Design,” 7th Edition, Cengage
Learning, Inc., 2021
3. Neal S. Widmer, Gregory L. Moss , Digital Systems: Principles and
Applications, 12th Edition, Pearson Education Limited, 2018
Thank you