SlideShare a Scribd company logo
June 23, 2003 ©2000-2003 Howard Huang 1
Basic circuit design and multiplexers
In the first three lectures we learned all the
fundamentals needed for making circuits.
— Truth tables and Boolean expressions
describe functions.
— Expressions can be converted to circuits.
— Boolean algebra and K-maps help simplify
expressions and circuits.
Today we’ll apply all of these foundations to
work with some larger circuits.
We’ll also begin introducing common circuits
that we’ll be using throughout the summer.
June 23, 2003 Basic circuit design and multiplexers 2
Designing circuits
The goal in circuit design is to build hardware that solves some problem.
The basic approach is to express the solution as a Boolean function, which
can then be converted to a circuit.
1. Figure out how many inputs and outputs you need.
2. Describe the function as a truth table or a Boolean expression.
3. Find a simplified Boolean expression for the function.
4. Build the circuit based on your simplified expression.
June 23, 2003 Basic circuit design and multiplexers 3
Example: comparing 2-bit numbers
Let’s design a circuit that compares two 2-bit numbers, A and B. There
are three possible results: A > B, A = B or A < B.
We will represent the results using three separate outputs.
— G (“Greater”) should be 1 only when A > B.
— E (“Equal”) should be 1 only when A = B.
— L (“Lesser”) should be 1 only when A < B.
Make sure you understand the problem!
— Inputs A and B will be 00, 01, 10, or 11 (0, 1, 2 or 3 in decimal).
— For any inputs A and B, exactly one of the three outputs will be 1.
June 23, 2003 Basic circuit design and multiplexers 4
Step 1: How many inputs and outputs?
How many inputs and outputs will this circuit have?
— Two 2-bit numbers means a total of four inputs. Let’s say the first
number consists of bits called A1 and A0 (from left to right), while
second number has bits B1 and B0.
— The problem specifies three outputs: G, E and L.
Here is a block diagram that shows the inputs and outputs explicitly.
This is like a function header or prototype in programs, which lists the
inputs and outputs of a function.
Now the hard part is to design the circuitry that goes inside the box.
June 23, 2003 Basic circuit design and multiplexers 5
Step 2: Functional specification
For this problem, it’s probably easiest
to start with a truth table. This way we
can explicitly show the relationship (>,
=, <) between the inputs.
A four-input function has a sixteen-row
truth table. For convenience, the rows
are in binary numeric order from 0000
to 1111 for A1, A0, B1 and B0.
For example, 01 < 10, so the sixth row
of the truth table (corresponding to
inputs A=01 and B=10) shows that
output L=1, while G and E are both 0.
0101111
0010111
0011011
0010011
1001101
0100101
0011001
0010001
1001110
1000110
0101010
0010010
1001100
1000100
1001000
0100000
LEGB0B1A0A1
June 23, 2003 Basic circuit design and multiplexers 6
Step 3: Simplified Boolean expressions
Let’s use K-maps to simplify our circuit. There are three functions (each
with the same inputs A1 A0 B1 B0), so we need three K-maps.
B0
0011
1011
A1
A0
0001
0000
B1
B0
0100
0000
A1
A0
1100
1110
B1
B0
1000
0100
A1
A0
0010
0001
B1
G(A1,A0,B1,B0) =
A1 A0 B0’ +
A0 B1’B0’ +
A1 B1’
E(A1,A0,B1,B0) =
A1’A0’B1’B0’ +
A1’A0 B1’B0 +
A1 A0 B1 B0 +
A1 A0’B1 B0’
L(A1,A0,B1,B0) =
A1’A0’B0 +
A0’B1 B0 +
A1’B1
June 23, 2003 Basic circuit design and multiplexers 7
Step 4: Drawing the circuits
G = A1 A0 B0’ + A0 B1’B0’ + A1 B1’
E = A1’A0’B1’B0’ + A1’A0 B1’B0 + A1 A0 B1 B0 + A1 A0’B1 B0’
L = A1’A0’B0 + A0’B1 B0 + A1’B1
LogicWorks has gates
with inverted inputs
(the small bubbles) for
clearer diagrams.
June 23, 2003 Basic circuit design and multiplexers 8
Testing this in LogicWorks
In LogicWorks, binary switches provide inputs to your circuit, and binary
probes display the outputs.
switches
probe
June 23, 2003 Basic circuit design and multiplexers 9
Circuit design issues
We had to find a suitable data representation for the inputs and outputs.
— The inputs were just two-bit binary numbers.
— We used three outputs, one for each possibility of the numbers being
greater than, equal to, or less than each other. This is called a “one
out of three” code.
K-maps have advantages but also limitations.
— Our circuits are relatively simple two-level implementations.
— But E(A1,A0,B1,B0) couldn’t be simplified at all via K-maps. Could we
do better using Boolean algebra?
Our circuit isn’t very extensible.
— We used a brute-force approach, listing all inputs and outputs. This
makes it hard to extend our circuit to compare larger numbers.
— We’ll have a better solution after we talk about computer arithmetic.
There are always many possible ways to design a circuit!
June 23, 2003 Basic circuit design and multiplexers 10
Multiplexers
Let’s think about building another circuit, a multiplexer.
In the old days, several machines could share an I/O device with a switch.
The switch allows one computer’s output to go to the printer’s input.
June 23, 2003 Basic circuit design and multiplexers 11
A 2-to-1 multiplexer
Here is the circuit analog of that printer switch.
This is a 2-to-1 multiplexer, or mux.
— There are two data inputs D0 and D1, and a select input called S.
— There is one output named Q.
The multiplexer routes one of its data inputs (D0 or D1) to the output Q,
based on the value of S.
— If S=0, the output will be D0.
— If S=1, the output will be D1.
June 23, 2003 Basic circuit design and multiplexers 12
Building a multiplexer
Here is a truth table for the multiplexer, based on
our description from the previous page:
The multiplexer routes one of its data
inputs (D0 or D1) to the output Q, based
on the value of S.
— If S=0, the output will be D0.
— If S=1, the output will be D1.
You can then find an MSP for the mux output Q.
Q = S’D0 + S D1
Note that this corresponds closely to our English
specification above—sometimes you can derive an
expression without first making a truth table.
1111
1011
0101
0001
1110
0010
1100
0000
QD0D1S
June 23, 2003 Basic circuit design and multiplexers 13
Multiplexer circuit diagram
Here is an implementation of a 2-to-1 multiplexer.
Remember that a minimal sum of products expression leads to a minimal
two-level circuit.
Q = S’D0 + S D1
June 23, 2003 Basic circuit design and multiplexers 14
Blocks, abstraction and modularity
Multiplexers are common enough that we often want to treat them as
abstract units or black boxes, as symbolized by our block diagrams.
— Block symbols make circuit diagrams simpler, by hiding the internal
implementation details. You can use a device without knowing how
it’s designed, as long as you know what it does.
— Different multiplexer implementations should be interchangeable.
— Circuit blocks also aid hardware re-use, since you don’t have to keep
building a multiplexer from scratch every time you need one.
These blocks are similar to functions in programming languages!
June 23, 2003 Basic circuit design and multiplexers 15
Enable inputs
Many devices have an additional enable input,
which “activates” or “deactivates” the device.
We could design a 2-to-1 multiplexer with an
enable input that’s used as follows.
— EN=0 disables the multiplexer, which forces
the output to be 0. (It does not turn off the
multiplexer.)
— EN=1 enables the multiplexer, and it works
as specified earlier.
Enable inputs are especially useful in combining
smaller muxes together to make larger ones, as
we’ll see later today.
11111
10111
01011
00011
11101
00101
11001
00001
01110
00110
01010
00010
01100
00100
01000
00000
QD0D1SEN
June 23, 2003 Basic circuit design and multiplexers 16
Truth table abbreviations
Notice that when EN=0, then Q is always 0,
regardless of what S, D1 and D0 are set to.
We can shorten the truth table by including Xs
in the input variable columns, as shown on the
bottom right.
11111
10111
01011
00011
11101
00101
11001
00001
01110
00110
01010
00010
01100
00100
01000
00000
QD0D1SEN
11111
10111
01011
00011
11101
00101
11001
00001
0xxx0
QD0D1SEN
June 23, 2003 Basic circuit design and multiplexers 17
Another abbr. 4 U
Also, when EN=1 notice that if S=0 then Q=D0, but if S=1 then Q=D1.
Another way to abbreviate a truth table is to list input variables in the
output columns, as shown on the right.
This final version of the 2-to-1 multiplexer truth table is much clearer,
and matches the equation Q = S’D0 + S D1 very closely.
11111
10111
01011
00011
11101
00101
11001
00001
0xxx0
QD0D1SEN
D111
D001
0x0
QSEN
June 23, 2003 Basic circuit design and multiplexers 18
A KVM switch
This KVM switch allows four computers to share a single keyboard, video
monitor, and mouse.
June 23, 2003 Basic circuit design and multiplexers 19
A 4-to-1 multiplexer
Here is a block diagram and abbreviated truth table for a 4-to-1 mux,
which directs one of four different inputs to the single output line.
— There are four data inputs, so we need two bits, S1 and S0, for the
mux selection input.
— LogicWorks multiplexers have active-low enable inputs, so the mux
always outputs 1 when EN’ = 1. This is denoted on the block symbol
with a bubble in front of EN.
1xx1
D3110
D2010
D1100
D0000
QS0S1EN’
Q = S1’S0’D0 + S1’S0 D1 + S1 S0’D2 + S1 S0 D3
June 23, 2003 Basic circuit design and multiplexers 20
A 4-to-1 multiplexer implementation
Again we have a minimal sum of products expression, which leads to a
minimal two-level circuit implementation.
Q = S1’S0’D0 + S1’S0 D1 + S1 S0’D2 + S1 S0 D3
June 23, 2003 Basic circuit design and multiplexers 21
2n
-to-1 multiplexers
You can make even larger multiplexers, following the same pattern.
A 2n
-to-1 multiplexer routes one of 2n
input lines to the output line.
— There are 2n
data inputs, so there must also be n select inputs.
— The output is a single bit.
Here is an 8-to-1 multiplexer, probably the biggest we’ll see in this class.
June 23, 2003 Basic circuit design and multiplexers 22
Example: addition
Multiplexers can sometimes make circuit design easier.
As an example, let’s make a circuit to add three 1-bit inputs X, Y and Z.
We’ll need two bits to represent the total.
— The bits will be called C and S, standing for “carry” and “sum.”
— These are two separate functions of the inputs X, Y and Z.
A truth table and sum of minterm equations for C and S are shown below.
1
1
1
0
1
0
0
0
C
1111
0011
0101
1001
0110
1010
1100
0000
SZYX
C(X,Y,Z) = Σm(3,5,6,7)
S(X,Y,Z) = Σm(1,2,4,7)0 + 1 + 1 = 10
1 + 1 + 1 = 11
June 23, 2003 Basic circuit design and multiplexers 23
Implementing functions with multiplexers
We could implement a function of n variables with an n-to-1 multiplexer.
— The mux select inputs correspond to the function’s input variables,
and are used to select one row of the truth table.
— Each mux data input corresponds to one output from the truth table.
We connect 1 to data input Di for each function minterm mi, and we
connect 0 to the other data inputs.
For example, here is the carry function, C(X,Y,Z) = Σm(3,5,6,7).
1111
1011
1101
0001
1110
0010
0100
0000
CZYX
June 23, 2003 Basic circuit design and multiplexers 24
Partitioning the truth table
We can actually implement C(X,Y,Z) = Σm(3,5,6,7)
with just a 4-to-1 mux, instead of an 8-to-1.
— Instead of using three variables to select one row
of the truth table, we’ll use two variables to pick
a pair of rows in the table.
— The multiplexer data inputs will be functions of
the remaining variable, which distinguish between
the rows in each pair.
First, we can divide the rows of our truth table into
pairs, as shown on the right. X and Y are constant
within each pair of rows, so C is a function of Z only.
— When XY=00, C=0
— When XY=01, C=Z
— When XY=10, C=Z
— When XY=11, C=1
1111
1011
1101
0001
1110
0010
0100
0000
CZYX
June 23, 2003 Basic circuit design and multiplexers 25
A more efficient adder
All that’s left is setting the multiplexer inputs.
— The two input variables X and Y will be connected to select inputs S1
and S0 of our 4-to-1 multiplexer.
— The expressions for C(Z) are then connected to the data inputs D0-D3
of the multiplexer.
1111
1011
1101
0001
1110
0010
0100
0000
CZYX
When XY=00, C=0
When XY=01, C=Z
When XY=10, C=Z
When XY=11, C=1
June 23, 2003 Basic circuit design and multiplexers 26
Verifying our adder
Don’t believe that this works? Start with the equation
for a 4-to-1 multiplexer from earlier in the lecture.
Q = S1’S0’D0 + S1’S0 D1 + S1 S0’D2 + S1 S0 D3
Then just plug in the actual inputs to our circuit, as
shown again on the right: S1S0 = XY, D3 = 1, D2 = Z,
D1 = Z, and D0 = 0.
C = X’Y’•0 + X’YZ + XY’Z + XY•1
= X’YZ + XY’Z + XY
= X’YZ + XY’Z + XY(Z’ + Z)
= X’YZ + XY’Z + XYZ’ + XYZ
So the multiplexer output really is the carry function,
C(X,Y,Z) = Σm(3,5,6,7).
June 23, 2003 Basic circuit design and multiplexers 27
Multiplexer-based sum
Here’s the same thing for the sum function, S(X,Y,Z) = Σm(1,2,4,7).
Again, we can show that this is a correct implementation.
Q = S1’S0’D0 + S1’S0 D1 + S1 S0’D2 + S1 S0 D3
= X’Y’Z + X’YZ’ + XY’Z’ + XYZ
= Σm(1,2,4,7)
When XY=00, S=Z
When XY=01, S=Z’
When XY=10, S=Z’
When XY=11, S=Z
1111
0011
0101
1001
0110
1010
1100
0000
SZYX
June 23, 2003 Basic circuit design and multiplexers 28
Dual multiplexers
A dual 4-to-1 mux allows you to select from one of four 2-bit data inputs.
The Mux-4×2 T.S. device in LogicWorks is shown here.
— The two output bits are 2Q 1Q, and S1-S0 select a pair of inputs.
— LogicWorks labels the x-th bit of data input y as xDy.
11xx1
0
0
0
0
EN’
1D32D311
1D22D201
1D12D110
1D02D000
1Q2QS0S1
June 23, 2003 Basic circuit design and multiplexers 29
Dual muxes in more detail
You could build a dual 4-to-1 mux from
its truth table and our familiar circuit
design techniques.
It’s also possible to combine smaller
muxes together to form larger ones.
You can build the dual 4-to-1 mux just
by using two 4-to-1 muxes.
— The two 4-to-1 multiplexers share
the same EN’, S1 and S0 signals.
— Each smaller mux produces one bit
of the two-bit output 2Q 1Q.
This kind of hierarchical design is very
common in computer architecture.
June 23, 2003 Basic circuit design and multiplexers 30
Dual multiplexer-based adder
We can use this dual 4-to-1 multiplexer to implement our adder, which
produces a two-bit output consisting of C and S.
That KVM switch from earlier is really a “tri 4-to-1 multiplexer,” since it
selects from four sets of three signals (keyboard, video and mouse).
June 23, 2003 Basic circuit design and multiplexers 31
Summary
Today we began designing circuits!
— Starting from a problem description, we came up with a truth table
to show all possible inputs and outputs.
— Then we built the circuit using primitive gates or multiplexers.
A 2n
-to-1 multiplexer routes one of 2n
inputs to a single output line.
— Muxes are a good example of our circuit design techniques.
— They also illustrate abstraction and modularity in hardware design.
— We saw some variations such as active-low and dual multiplexers.
Tomorrow we’ll present another commonly-used device and show how it
can also be used in larger circuits.

