DSDV m2
DSDV m2
X
Sum S
Y
X Half S
Y Adder C-OUT C-out
X Y C-in S C-out 1
Y
0 0 0 0 0 S = X’Y’(C-in) + XY’(C-in)’ + XY’(C-in)’ + XY(C-in)
0 0 1 1 0 S = X Y (C-in)
0 1 0 1 0 Carry C-out X
0 1 1 0 1 XY
C-in 00 01 11 10
1 0 0 1 0 0 2 4
1 0 1 0 1 0 6
1 1 0 0 1 1 3 7 1 5
1 1 1 1 C-in
1 1 1 1 1
Y
S(X,Y, C-in) = S (1,2,4,7)
C-out = XY + X(C-in) + Y(C-in)
C-out(x, y, C-in) = S
(3,5,6,7)
Module2-Analysis and Design of Combinational Logic 6
Full Adder Circuit Using AND-
OR X’ X’Y’C-in
X Y’
X X’ C-in
X’
Y
X’YC-in’ Sum S
Y C-in’
Y Y’ X
Y
C-in C-in’ X
Y
C-in’ XYC-in
X Y X XY
Y
Full
C-out C-in X
XC-in
Adder C-out
C-in
Y
S
C-in YC-in
Y Sum S
X Y C-in
Full X XY
C-out C-in
Adder Y
X
XC-in C-out
S C-in
Y
C-in YC-in
S3 S2 S1 S0
Sum Output
X3 Y3 X2 Y2 X1 Y1 X0 Y0
S3 S2 S1 S0
Sum output
where Gi = Xi . Yi Pi
= Xi + Yi
• Two binary numbers are subtracted by subtracting each pair of bits together with borrowing, where
needed.
• Subtraction Example:
0 0 1 1 1 1 1
X 229 1 1 1 0 0 1 0 1 0 0 Borrow
Y - 46 - 0 0 1 0 1 1 1 0
183 1 0 1 1 0 1 1
1
D(X,Y) = S
Half Subtractor Truth Table (1,2) D = X’Y +
Inputs Outputs XY’ D = X Y
X Y D B-out
B-out(x, y, C-in) = S
0 0 0 0
0 1 1 1
(1) B-out = X’Y
1 0 1 0
1 1 0 0 X Difference
D
Y
X Half D
Y Subtractor B-OUT B-out
1 1 0 0 0 1 3 1 5
B-in
1 1 1 1 1 1 7
1 1 1
Y
D(X,Y, C-in) = S (1,2,4,7)
Bout(x, y, C-in) = S B-out = X’Y + X’(B-in) +
Y(B-in)
(1,2,3,7)
Module2-Analysis and Design of Combinational Logic 18
Full Subtractor Circuit Using AND-
OR X’ X’Y’B-in
X Y’
X X’ B-in
X’
Y
X’YB-in’ Difference D
Y B-in’
Y Y’ X
Y
B-in B-in’ X
Y
B-in’ XYB-in
X Y X’ X’Y
Y
Full
B-out B-in X’
X’B-in
Subtractor B-out
B-in
Y
D
B-in YB-in
X Y Y Difference D
B-in
Full
B-out B-in
Subtractor X’
X’Y
Y
D
X’
X’B-in
B-out
B-in
B-in YB-in
• By using n full subtractors and connecting them in series, creating a borrow ripple
subtractor:
• Each borrow out B-out from a full subtractor at position j is connected to the
borrow in B-in of the full subtracor at the higher position j+1.
X3 Y3 X2 Y2 X1 Y1 X0 Y0
B3 B2 B1
B4 B-out Full B-in B-out Full B-in B-out Full B-in B-out Full B-in B0 =0
Subtractor Subtractor Subtractor Subtractor
D3 D2 D1 D0
Difference output D
Y3 Y2 Y1 Y0
X3 X2 X1 X0
C4
4-bit
C-out C-in C0 = 1
Adder
S3 S2 S1 S0
D3 D2 D1 D0
Difference Output
• Enable inputs must be on for the decoder to function, otherwise its outputs assume a single “disabled”
output code word.
Decoder
Input
Code word
Output
Map code word
Enable
inputs
n n to 2n
2n
input : decode
: output
s r
s
F0
X Y
X 2-to-4 F1
Y Decoder F2
F3
E A B C O0 O1 O2 O3 O4 O5 O6 O7
0 X X X 0 0 0 0 0 0 0 0
O0 ABC
1 0 0 0 1 0 0 0 0 0 0 0
A S2 O1 ABC
O2 ABC 1 0 0 1 0 1 0 0 0 0 0 0
B S1 3:8 O3 ABC 1 0 1 0 0 0 1 0 0 0 0 0
C de O4 ABC
S0 1 0 1 1 0 0 0 1 0 0 0 0
c O5 ABC
O6 ABC 1 1 0 0 0 0 0 0 1 0 0 0
ABC 1 1 0 1 0 0 0 0 0 1 0 0
O7
1 1 1 0 0 0 0 0 0 0 1 0
1 1 1 1 0 0 0 0 0 0 0 1
Enb
2
8
3:8 Decoder
• The simplest encoder is a 2n-to-n binary encoder, where it has only one of 2n inputs = 1 and the output is
the n-bit binary number corresponding to the active input.
• For an 8-to-3 binay encoder with inputs I0-I7 the logic expressions of the outputs Y0-Y2 are:
Y0 = I1 + I3 + I5 + I7
Y1= I2 + I3 + I6 + I7
Binary
Y2 = I4 + I5 + I6 +I7 encoder
2n . . n
. . outputs
inputs . .
D0 1Y
Multiplexer
Enable EN
s bits
2Y
Select SEL
D1
Data
b bits output
. .
D0
b bits Y . .
D1 . .
bY
n Data . Dn-1
Sources .
b
bits Dn-1
SEL EN
select
I1 I1
Y Y
I2
I2
I3 I3
0 1 2
3
2-to-4
Decode
r
S1 S0 S1 S0
I0
S2 S1 S0
I1 4:
I2 Y
0 0 0 I0
1
MUX
I3 0 0 1 I1
2:1
0 1 0 I2
S1 S0 MUX Y 0 1 1 I3
I4 1 0 0 I4
I5 4:1 1 0 1 I5
I6 MUX 1 1 0 I6
S2
I7 1 1 1 I7
S1 S0
2X4
Select Decode
s bits Demux b bits lines r One of
Select four 1-bit
One of n b bits outputs
One of n outputs
Data
Data
Sources
Input
selected
. Input Enable
. data (1bit)
b
bits 1-bit 4-output demultiplexer using
a 2x4 binary decoder.
S1 S0
select
Y0 =
2x4
S1 Decode D.S1'.S0' Y1
S0 r
= D.S1'.S0 Y2
E = D.S1.S0'
Y3 = D.S1.S0
D
• For the special case when all the input fuses to a gate are kept
intact, a cross is placed inside the gate symbol.
Programmable Read-Only Memory (PROM)
PROM Structure
Logic Diagram
PROM Structure
PLD Notation
Example
Why is it called PROM?
Programmable Logic Array
Programmable Logic Array
Programmable Logic Array
PROM vs PLA
• PROM: realization of a set of Boolean functions is based on
minterm canonical expressions.
• No minimization necessary.
• PLA: the AND gates are capable of generating product terms that
are not necessarily minterms.
• Realization using PLA is based on sum-of-product expression that may not be
canonical.
• Logic designer is bounded by the number of product terms that are realizable
by the AND-array.
• Simplifications is necessary.
Logic Design Example
Logic Design Example
Additional Features
• For greater flexibility, PLAs make provision for either a true
output or a complemented output.
Example of Use of Complemented Functions
Example of Use of Complemented Functions
PLA Table
• A common way of specifying the connections in a PLA.
• 3 sections: input section, output section, T/C section.
• Each product term is assigned a row in the table.
• Input section indicates connections between inputs to AND-array.
• Output section indicates connections between outputs of AND-array
and inputs to the OR-array.
• T/C section indicates how the exclusive or gates are programmed.
• T—true output is used.
• C—output should be complemented.
Programmable Array Logic (PAL) Devices
• OR-array is fixed by the manufacturer of the device.
• PAL device is easier to program and less expensive than the PLA.
• Less flexible.
• Define priority encoder with three inputs with middle bit at highest priority encoding to 10 most
significant bit at next priority encoding to 11 and least significant at least priority encoding 01.
10M
• Define multiplexer and demultiplexer and draw block diagram. 04M
• Design 4:1 Multiplexer draw the circuit using gates. 06M
• Explain how will you implement the following function using implementation
table, F(A,B,C,D)=Σm(0,1,3,4,7,10,12,14) with A,B,C select lines. 10M
• Design Magnitude comparator .Design a two bit binary comparator and implement with suitable
logic gates. 08M
• Design a binary full adder using only two input NAND gates. Write its truth table. 06M
• Implement the following boolean function using 4:1 multiplexer
Y=f(A,B,C,D)=Σm(0,1,2,4,6,9,12,14) 06M