More Related Content

What's hot

Unit 3 combinational circuits
Unit 3  combinational circuitsUnit 3  combinational circuits
Unit 3 combinational circuits
AmrutaMehata
 
Logic Design
Logic DesignLogic Design
Logic Design
Partha_bappa
 
2-bit comparator
2-bit comparator2-bit comparator
2-bit comparator
إسلام عادل
 
Ch1 2
Ch1 2Ch1 2
Ch1 2
rohity7
 
Chapter 3: Simplification of Boolean Function
Chapter 3: Simplification of Boolean FunctionChapter 3: Simplification of Boolean Function
Chapter 3: Simplification of Boolean Function
Er. Nawaraj Bhandari
 
FYBSC IT Digital Electronics Unit III Chapter I Combinational Logic Circuits
FYBSC IT Digital Electronics Unit III Chapter I Combinational Logic CircuitsFYBSC IT Digital Electronics Unit III Chapter I Combinational Logic Circuits
FYBSC IT Digital Electronics Unit III Chapter I Combinational Logic Circuits
Arti Parab Academics
 
Digital Logic & Design
Digital Logic & DesignDigital Logic & Design
Digital Logic & Design
Rokonuzzaman Rony
 
C211324
C211324C211324
Digital logic design part1
Digital logic design part1Digital logic design part1
Digital logic design part1
Vaagdevi College of Engineering
 
Chapter 5: Cominational Logic with MSI and LSI
Chapter 5: Cominational Logic with MSI and LSIChapter 5: Cominational Logic with MSI and LSI
Chapter 5: Cominational Logic with MSI and LSI
Er. Nawaraj Bhandari
 
combinational_circuits
combinational_circuitscombinational_circuits
combinational_circuits
Bindu Madhavi
 
Digital Logic Design
Digital Logic Design Digital Logic Design
Digital Logic Design
Vaagdevi College of Engineering
 
FYBSC IT Digital Electronics Unit IV Chapter I Multiplexer, Demultiplexer, AL...
FYBSC IT Digital Electronics Unit IV Chapter I Multiplexer, Demultiplexer, AL...FYBSC IT Digital Electronics Unit IV Chapter I Multiplexer, Demultiplexer, AL...
FYBSC IT Digital Electronics Unit IV Chapter I Multiplexer, Demultiplexer, AL...
Arti Parab Academics
 
Combinational circuits
Combinational circuitsCombinational circuits
Combinational circuits
Jamnas Mundakkutty A
 
International Journal of Computational Engineering Research(IJCER)
International Journal of Computational Engineering Research(IJCER)International Journal of Computational Engineering Research(IJCER)
International Journal of Computational Engineering Research(IJCER)
ijceronline
 
Digital electronics nandhini kusuma
Digital electronics nandhini kusumaDigital electronics nandhini kusuma
Digital electronics nandhini kusuma
kusuma11
 
Introduction to digital logic
Introduction to digital logicIntroduction to digital logic
Introduction to digital logic
Kamal Acharya
 
Digital Logic & Design (DLD) presentation
Digital Logic & Design (DLD) presentationDigital Logic & Design (DLD) presentation
Digital Logic & Design (DLD) presentation
foyez ahammad
 

What's hot (18)

Unit 3 combinational circuits
Unit 3  combinational circuitsUnit 3  combinational circuits
Unit 3 combinational circuits
 
Logic Design
Logic DesignLogic Design
Logic Design
 
2-bit comparator
2-bit comparator2-bit comparator
2-bit comparator
 
Ch1 2
Ch1 2Ch1 2
Ch1 2
 
Chapter 3: Simplification of Boolean Function
Chapter 3: Simplification of Boolean FunctionChapter 3: Simplification of Boolean Function
Chapter 3: Simplification of Boolean Function
 
FYBSC IT Digital Electronics Unit III Chapter I Combinational Logic Circuits
FYBSC IT Digital Electronics Unit III Chapter I Combinational Logic CircuitsFYBSC IT Digital Electronics Unit III Chapter I Combinational Logic Circuits
FYBSC IT Digital Electronics Unit III Chapter I Combinational Logic Circuits
 
Digital Logic & Design
Digital Logic & DesignDigital Logic & Design
Digital Logic & Design
 
C211324
C211324C211324
C211324
 
Digital logic design part1
Digital logic design part1Digital logic design part1
Digital logic design part1
 
Chapter 5: Cominational Logic with MSI and LSI
Chapter 5: Cominational Logic with MSI and LSIChapter 5: Cominational Logic with MSI and LSI
Chapter 5: Cominational Logic with MSI and LSI
 
combinational_circuits
combinational_circuitscombinational_circuits
combinational_circuits
 
Digital Logic Design
Digital Logic Design Digital Logic Design
Digital Logic Design
 
FYBSC IT Digital Electronics Unit IV Chapter I Multiplexer, Demultiplexer, AL...
FYBSC IT Digital Electronics Unit IV Chapter I Multiplexer, Demultiplexer, AL...FYBSC IT Digital Electronics Unit IV Chapter I Multiplexer, Demultiplexer, AL...
FYBSC IT Digital Electronics Unit IV Chapter I Multiplexer, Demultiplexer, AL...
 
Combinational circuits
Combinational circuitsCombinational circuits
Combinational circuits
 
International Journal of Computational Engineering Research(IJCER)
International Journal of Computational Engineering Research(IJCER)International Journal of Computational Engineering Research(IJCER)
International Journal of Computational Engineering Research(IJCER)
 
Digital electronics nandhini kusuma
Digital electronics nandhini kusumaDigital electronics nandhini kusuma
Digital electronics nandhini kusuma
 
Introduction to digital logic
Introduction to digital logicIntroduction to digital logic
Introduction to digital logic
 
Digital Logic & Design (DLD) presentation
Digital Logic & Design (DLD) presentationDigital Logic & Design (DLD) presentation
Digital Logic & Design (DLD) presentation
 

Viewers also liked

Multiplexers
MultiplexersMultiplexers
Multiplexers
Mian Majid
 
Multiplexer & de multiplexer
Multiplexer & de multiplexerMultiplexer & de multiplexer
Multiplexer & de multiplexer
vishalgohel12195
 
multiplexer and d-multiplexer
multiplexer and d-multiplexermultiplexer and d-multiplexer
multiplexer and d-multiplexer
malikwaqar75033149
 
Wireless networking_ASRao
Wireless networking_ASRaoWireless networking_ASRao
introduction to ss7 network
introduction to ss7 networkintroduction to ss7 network
introduction to ss7 network
Mohmmad Azam
 
Digital logic circuit
Digital logic circuit Digital logic circuit
Digital logic circuit
Prabhu R
 
A report on 2 to 1 mux using tg
A report on 2 to 1 mux using tgA report on 2 to 1 mux using tg
A report on 2 to 1 mux using tg
vijay rastogi
 
Wireless Networking
Wireless NetworkingWireless Networking
Wireless Networking
ruledbyrobotics2080
 
Broadband technology used in bsnl
Broadband technology used in bsnlBroadband technology used in bsnl
Broadband technology used in bsnl
Syed Arfat Ahmad
 
Communication & network devices
Communication & network devicesCommunication & network devices
Communication & network devices
Harman Grewal
 
Logic gates
Logic gatesLogic gates
Multiplexers & Demultiplexers
Multiplexers & DemultiplexersMultiplexers & Demultiplexers
Multiplexers & Demultiplexers
Jayanshu Gundaniya
 
Digital logic circuits important question and answers for 5 units
Digital logic circuits important question and answers for 5 unitsDigital logic circuits important question and answers for 5 units
Digital logic circuits important question and answers for 5 units
Lekashri Subramanian
 
multiplexer 4 input
multiplexer 4 inputmultiplexer 4 input
multiplexer 4 input
Ankit Mistry
 
4g wireless final ppt
4g wireless  final ppt4g wireless  final ppt
4g wireless final ppt
Shelly
 

Viewers also liked (15)

Multiplexers
MultiplexersMultiplexers
Multiplexers
 
Multiplexer & de multiplexer
Multiplexer & de multiplexerMultiplexer & de multiplexer
Multiplexer & de multiplexer
 
multiplexer and d-multiplexer
multiplexer and d-multiplexermultiplexer and d-multiplexer
multiplexer and d-multiplexer
 
Wireless networking_ASRao
Wireless networking_ASRaoWireless networking_ASRao
Wireless networking_ASRao
 
introduction to ss7 network
introduction to ss7 networkintroduction to ss7 network
introduction to ss7 network
 
Digital logic circuit
Digital logic circuit Digital logic circuit
Digital logic circuit
 
A report on 2 to 1 mux using tg
A report on 2 to 1 mux using tgA report on 2 to 1 mux using tg
A report on 2 to 1 mux using tg
 
Wireless Networking
Wireless NetworkingWireless Networking
Wireless Networking
 
Broadband technology used in bsnl
Broadband technology used in bsnlBroadband technology used in bsnl
Broadband technology used in bsnl
 
Communication & network devices
Communication & network devicesCommunication & network devices
Communication & network devices
 
Logic gates
Logic gatesLogic gates
Logic gates
 
Multiplexers & Demultiplexers
Multiplexers & DemultiplexersMultiplexers & Demultiplexers
Multiplexers & Demultiplexers
 
Digital logic circuits important question and answers for 5 units
Digital logic circuits important question and answers for 5 unitsDigital logic circuits important question and answers for 5 units
Digital logic circuits important question and answers for 5 units
 
multiplexer 4 input
multiplexer 4 inputmultiplexer 4 input
multiplexer 4 input
 
4g wireless final ppt
4g wireless  final ppt4g wireless  final ppt
4g wireless final ppt
 

Similar to Amit vish

Digital Electronics (EC8392) UNIT-II -PPT-S.SESHA VIDHYA/ ASP/ECE
Digital Electronics (EC8392) UNIT-II -PPT-S.SESHA VIDHYA/ ASP/ECEDigital Electronics (EC8392) UNIT-II -PPT-S.SESHA VIDHYA/ ASP/ECE
Digital Electronics (EC8392) UNIT-II -PPT-S.SESHA VIDHYA/ ASP/ECE
SeshaVidhyaS
 
07Decoders121
07Decoders12107Decoders121
07Decoders121
Tatyana Remayeva
 
Ceng232 Decoder Multiplexer Adder
Ceng232 Decoder Multiplexer AdderCeng232 Decoder Multiplexer Adder
Ceng232 Decoder Multiplexer Adder
gueste731a4
 
Bt0064 logic design1
Bt0064 logic design1Bt0064 logic design1
Bt0064 logic design1
Techglyphs
 
SESSION 2.ppt
SESSION 2.pptSESSION 2.ppt
SESSION 2.ppt
Saranya S
 
Combinational and sequential logic
Combinational and sequential logicCombinational and sequential logic
Combinational and sequential logic
Deepak John
 
Digital 4-bit Comprator
Digital 4-bit CompratorDigital 4-bit Comprator
Digital 4-bit Comprator
Soudip Sinha Roy
 
Chapter-04.pdf
Chapter-04.pdfChapter-04.pdf
Chapter-04.pdf
ssuserf7cd2b
 
f37-book-intarch-pres-pt1.ppt
f37-book-intarch-pres-pt1.pptf37-book-intarch-pres-pt1.ppt
f37-book-intarch-pres-pt1.ppt
rickjones250264
 
f37-book-intarch-pres-pt1.ppt
f37-book-intarch-pres-pt1.pptf37-book-intarch-pres-pt1.ppt
f37-book-intarch-pres-pt1.ppt
Timothy Paul
 
f37-book-intarch-pres-pt1.ppt
f37-book-intarch-pres-pt1.pptf37-book-intarch-pres-pt1.ppt
f37-book-intarch-pres-pt1.ppt
srinivasaperumalsamy
 
B sc3 unit 4 combi..lckt
B sc3 unit 4 combi..lcktB sc3 unit 4 combi..lckt
B sc3 unit 4 combi..lckt
MahiboobAliMulla
 
Digital electronics Multiplexers & Demultiplexers
Digital electronics Multiplexers & DemultiplexersDigital electronics Multiplexers & Demultiplexers
Digital electronics Multiplexers & Demultiplexers
Sweta Kumari Barnwal
 
Digital electronics nandhini kusuma
Digital electronics nandhini kusumaDigital electronics nandhini kusuma
Digital electronics nandhini kusuma
kusuma11
 
Digital electronics nandhini kusuma
Digital electronics nandhini kusumaDigital electronics nandhini kusuma
Digital electronics nandhini kusuma
kusuma11
 
logic gates By ZAK
logic gates By ZAKlogic gates By ZAK
logic gates By ZAK
Tabsheer Hasan
 
Computer Organization And Architecture lab manual
Computer Organization And Architecture lab manualComputer Organization And Architecture lab manual
Computer Organization And Architecture lab manual
Nitesh Dubey
 
DLD Lecture No 18 Analysis and Design of Combinational Circuit.pptx
DLD Lecture No 18 Analysis and Design of Combinational Circuit.pptxDLD Lecture No 18 Analysis and Design of Combinational Circuit.pptx
DLD Lecture No 18 Analysis and Design of Combinational Circuit.pptx
SaveraAyub2
 
STLD-Combinational logic design
STLD-Combinational  logic design STLD-Combinational  logic design
STLD-Combinational logic design
Abhinay Potlabathini
 
Switching theory unit 2
Switching theory unit 2Switching theory unit 2
Switching theory unit 2
SURBHI SAROHA
 

Similar to Amit vish (20)

Digital Electronics (EC8392) UNIT-II -PPT-S.SESHA VIDHYA/ ASP/ECE
Digital Electronics (EC8392) UNIT-II -PPT-S.SESHA VIDHYA/ ASP/ECEDigital Electronics (EC8392) UNIT-II -PPT-S.SESHA VIDHYA/ ASP/ECE
Digital Electronics (EC8392) UNIT-II -PPT-S.SESHA VIDHYA/ ASP/ECE
 
07Decoders121
07Decoders12107Decoders121
07Decoders121
 
Ceng232 Decoder Multiplexer Adder
Ceng232 Decoder Multiplexer AdderCeng232 Decoder Multiplexer Adder
Ceng232 Decoder Multiplexer Adder
 
Bt0064 logic design1
Bt0064 logic design1Bt0064 logic design1
Bt0064 logic design1
 
SESSION 2.ppt
SESSION 2.pptSESSION 2.ppt
SESSION 2.ppt
 
Combinational and sequential logic
Combinational and sequential logicCombinational and sequential logic
Combinational and sequential logic
 
Digital 4-bit Comprator
Digital 4-bit CompratorDigital 4-bit Comprator
Digital 4-bit Comprator
 
Chapter-04.pdf
Chapter-04.pdfChapter-04.pdf
Chapter-04.pdf
 
f37-book-intarch-pres-pt1.ppt
f37-book-intarch-pres-pt1.pptf37-book-intarch-pres-pt1.ppt
f37-book-intarch-pres-pt1.ppt
 
f37-book-intarch-pres-pt1.ppt
f37-book-intarch-pres-pt1.pptf37-book-intarch-pres-pt1.ppt
f37-book-intarch-pres-pt1.ppt
 
f37-book-intarch-pres-pt1.ppt
f37-book-intarch-pres-pt1.pptf37-book-intarch-pres-pt1.ppt
f37-book-intarch-pres-pt1.ppt
 
B sc3 unit 4 combi..lckt
B sc3 unit 4 combi..lcktB sc3 unit 4 combi..lckt
B sc3 unit 4 combi..lckt
 
Digital electronics Multiplexers & Demultiplexers
Digital electronics Multiplexers & DemultiplexersDigital electronics Multiplexers & Demultiplexers
Digital electronics Multiplexers & Demultiplexers
 
Digital electronics nandhini kusuma
Digital electronics nandhini kusumaDigital electronics nandhini kusuma
Digital electronics nandhini kusuma
 
Digital electronics nandhini kusuma
Digital electronics nandhini kusumaDigital electronics nandhini kusuma
Digital electronics nandhini kusuma
 
logic gates By ZAK
logic gates By ZAKlogic gates By ZAK
logic gates By ZAK
 
Computer Organization And Architecture lab manual
Computer Organization And Architecture lab manualComputer Organization And Architecture lab manual
Computer Organization And Architecture lab manual
 
DLD Lecture No 18 Analysis and Design of Combinational Circuit.pptx
DLD Lecture No 18 Analysis and Design of Combinational Circuit.pptxDLD Lecture No 18 Analysis and Design of Combinational Circuit.pptx
DLD Lecture No 18 Analysis and Design of Combinational Circuit.pptx
 
STLD-Combinational logic design
STLD-Combinational  logic design STLD-Combinational  logic design
STLD-Combinational logic design
 
Switching theory unit 2
Switching theory unit 2Switching theory unit 2
Switching theory unit 2
 

Recently uploaded

ACRP 4-09 Risk Assessment Method to Support Modification of Airfield Separat...
ACRP 4-09 Risk Assessment Method to Support Modification of Airfield Separat...ACRP 4-09 Risk Assessment Method to Support Modification of Airfield Separat...
ACRP 4-09 Risk Assessment Method to Support Modification of Airfield Separat...
Mukeshwaran Balu
 
Iron and Steel Technology Roadmap - Towards more sustainable steelmaking.pdf
Iron and Steel Technology Roadmap - Towards more sustainable steelmaking.pdfIron and Steel Technology Roadmap - Towards more sustainable steelmaking.pdf
Iron and Steel Technology Roadmap - Towards more sustainable steelmaking.pdf
RadiNasr
 
BPV-GUI-01-Guide-for-ASME-Review-Teams-(General)-10-10-2023.pdf
BPV-GUI-01-Guide-for-ASME-Review-Teams-(General)-10-10-2023.pdfBPV-GUI-01-Guide-for-ASME-Review-Teams-(General)-10-10-2023.pdf
BPV-GUI-01-Guide-for-ASME-Review-Teams-(General)-10-10-2023.pdf
MIGUELANGEL966976
 
Generative AI leverages algorithms to create various forms of content
Generative AI leverages algorithms to create various forms of contentGenerative AI leverages algorithms to create various forms of content
Generative AI leverages algorithms to create various forms of content
Hitesh Mohapatra
 
Technical Drawings introduction to drawing of prisms
Technical Drawings introduction to drawing of prismsTechnical Drawings introduction to drawing of prisms
Technical Drawings introduction to drawing of prisms
heavyhaig
 
Understanding Inductive Bias in Machine Learning
Understanding Inductive Bias in Machine LearningUnderstanding Inductive Bias in Machine Learning
Understanding Inductive Bias in Machine Learning
SUTEJAS
 
DEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODEL
DEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODELDEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODEL
DEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODEL
gerogepatton
 
International Conference on NLP, Artificial Intelligence, Machine Learning an...
International Conference on NLP, Artificial Intelligence, Machine Learning an...International Conference on NLP, Artificial Intelligence, Machine Learning an...
International Conference on NLP, Artificial Intelligence, Machine Learning an...
gerogepatton
 
132/33KV substation case study Presentation
132/33KV substation case study Presentation132/33KV substation case study Presentation
132/33KV substation case study Presentation
kandramariana6
 
basic-wireline-operations-course-mahmoud-f-radwan.pdf
basic-wireline-operations-course-mahmoud-f-radwan.pdfbasic-wireline-operations-course-mahmoud-f-radwan.pdf
basic-wireline-operations-course-mahmoud-f-radwan.pdf
NidhalKahouli2
 
CSM Cloud Service Management Presentarion
CSM Cloud Service Management PresentarionCSM Cloud Service Management Presentarion
CSM Cloud Service Management Presentarion
rpskprasana
 
New techniques for characterising damage in rock slopes.pdf
New techniques for characterising damage in rock slopes.pdfNew techniques for characterising damage in rock slopes.pdf
New techniques for characterising damage in rock slopes.pdf
wisnuprabawa3
 
bank management system in java and mysql report1.pdf
bank management system in java and mysql report1.pdfbank management system in java and mysql report1.pdf
bank management system in java and mysql report1.pdf
Divyam548318
 
ACEP Magazine edition 4th launched on 05.06.2024
ACEP Magazine edition 4th launched on 05.06.2024ACEP Magazine edition 4th launched on 05.06.2024
ACEP Magazine edition 4th launched on 05.06.2024
Rahul
 
14 Template Contractual Notice - EOT Application
14 Template Contractual Notice - EOT Application14 Template Contractual Notice - EOT Application
14 Template Contractual Notice - EOT Application
SyedAbiiAzazi1
 
Electric vehicle and photovoltaic advanced roles in enhancing the financial p...
Electric vehicle and photovoltaic advanced roles in enhancing the financial p...Electric vehicle and photovoltaic advanced roles in enhancing the financial p...
Electric vehicle and photovoltaic advanced roles in enhancing the financial p...
IJECEIAES
 
Wearable antenna for antenna applications
Wearable antenna for antenna applicationsWearable antenna for antenna applications
Wearable antenna for antenna applications
Madhumitha Jayaram
 
Advanced control scheme of doubly fed induction generator for wind turbine us...
Advanced control scheme of doubly fed induction generator for wind turbine us...Advanced control scheme of doubly fed induction generator for wind turbine us...
Advanced control scheme of doubly fed induction generator for wind turbine us...
IJECEIAES
 
22CYT12-Unit-V-E Waste and its Management.ppt
22CYT12-Unit-V-E Waste and its Management.ppt22CYT12-Unit-V-E Waste and its Management.ppt
22CYT12-Unit-V-E Waste and its Management.ppt
KrishnaveniKrishnara1
 
Modelagem de um CSTR com reação endotermica.pdf
Modelagem de um CSTR com reação endotermica.pdfModelagem de um CSTR com reação endotermica.pdf
Modelagem de um CSTR com reação endotermica.pdf
camseq
 

Recently uploaded (20)

ACRP 4-09 Risk Assessment Method to Support Modification of Airfield Separat...
ACRP 4-09 Risk Assessment Method to Support Modification of Airfield Separat...ACRP 4-09 Risk Assessment Method to Support Modification of Airfield Separat...
ACRP 4-09 Risk Assessment Method to Support Modification of Airfield Separat...
 
Iron and Steel Technology Roadmap - Towards more sustainable steelmaking.pdf
Iron and Steel Technology Roadmap - Towards more sustainable steelmaking.pdfIron and Steel Technology Roadmap - Towards more sustainable steelmaking.pdf
Iron and Steel Technology Roadmap - Towards more sustainable steelmaking.pdf
 
BPV-GUI-01-Guide-for-ASME-Review-Teams-(General)-10-10-2023.pdf
BPV-GUI-01-Guide-for-ASME-Review-Teams-(General)-10-10-2023.pdfBPV-GUI-01-Guide-for-ASME-Review-Teams-(General)-10-10-2023.pdf
BPV-GUI-01-Guide-for-ASME-Review-Teams-(General)-10-10-2023.pdf
 
Generative AI leverages algorithms to create various forms of content
Generative AI leverages algorithms to create various forms of contentGenerative AI leverages algorithms to create various forms of content
Generative AI leverages algorithms to create various forms of content
 
Technical Drawings introduction to drawing of prisms
Technical Drawings introduction to drawing of prismsTechnical Drawings introduction to drawing of prisms
Technical Drawings introduction to drawing of prisms
 
Understanding Inductive Bias in Machine Learning
Understanding Inductive Bias in Machine LearningUnderstanding Inductive Bias in Machine Learning
Understanding Inductive Bias in Machine Learning
 
DEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODEL
DEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODELDEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODEL
DEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODEL
 
International Conference on NLP, Artificial Intelligence, Machine Learning an...
International Conference on NLP, Artificial Intelligence, Machine Learning an...International Conference on NLP, Artificial Intelligence, Machine Learning an...
International Conference on NLP, Artificial Intelligence, Machine Learning an...
 
132/33KV substation case study Presentation
132/33KV substation case study Presentation132/33KV substation case study Presentation
132/33KV substation case study Presentation
 
basic-wireline-operations-course-mahmoud-f-radwan.pdf
basic-wireline-operations-course-mahmoud-f-radwan.pdfbasic-wireline-operations-course-mahmoud-f-radwan.pdf
basic-wireline-operations-course-mahmoud-f-radwan.pdf
 
CSM Cloud Service Management Presentarion
CSM Cloud Service Management PresentarionCSM Cloud Service Management Presentarion
CSM Cloud Service Management Presentarion
 
New techniques for characterising damage in rock slopes.pdf
New techniques for characterising damage in rock slopes.pdfNew techniques for characterising damage in rock slopes.pdf
New techniques for characterising damage in rock slopes.pdf
 
bank management system in java and mysql report1.pdf
bank management system in java and mysql report1.pdfbank management system in java and mysql report1.pdf
bank management system in java and mysql report1.pdf
 
ACEP Magazine edition 4th launched on 05.06.2024
ACEP Magazine edition 4th launched on 05.06.2024ACEP Magazine edition 4th launched on 05.06.2024
ACEP Magazine edition 4th launched on 05.06.2024
 
14 Template Contractual Notice - EOT Application
14 Template Contractual Notice - EOT Application14 Template Contractual Notice - EOT Application
14 Template Contractual Notice - EOT Application
 
Electric vehicle and photovoltaic advanced roles in enhancing the financial p...
Electric vehicle and photovoltaic advanced roles in enhancing the financial p...Electric vehicle and photovoltaic advanced roles in enhancing the financial p...
Electric vehicle and photovoltaic advanced roles in enhancing the financial p...
 
Wearable antenna for antenna applications
Wearable antenna for antenna applicationsWearable antenna for antenna applications
Wearable antenna for antenna applications
 
Advanced control scheme of doubly fed induction generator for wind turbine us...
Advanced control scheme of doubly fed induction generator for wind turbine us...Advanced control scheme of doubly fed induction generator for wind turbine us...
Advanced control scheme of doubly fed induction generator for wind turbine us...
 
22CYT12-Unit-V-E Waste and its Management.ppt
22CYT12-Unit-V-E Waste and its Management.ppt22CYT12-Unit-V-E Waste and its Management.ppt
22CYT12-Unit-V-E Waste and its Management.ppt
 
Modelagem de um CSTR com reação endotermica.pdf
Modelagem de um CSTR com reação endotermica.pdfModelagem de um CSTR com reação endotermica.pdf
Modelagem de um CSTR com reação endotermica.pdf
 

Amit vish

  • 1. June 23, 2003 ©2000-2003 Howard Huang 1 Basic circuit design and multiplexers In the first three lectures we learned all the fundamentals needed for making circuits. — Truth tables and Boolean expressions describe functions. — Expressions can be converted to circuits. — Boolean algebra and K-maps help simplify expressions and circuits. Today we’ll apply all of these foundations to work with some larger circuits. We’ll also begin introducing common circuits that we’ll be using throughout the summer.
  • 2. June 23, 2003 Basic circuit design and multiplexers 2 Designing circuits The goal in circuit design is to build hardware that solves some problem. The basic approach is to express the solution as a Boolean function, which can then be converted to a circuit. 1. Figure out how many inputs and outputs you need. 2. Describe the function as a truth table or a Boolean expression. 3. Find a simplified Boolean expression for the function. 4. Build the circuit based on your simplified expression.
  • 3. June 23, 2003 Basic circuit design and multiplexers 3 Example: comparing 2-bit numbers Let’s design a circuit that compares two 2-bit numbers, A and B. There are three possible results: A > B, A = B or A < B. We will represent the results using three separate outputs. — G (“Greater”) should be 1 only when A > B. — E (“Equal”) should be 1 only when A = B. — L (“Lesser”) should be 1 only when A < B. Make sure you understand the problem! — Inputs A and B will be 00, 01, 10, or 11 (0, 1, 2 or 3 in decimal). — For any inputs A and B, exactly one of the three outputs will be 1.
  • 4. June 23, 2003 Basic circuit design and multiplexers 4 Step 1: How many inputs and outputs? How many inputs and outputs will this circuit have? — Two 2-bit numbers means a total of four inputs. Let’s say the first number consists of bits called A1 and A0 (from left to right), while second number has bits B1 and B0. — The problem specifies three outputs: G, E and L. Here is a block diagram that shows the inputs and outputs explicitly. This is like a function header or prototype in programs, which lists the inputs and outputs of a function. Now the hard part is to design the circuitry that goes inside the box.
  • 5. June 23, 2003 Basic circuit design and multiplexers 5 Step 2: Functional specification For this problem, it’s probably easiest to start with a truth table. This way we can explicitly show the relationship (>, =, <) between the inputs. A four-input function has a sixteen-row truth table. For convenience, the rows are in binary numeric order from 0000 to 1111 for A1, A0, B1 and B0. For example, 01 < 10, so the sixth row of the truth table (corresponding to inputs A=01 and B=10) shows that output L=1, while G and E are both 0. 0101111 0010111 0011011 0010011 1001101 0100101 0011001 0010001 1001110 1000110 0101010 0010010 1001100 1000100 1001000 0100000 LEGB0B1A0A1
  • 6. June 23, 2003 Basic circuit design and multiplexers 6 Step 3: Simplified Boolean expressions Let’s use K-maps to simplify our circuit. There are three functions (each with the same inputs A1 A0 B1 B0), so we need three K-maps. B0 0011 1011 A1 A0 0001 0000 B1 B0 0100 0000 A1 A0 1100 1110 B1 B0 1000 0100 A1 A0 0010 0001 B1 G(A1,A0,B1,B0) = A1 A0 B0’ + A0 B1’B0’ + A1 B1’ E(A1,A0,B1,B0) = A1’A0’B1’B0’ + A1’A0 B1’B0 + A1 A0 B1 B0 + A1 A0’B1 B0’ L(A1,A0,B1,B0) = A1’A0’B0 + A0’B1 B0 + A1’B1
  • 7. June 23, 2003 Basic circuit design and multiplexers 7 Step 4: Drawing the circuits G = A1 A0 B0’ + A0 B1’B0’ + A1 B1’ E = A1’A0’B1’B0’ + A1’A0 B1’B0 + A1 A0 B1 B0 + A1 A0’B1 B0’ L = A1’A0’B0 + A0’B1 B0 + A1’B1 LogicWorks has gates with inverted inputs (the small bubbles) for clearer diagrams.
  • 8. June 23, 2003 Basic circuit design and multiplexers 8 Testing this in LogicWorks In LogicWorks, binary switches provide inputs to your circuit, and binary probes display the outputs. switches probe
  • 9. June 23, 2003 Basic circuit design and multiplexers 9 Circuit design issues We had to find a suitable data representation for the inputs and outputs. — The inputs were just two-bit binary numbers. — We used three outputs, one for each possibility of the numbers being greater than, equal to, or less than each other. This is called a “one out of three” code. K-maps have advantages but also limitations. — Our circuits are relatively simple two-level implementations. — But E(A1,A0,B1,B0) couldn’t be simplified at all via K-maps. Could we do better using Boolean algebra? Our circuit isn’t very extensible. — We used a brute-force approach, listing all inputs and outputs. This makes it hard to extend our circuit to compare larger numbers. — We’ll have a better solution after we talk about computer arithmetic. There are always many possible ways to design a circuit!
  • 10. June 23, 2003 Basic circuit design and multiplexers 10 Multiplexers Let’s think about building another circuit, a multiplexer. In the old days, several machines could share an I/O device with a switch. The switch allows one computer’s output to go to the printer’s input.
  • 11. June 23, 2003 Basic circuit design and multiplexers 11 A 2-to-1 multiplexer Here is the circuit analog of that printer switch. This is a 2-to-1 multiplexer, or mux. — There are two data inputs D0 and D1, and a select input called S. — There is one output named Q. The multiplexer routes one of its data inputs (D0 or D1) to the output Q, based on the value of S. — If S=0, the output will be D0. — If S=1, the output will be D1.
  • 12. June 23, 2003 Basic circuit design and multiplexers 12 Building a multiplexer Here is a truth table for the multiplexer, based on our description from the previous page: The multiplexer routes one of its data inputs (D0 or D1) to the output Q, based on the value of S. — If S=0, the output will be D0. — If S=1, the output will be D1. You can then find an MSP for the mux output Q. Q = S’D0 + S D1 Note that this corresponds closely to our English specification above—sometimes you can derive an expression without first making a truth table. 1111 1011 0101 0001 1110 0010 1100 0000 QD0D1S
  • 13. June 23, 2003 Basic circuit design and multiplexers 13 Multiplexer circuit diagram Here is an implementation of a 2-to-1 multiplexer. Remember that a minimal sum of products expression leads to a minimal two-level circuit. Q = S’D0 + S D1
  • 14. June 23, 2003 Basic circuit design and multiplexers 14 Blocks, abstraction and modularity Multiplexers are common enough that we often want to treat them as abstract units or black boxes, as symbolized by our block diagrams. — Block symbols make circuit diagrams simpler, by hiding the internal implementation details. You can use a device without knowing how it’s designed, as long as you know what it does. — Different multiplexer implementations should be interchangeable. — Circuit blocks also aid hardware re-use, since you don’t have to keep building a multiplexer from scratch every time you need one. These blocks are similar to functions in programming languages!
  • 15. June 23, 2003 Basic circuit design and multiplexers 15 Enable inputs Many devices have an additional enable input, which “activates” or “deactivates” the device. We could design a 2-to-1 multiplexer with an enable input that’s used as follows. — EN=0 disables the multiplexer, which forces the output to be 0. (It does not turn off the multiplexer.) — EN=1 enables the multiplexer, and it works as specified earlier. Enable inputs are especially useful in combining smaller muxes together to make larger ones, as we’ll see later today. 11111 10111 01011 00011 11101 00101 11001 00001 01110 00110 01010 00010 01100 00100 01000 00000 QD0D1SEN
  • 16. June 23, 2003 Basic circuit design and multiplexers 16 Truth table abbreviations Notice that when EN=0, then Q is always 0, regardless of what S, D1 and D0 are set to. We can shorten the truth table by including Xs in the input variable columns, as shown on the bottom right. 11111 10111 01011 00011 11101 00101 11001 00001 01110 00110 01010 00010 01100 00100 01000 00000 QD0D1SEN 11111 10111 01011 00011 11101 00101 11001 00001 0xxx0 QD0D1SEN
  • 17. June 23, 2003 Basic circuit design and multiplexers 17 Another abbr. 4 U Also, when EN=1 notice that if S=0 then Q=D0, but if S=1 then Q=D1. Another way to abbreviate a truth table is to list input variables in the output columns, as shown on the right. This final version of the 2-to-1 multiplexer truth table is much clearer, and matches the equation Q = S’D0 + S D1 very closely. 11111 10111 01011 00011 11101 00101 11001 00001 0xxx0 QD0D1SEN D111 D001 0x0 QSEN
  • 18. June 23, 2003 Basic circuit design and multiplexers 18 A KVM switch This KVM switch allows four computers to share a single keyboard, video monitor, and mouse.
  • 19. June 23, 2003 Basic circuit design and multiplexers 19 A 4-to-1 multiplexer Here is a block diagram and abbreviated truth table for a 4-to-1 mux, which directs one of four different inputs to the single output line. — There are four data inputs, so we need two bits, S1 and S0, for the mux selection input. — LogicWorks multiplexers have active-low enable inputs, so the mux always outputs 1 when EN’ = 1. This is denoted on the block symbol with a bubble in front of EN. 1xx1 D3110 D2010 D1100 D0000 QS0S1EN’ Q = S1’S0’D0 + S1’S0 D1 + S1 S0’D2 + S1 S0 D3
  • 20. June 23, 2003 Basic circuit design and multiplexers 20 A 4-to-1 multiplexer implementation Again we have a minimal sum of products expression, which leads to a minimal two-level circuit implementation. Q = S1’S0’D0 + S1’S0 D1 + S1 S0’D2 + S1 S0 D3
  • 21. June 23, 2003 Basic circuit design and multiplexers 21 2n -to-1 multiplexers You can make even larger multiplexers, following the same pattern. A 2n -to-1 multiplexer routes one of 2n input lines to the output line. — There are 2n data inputs, so there must also be n select inputs. — The output is a single bit. Here is an 8-to-1 multiplexer, probably the biggest we’ll see in this class.
  • 22. June 23, 2003 Basic circuit design and multiplexers 22 Example: addition Multiplexers can sometimes make circuit design easier. As an example, let’s make a circuit to add three 1-bit inputs X, Y and Z. We’ll need two bits to represent the total. — The bits will be called C and S, standing for “carry” and “sum.” — These are two separate functions of the inputs X, Y and Z. A truth table and sum of minterm equations for C and S are shown below. 1 1 1 0 1 0 0 0 C 1111 0011 0101 1001 0110 1010 1100 0000 SZYX C(X,Y,Z) = Σm(3,5,6,7) S(X,Y,Z) = Σm(1,2,4,7)0 + 1 + 1 = 10 1 + 1 + 1 = 11
  • 23. June 23, 2003 Basic circuit design and multiplexers 23 Implementing functions with multiplexers We could implement a function of n variables with an n-to-1 multiplexer. — The mux select inputs correspond to the function’s input variables, and are used to select one row of the truth table. — Each mux data input corresponds to one output from the truth table. We connect 1 to data input Di for each function minterm mi, and we connect 0 to the other data inputs. For example, here is the carry function, C(X,Y,Z) = Σm(3,5,6,7). 1111 1011 1101 0001 1110 0010 0100 0000 CZYX
  • 24. June 23, 2003 Basic circuit design and multiplexers 24 Partitioning the truth table We can actually implement C(X,Y,Z) = Σm(3,5,6,7) with just a 4-to-1 mux, instead of an 8-to-1. — Instead of using three variables to select one row of the truth table, we’ll use two variables to pick a pair of rows in the table. — The multiplexer data inputs will be functions of the remaining variable, which distinguish between the rows in each pair. First, we can divide the rows of our truth table into pairs, as shown on the right. X and Y are constant within each pair of rows, so C is a function of Z only. — When XY=00, C=0 — When XY=01, C=Z — When XY=10, C=Z — When XY=11, C=1 1111 1011 1101 0001 1110 0010 0100 0000 CZYX
  • 25. June 23, 2003 Basic circuit design and multiplexers 25 A more efficient adder All that’s left is setting the multiplexer inputs. — The two input variables X and Y will be connected to select inputs S1 and S0 of our 4-to-1 multiplexer. — The expressions for C(Z) are then connected to the data inputs D0-D3 of the multiplexer. 1111 1011 1101 0001 1110 0010 0100 0000 CZYX When XY=00, C=0 When XY=01, C=Z When XY=10, C=Z When XY=11, C=1
  • 26. June 23, 2003 Basic circuit design and multiplexers 26 Verifying our adder Don’t believe that this works? Start with the equation for a 4-to-1 multiplexer from earlier in the lecture. Q = S1’S0’D0 + S1’S0 D1 + S1 S0’D2 + S1 S0 D3 Then just plug in the actual inputs to our circuit, as shown again on the right: S1S0 = XY, D3 = 1, D2 = Z, D1 = Z, and D0 = 0. C = X’Y’•0 + X’YZ + XY’Z + XY•1 = X’YZ + XY’Z + XY = X’YZ + XY’Z + XY(Z’ + Z) = X’YZ + XY’Z + XYZ’ + XYZ So the multiplexer output really is the carry function, C(X,Y,Z) = Σm(3,5,6,7).
  • 27. June 23, 2003 Basic circuit design and multiplexers 27 Multiplexer-based sum Here’s the same thing for the sum function, S(X,Y,Z) = Σm(1,2,4,7). Again, we can show that this is a correct implementation. Q = S1’S0’D0 + S1’S0 D1 + S1 S0’D2 + S1 S0 D3 = X’Y’Z + X’YZ’ + XY’Z’ + XYZ = Σm(1,2,4,7) When XY=00, S=Z When XY=01, S=Z’ When XY=10, S=Z’ When XY=11, S=Z 1111 0011 0101 1001 0110 1010 1100 0000 SZYX
  • 28. June 23, 2003 Basic circuit design and multiplexers 28 Dual multiplexers A dual 4-to-1 mux allows you to select from one of four 2-bit data inputs. The Mux-4×2 T.S. device in LogicWorks is shown here. — The two output bits are 2Q 1Q, and S1-S0 select a pair of inputs. — LogicWorks labels the x-th bit of data input y as xDy. 11xx1 0 0 0 0 EN’ 1D32D311 1D22D201 1D12D110 1D02D000 1Q2QS0S1
  • 29. June 23, 2003 Basic circuit design and multiplexers 29 Dual muxes in more detail You could build a dual 4-to-1 mux from its truth table and our familiar circuit design techniques. It’s also possible to combine smaller muxes together to form larger ones. You can build the dual 4-to-1 mux just by using two 4-to-1 muxes. — The two 4-to-1 multiplexers share the same EN’, S1 and S0 signals. — Each smaller mux produces one bit of the two-bit output 2Q 1Q. This kind of hierarchical design is very common in computer architecture.
  • 30. June 23, 2003 Basic circuit design and multiplexers 30 Dual multiplexer-based adder We can use this dual 4-to-1 multiplexer to implement our adder, which produces a two-bit output consisting of C and S. That KVM switch from earlier is really a “tri 4-to-1 multiplexer,” since it selects from four sets of three signals (keyboard, video and mouse).
  • 31. June 23, 2003 Basic circuit design and multiplexers 31 Summary Today we began designing circuits! — Starting from a problem description, we came up with a truth table to show all possible inputs and outputs. — Then we built the circuit using primitive gates or multiplexers. A 2n -to-1 multiplexer routes one of 2n inputs to a single output line. — Muxes are a good example of our circuit design techniques. — They also illustrate abstraction and modularity in hardware design. — We saw some variations such as active-low and dual multiplexers. Tomorrow we’ll present another commonly-used device and show how it can also be used in larger circuits.