SlideShare a Scribd company logo
1 of 3
Download to read offline
ECE 241
Logic Circuit Lab
Lab #4; Page 1/11
Spring 2007
Implementing Combinational Circuits
While Multiplexers are primarily thought of as “data selectors” because they select one of several
inputs to be logically connected to the output, they can also be used to implement Boolean functions.
Similarly, while n-bit Decoders are primarily thought of as n-bit binary to 1 of 2n code converters or as
Demultiplexers, they can also be used to implement Boolean functions of n variables.
1 Multiplexers Used in Boolean Functions
Consider the following truth table that describes a function of 4 Boolean variables.
A B C D F
0 0 0 0 0
0 0 0 1 0
0 0 1 0 1
0 0 1 1 1
0 1 0 0 0
0 1 0 1 1
0 1 1 0 0
0 1 1 1 1
1 0 0 0 0
1 0 0 1 0
1 0 1 0 1
1 0 1 1 1
1 1 0 0 0
1 1 0 1 0
1 1 1 0 0
1 1 1 1 1
MUX 16:1
0
1
2
3
0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
G
0
15
F
Vcc D
C
B
A
}
Figure 1: A 16 to 1 Multiplexer Implementation
A 16 to 1 Multiplexer with A, B, C, and D applied to its S3, S2, S1, and S0 inputs respectively would
select one of its 16 inputs for each of the 16 possible combinations of A, B, C, and D. We can implement
the function described by the truth table by connecting a voltage source for logic level 1 or ground for
a logic level 0 to each of the Multiplexer inputs corresponding to the required value of the function
associated with the combination of A, B, C, and D that selected the input. Therefore, the inputs to the
Multiplexer will be the same as the F entries in the truth table provided A, B, C, and D are connected to
the Multiplexer select inputs in the right order.
Consider what happens when, instead of using a 16 to 1 Multiplexer, we use an 8 to 1 Mux. If we
choose to connect A, B, and C to the inputs of the Multiplexer, then for each combination of A, B and C,
ECE 241
Logic Circuit Lab
Lab #4; Page 2/11
Spring 2007
although only one Mux input is selected, we need to realize two potentially different values of F. If they
are different, they will be functions of D (either D or D). To see this, we partition the truth table into
sections where A, B and C have the same value. This is shown in Figure 2.
A B C D F
0 0 0 0 0 0
0 0 0 1 0
0 0 1 0 1 1
0 0 1 1 1
0 1 0 0 0 D
0 1 0 1 1
0 1 1 0 0 D
0 1 1 1 1
1 0 0 0 0 0
1 0 0 1 0
1 0 1 0 1 1
1 0 1 1 1
1 1 0 0 0 0
1 1 0 1 0
1 1 1 0 0 D
1 1 1 1 1
Vcc
D
A
B
C
F
MUX 8:1
0
1
2
0
1
2
3
4
5
6
7
G0
7}
Figure 2: An 8 to 1 Multiplexer Implementation
This idea can be extended to a 4 to 1 Mux implementation. In this case we partition the table into
sections for which A and B have the same value. This is shown in Figure 3. Now Multiplexer inputs will
be either 1, 0 or some function of C and D. K-maps may be used to simplify the functions of C and D
for each of the table partitions, but in the case of two variables, the functions are usually obvious.
The final possibility, shown in Figure 4, is a 2 to 1 Mux implementation. In this case only A is used as
a select input and the table is partitioned into two parts based on A. Inputs to the Mux will be functions
of B, C and D. Here it is more likely that you will need to use K-maps to simplify the functions.
It should be apparent that there is no explicit importance to the order of A, B, C and D in the truth
table. If we rearranged them, we would have chosen different variables as Mux select inputs, and we
might end up using less logic in the rest of the circuit. Consider rearranging the table so that B is the
Mux select input. Using this approach, the realization shown in Figure 5 uses less hardware.
2 Decoders Used in Boolean Functions
For an n-bit to 2n Decoder, the only output asserted is the one corresponding to the decimal value of the
binary number presented to the n inputs. Another way to state this is to say that each Decoder output
represents one of the 2n minterms of n variables. Thus, a Decoder can be used to implement a function
ECE 241
Logic Circuit Lab
Lab #4; Page 3/11
Spring 2007
A B C D F
0 0 0 0 0
0 0 0 1 0 C
0 0 1 0 1
0 0 1 1 1
0 1 0 0 0
0 1 0 1 1 D
0 1 1 0 0
0 1 1 1 1
1 0 0 0 0
1 0 0 1 0 C
1 0 1 0 1
1 0 1 1 1
1 1 0 0 0
1 1 0 1 0 CD
1 1 1 0 0
1 1 1 1 1
0
1
0
1
2
3
G
0
3
MUX 4:1
F
A
B
C
D
C
C
D
}
Figure 3: A 4 to 1 Multiplexer Implementation
of n variables simply by connecting the outputs of the Decoder that correspond to the minterms of a
function to a multi-input OR gate. Consider the Decoder circuit shown in Figure 6 which implements
two separate functions of three variables. Notice that we have used a 74138 3-to-8 Decoder. As in most
Decoders, the outputs are asserted low. This allows us to use NAND gates to implement the minterm
sums.
We can see that, unlike Multiplexers, Decoders can be used to implement more than one Boolean
function at a time. On the other hand, a Multiplexer implementation may not require any external cir-
cuitry, while a Decoder circuit always needs external gates.
3 Seven-Segment Displays
A Seven-Segment display consists of seven LEDs arranged in a “figure 8,” as shown in Figure 7. Lighting
combinations of the LEDs allows one to display various symbols. To display the symbol 0, we light
segments A, B, C, D, E and F. Lighting segments B and C produces the symbol 1. Because it is a
common anode display, to select a Seven-Segment display a high voltage is applied to the corresponding
anode (A1-A4 on the Digilab Board). Individual LED segments are lit by taking the inputs (the cathodes
CA-CG, DP) associated with the segment low.
Important Note - The seven segment LED’s are active low, meaning you will have to drive the seg-
ment low on the CA - CG, DP pins low in order to light up the LED segments. Example - if CA = 0, then
segment A will light up.
ECE 241
Logic Circuit Lab
Lab #4; Page 4/11
Spring 2007
A B C D F
0 0 0 0 0
0 0 0 1 0
0 0 1 0 1 BC +BD
0 0 1 1 1
0 1 0 0 0
0 1 0 1 1
0 1 1 0 0
0 1 1 1 1
1 0 0 0 0
1 0 0 1 0
1 0 1 0 1 BC +CD
1 0 1 1 1
1 1 0 0 0
1 1 0 1 0
1 1 1 0 0
1 1 1 1 1
F
MUX 2:1
A 0}G
0
1B
D
B
C
C
D
0
1
Figure 4: A 2 to 1 Multiplexer Implementation
Also, in order to select the particular 7 segment group, the common Anodes A1 - A4 must be driven
by Vcc, meaning you will have to connect the A1 - A4 pins to the FPGA and pull them up internally
through an IO Buffer in your schematic entry.
4 Preliminary Exercise (5)
Design a binary to 7-segment code converter for use in displaying a hexadecimal representation of a 4-bit
binary number. (Use lowercase for ‘b’ and ‘d’.) You may use multiplexers and decoders in your design,
as you feel appropriate, as well as primitive gates (e.g., nand gates). Turn in a copy of your complete
design, with necessary documentation, at the start of your lab session. (Written neatly by hand is fine.)
5 Experiment (10)
1. Implement the code converter you designed. Feel free to use components from the Xilinx library.
2. Perform a pre- or post-synthesis simulation of your design.
3. Assign pins to connect your design to switches and displays as needed, by creating a UCF file.
Download your design into the FPGA and demonstrate the functionality to the instructor or TA.
Obtain a signature for your report cover page or the design summary page.
ECE 241
Logic Circuit Lab
Lab #4; Page 5/11
Spring 2007
B C D A F
0 0 0 0 0
0 0 0 1 0
0 0 1 0 0 C
0 0 1 1 0
0 1 0 0 1
0 1 0 1 1
0 1 1 0 1
0 1 1 1 1
1 0 0 0 0
1 0 0 1 0
1 0 1 0 1 D(A+C)
1 0 1 1 0
1 1 0 0 0
1 1 0 1 0
1 1 1 0 1
1 1 1 1 1
F
MUX 2:1
0}G
0
1
0
1
B
C
C
A
D
Figure 5: Another 2 to 1 Multiplexer Implementation
6 Report (5)
Turn in a brief, professional report summarizing your experience. Include your design schematics, any
simulations that you performed, and the design summary page.
0
1
2
3
4
5
6
7
1
2
4A
B
C
BIN/OCT
F2
F1
F1(ABC) = ∑m(1,5,7), F2(ABC) = ∑m(0,3,4)
Figure 6: A Decoder Circuit
ECE 241
Logic Circuit Lab
Lab #4; Page 6/11
Spring 2007
DP
A
E
F
DP
B
G
D
C CA
A1
CB CC CD CE CF CG
Figure 7: Seven Segment Display

More Related Content

What's hot

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 circuitsHareem Aslam
 
Combinational Logic
Combinational Logic Combinational Logic
Combinational Logic Ketan Kamra
 
Combinational logic circuits by Tahir Yasin
Combinational logic circuits by Tahir YasinCombinational logic circuits by Tahir Yasin
Combinational logic circuits by Tahir YasinTAHIR YASIN
 
Combinational circuit
Combinational circuitCombinational circuit
Combinational circuitchauhankapil
 
Combinational Circuits
Combinational CircuitsCombinational Circuits
Combinational CircuitsDilum Bandara
 
Combinational Logic with MSI and LSI
Combinational Logic with MSI and LSICombinational Logic with MSI and LSI
Combinational Logic with MSI and LSISikder Tahsin Al-Amin
 
Combinational logic With Multiplexers and Decoders
Combinational logic With Multiplexers and DecodersCombinational logic With Multiplexers and Decoders
Combinational logic With Multiplexers and DecodersHarsh Parmar
 
Introduction of Combinational logic circuits & half adder
Introduction of Combinational logic circuits & half adderIntroduction of Combinational logic circuits & half adder
Introduction of Combinational logic circuits & half adderhymalakshmitirumani
 
logical circuits substractors
logical circuits substractors logical circuits substractors
logical circuits substractors Fâhém Ähmêd
 
combinational_circuits
combinational_circuitscombinational_circuits
combinational_circuitsBindu Madhavi
 

What's hot (19)

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
 
Combinational Logic
Combinational Logic Combinational Logic
Combinational Logic
 
Chapter 4: Combinational Logic
Chapter 4: Combinational LogicChapter 4: Combinational Logic
Chapter 4: Combinational Logic
 
Combinational circuit
Combinational circuitCombinational circuit
Combinational circuit
 
Combinational circuit
Combinational circuitCombinational circuit
Combinational circuit
 
Combinational circuit
Combinational circuitCombinational circuit
Combinational circuit
 
Stld
StldStld
Stld
 
Combinational logic circuits by Tahir Yasin
Combinational logic circuits by Tahir YasinCombinational logic circuits by Tahir Yasin
Combinational logic circuits by Tahir Yasin
 
Combinational circuit
Combinational circuitCombinational circuit
Combinational circuit
 
Combinational Circuits
Combinational CircuitsCombinational Circuits
Combinational Circuits
 
Combinational Logic with MSI and LSI
Combinational Logic with MSI and LSICombinational Logic with MSI and LSI
Combinational Logic with MSI and LSI
 
Combinational logic With Multiplexers and Decoders
Combinational logic With Multiplexers and DecodersCombinational logic With Multiplexers and Decoders
Combinational logic With Multiplexers and Decoders
 
multiplexer and d-multiplexer
multiplexer and d-multiplexermultiplexer and d-multiplexer
multiplexer and d-multiplexer
 
Digital Logic circuit
Digital Logic circuitDigital Logic circuit
Digital Logic circuit
 
Introduction of Combinational logic circuits & half adder
Introduction of Combinational logic circuits & half adderIntroduction of Combinational logic circuits & half adder
Introduction of Combinational logic circuits & half adder
 
Bds lab 4
Bds lab 4Bds lab 4
Bds lab 4
 
logical circuits substractors
logical circuits substractors logical circuits substractors
logical circuits substractors
 
combinational_circuits
combinational_circuitscombinational_circuits
combinational_circuits
 

Viewers also liked

Implementation of boolean function through1 multiplexer
Implementation of boolean function through1 multiplexerImplementation of boolean function through1 multiplexer
Implementation of boolean function through1 multiplexerEzeokafor Chibueze
 
Mux decod pld2_vs2
Mux decod pld2_vs2Mux decod pld2_vs2
Mux decod pld2_vs2WanNurdiana
 
Intro_Programmation_Informatique
Intro_Programmation_InformatiqueIntro_Programmation_Informatique
Intro_Programmation_InformatiqueEmeric Tapachès
 
Algorithmic Forex Trading
Algorithmic Forex TradingAlgorithmic Forex Trading
Algorithmic Forex TradingInvestingTips
 
JASPARD, M. LOGIC un service GeoWeb d’aide à la décision et à la coopération...
JASPARD, M. LOGIC  un service GeoWeb d’aide à la décision et à la coopération...JASPARD, M. LOGIC  un service GeoWeb d’aide à la décision et à la coopération...
JASPARD, M. LOGIC un service GeoWeb d’aide à la décision et à la coopération...IT-Gatineau2011
 
Digital elect total
Digital elect totalDigital elect total
Digital elect totalmasterslide
 
Combinators - Lightning Talk
Combinators - Lightning TalkCombinators - Lightning Talk
Combinators - Lightning TalkMike Harris
 
exercice_réseau
exercice_réseauexercice_réseau
exercice_réseaunoureddineb
 
Combinational circuit (7-Segment display)
Combinational circuit (7-Segment display)Combinational circuit (7-Segment display)
Combinational circuit (7-Segment display)ali9753
 
Assurance Qualité logicielle
Assurance Qualité logicielleAssurance Qualité logicielle
Assurance Qualité logicielleSylvain Leroy
 
Chapitre 1 (algorithme)
Chapitre 1 (algorithme)Chapitre 1 (algorithme)
Chapitre 1 (algorithme)mahbouba
 
COMBINATIONAL CIRCUITS & FLIP FLOPS
COMBINATIONAL CIRCUITS & FLIP FLOPSCOMBINATIONAL CIRCUITS & FLIP FLOPS
COMBINATIONAL CIRCUITS & FLIP FLOPSStarlee Lathong
 
Lecture3 combinational blocks
Lecture3 combinational blocksLecture3 combinational blocks
Lecture3 combinational blocksNima Shafiee
 
Lecture 1
Lecture 1Lecture 1
Lecture 1GIKI
 
Exos de logique séquentielle
Exos de logique séquentielleExos de logique séquentielle
Exos de logique séquentielleMo Ur Ad Es-se
 

Viewers also liked (20)

Implementation of boolean function through1 multiplexer
Implementation of boolean function through1 multiplexerImplementation of boolean function through1 multiplexer
Implementation of boolean function through1 multiplexer
 
Mux decod pld2_vs2
Mux decod pld2_vs2Mux decod pld2_vs2
Mux decod pld2_vs2
 
Intro_Programmation_Informatique
Intro_Programmation_InformatiqueIntro_Programmation_Informatique
Intro_Programmation_Informatique
 
Algorithmic Forex Trading
Algorithmic Forex TradingAlgorithmic Forex Trading
Algorithmic Forex Trading
 
JASPARD, M. LOGIC un service GeoWeb d’aide à la décision et à la coopération...
JASPARD, M. LOGIC  un service GeoWeb d’aide à la décision et à la coopération...JASPARD, M. LOGIC  un service GeoWeb d’aide à la décision et à la coopération...
JASPARD, M. LOGIC un service GeoWeb d’aide à la décision et à la coopération...
 
Digital elect total
Digital elect totalDigital elect total
Digital elect total
 
Combinators - Lightning Talk
Combinators - Lightning TalkCombinators - Lightning Talk
Combinators - Lightning Talk
 
Bca i sem de lab
Bca i sem  de labBca i sem  de lab
Bca i sem de lab
 
exercice_réseau
exercice_réseauexercice_réseau
exercice_réseau
 
Combinational circuit (7-Segment display)
Combinational circuit (7-Segment display)Combinational circuit (7-Segment display)
Combinational circuit (7-Segment display)
 
58210401202 งาน 1 ss
58210401202 งาน 1 ss58210401202 งาน 1 ss
58210401202 งาน 1 ss
 
Assurance Qualité logicielle
Assurance Qualité logicielleAssurance Qualité logicielle
Assurance Qualité logicielle
 
Structure de données en PHP
Structure de données en PHPStructure de données en PHP
Structure de données en PHP
 
Chapitre 1 (algorithme)
Chapitre 1 (algorithme)Chapitre 1 (algorithme)
Chapitre 1 (algorithme)
 
Canaux logiques et codage dans le gsm
Canaux logiques et codage dans le gsmCanaux logiques et codage dans le gsm
Canaux logiques et codage dans le gsm
 
COMBINATIONAL CIRCUITS & FLIP FLOPS
COMBINATIONAL CIRCUITS & FLIP FLOPSCOMBINATIONAL CIRCUITS & FLIP FLOPS
COMBINATIONAL CIRCUITS & FLIP FLOPS
 
Digital 1 8
Digital 1 8Digital 1 8
Digital 1 8
 
Lecture3 combinational blocks
Lecture3 combinational blocksLecture3 combinational blocks
Lecture3 combinational blocks
 
Lecture 1
Lecture 1Lecture 1
Lecture 1
 
Exos de logique séquentielle
Exos de logique séquentielleExos de logique séquentielle
Exos de logique séquentielle
 

Similar to Combinational logic

Computer Organization And Architecture lab manual
Computer Organization And Architecture lab manualComputer Organization And Architecture lab manual
Computer Organization And Architecture lab manualNitesh Dubey
 
Introduction number systems and conversion
 Introduction number systems and conversion Introduction number systems and conversion
Introduction number systems and conversionkanyuma jitjumnong
 
Lec 05 - Combinational Logic
Lec 05 - Combinational LogicLec 05 - Combinational Logic
Lec 05 - Combinational LogicVajira Thambawita
 
Combinational and sequential logic
Combinational and sequential logicCombinational and sequential logic
Combinational and sequential logicDeepak John
 
Combinational logic circuits design and implementation
Combinational logic circuits design and implementationCombinational logic circuits design and implementation
Combinational logic circuits design and implementationssuserca5764
 
Logic Design - Chapter 5: Part1 Combinattional Logic
Logic Design - Chapter 5: Part1 Combinattional LogicLogic Design - Chapter 5: Part1 Combinattional Logic
Logic Design - Chapter 5: Part1 Combinattional LogicGouda Mando
 
EEN 1200 L – Digital FundamentalsMerrimack CollegeLaborato.docx
EEN 1200 L – Digital FundamentalsMerrimack CollegeLaborato.docxEEN 1200 L – Digital FundamentalsMerrimack CollegeLaborato.docx
EEN 1200 L – Digital FundamentalsMerrimack CollegeLaborato.docxSALU18
 
Adapted from Harris & Harris Digital Design and Computer Arch.docx
Adapted from Harris & Harris Digital Design and Computer Arch.docxAdapted from Harris & Harris Digital Design and Computer Arch.docx
Adapted from Harris & Harris Digital Design and Computer Arch.docxnettletondevon
 
Logic System Design KTU Chapter-4.ppt
Logic System Design KTU Chapter-4.pptLogic System Design KTU Chapter-4.ppt
Logic System Design KTU Chapter-4.pptAlbin562191
 
FULL ADDER/ SUBTRACTOR USING REVERSIBLE LOGIC
FULL ADDER/ SUBTRACTOR USING REVERSIBLE LOGICFULL ADDER/ SUBTRACTOR USING REVERSIBLE LOGIC
FULL ADDER/ SUBTRACTOR USING REVERSIBLE LOGICBUKYABALAJI
 
FULL ADDER/ SUBTRACTOR USING REVERSIBLE LOGIC
FULL ADDER/ SUBTRACTOR USING REVERSIBLE LOGICFULL ADDER/ SUBTRACTOR USING REVERSIBLE LOGIC
FULL ADDER/ SUBTRACTOR USING REVERSIBLE LOGICBUKYABALAJI
 
Ec2203 digital electronics questions anna university by www.annaunivedu.org
Ec2203 digital electronics questions anna university by www.annaunivedu.orgEc2203 digital electronics questions anna university by www.annaunivedu.org
Ec2203 digital electronics questions anna university by www.annaunivedu.organnaunivedu
 
Lcdf4 chap 03_p2
Lcdf4 chap 03_p2Lcdf4 chap 03_p2
Lcdf4 chap 03_p2ozgur_can
 

Similar to Combinational logic (20)

Amit vish
Amit vishAmit vish
Amit vish
 
Computer Organization And Architecture lab manual
Computer Organization And Architecture lab manualComputer Organization And Architecture lab manual
Computer Organization And Architecture lab manual
 
Introduction number systems and conversion
 Introduction number systems and conversion Introduction number systems and conversion
Introduction number systems and conversion
 
Lec 05 - Combinational Logic
Lec 05 - Combinational LogicLec 05 - Combinational Logic
Lec 05 - Combinational Logic
 
Combinational and sequential logic
Combinational and sequential logicCombinational and sequential logic
Combinational and sequential logic
 
Combinational logic circuits design and implementation
Combinational logic circuits design and implementationCombinational logic circuits design and implementation
Combinational logic circuits design and implementation
 
Assignment#4b
Assignment#4bAssignment#4b
Assignment#4b
 
Chapter-04.pdf
Chapter-04.pdfChapter-04.pdf
Chapter-04.pdf
 
H010414651
H010414651H010414651
H010414651
 
Logic Design - Chapter 5: Part1 Combinattional Logic
Logic Design - Chapter 5: Part1 Combinattional LogicLogic Design - Chapter 5: Part1 Combinattional Logic
Logic Design - Chapter 5: Part1 Combinattional Logic
 
EEN 1200 L – Digital FundamentalsMerrimack CollegeLaborato.docx
EEN 1200 L – Digital FundamentalsMerrimack CollegeLaborato.docxEEN 1200 L – Digital FundamentalsMerrimack CollegeLaborato.docx
EEN 1200 L – Digital FundamentalsMerrimack CollegeLaborato.docx
 
Adapted from Harris & Harris Digital Design and Computer Arch.docx
Adapted from Harris & Harris Digital Design and Computer Arch.docxAdapted from Harris & Harris Digital Design and Computer Arch.docx
Adapted from Harris & Harris Digital Design and Computer Arch.docx
 
Logic System Design KTU Chapter-4.ppt
Logic System Design KTU Chapter-4.pptLogic System Design KTU Chapter-4.ppt
Logic System Design KTU Chapter-4.ppt
 
FULL ADDER/ SUBTRACTOR USING REVERSIBLE LOGIC
FULL ADDER/ SUBTRACTOR USING REVERSIBLE LOGICFULL ADDER/ SUBTRACTOR USING REVERSIBLE LOGIC
FULL ADDER/ SUBTRACTOR USING REVERSIBLE LOGIC
 
FULL ADDER/ SUBTRACTOR USING REVERSIBLE LOGIC
FULL ADDER/ SUBTRACTOR USING REVERSIBLE LOGICFULL ADDER/ SUBTRACTOR USING REVERSIBLE LOGIC
FULL ADDER/ SUBTRACTOR USING REVERSIBLE LOGIC
 
Ec2203 digital electronics questions anna university by www.annaunivedu.org
Ec2203 digital electronics questions anna university by www.annaunivedu.orgEc2203 digital electronics questions anna university by www.annaunivedu.org
Ec2203 digital electronics questions anna university by www.annaunivedu.org
 
Unit 4 dica
Unit 4 dicaUnit 4 dica
Unit 4 dica
 
9525.ppt
9525.ppt9525.ppt
9525.ppt
 
C0421013019
C0421013019C0421013019
C0421013019
 
Lcdf4 chap 03_p2
Lcdf4 chap 03_p2Lcdf4 chap 03_p2
Lcdf4 chap 03_p2
 

Recently uploaded

UNIT-III FMM. DIMENSIONAL ANALYSIS
UNIT-III FMM.        DIMENSIONAL ANALYSISUNIT-III FMM.        DIMENSIONAL ANALYSIS
UNIT-III FMM. DIMENSIONAL ANALYSISrknatarajan
 
Coefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxCoefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxAsutosh Ranjan
 
HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IVHARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IVRajaP95
 
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLSMANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLSSIVASHANKAR N
 
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130Suhani Kapoor
 
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝soniya singh
 
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Dr.Costas Sachpazis
 
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service NashikCall Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service NashikCall Girls in Nagpur High Profile
 
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Dr.Costas Sachpazis
 
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCollege Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCall Girls in Nagpur High Profile
 
Microscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxMicroscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxpurnimasatapathy1234
 
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...ranjana rawat
 
IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...
IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...
IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...RajaP95
 
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...Soham Mondal
 
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 
Extrusion Processes and Their Limitations
Extrusion Processes and Their LimitationsExtrusion Processes and Their Limitations
Extrusion Processes and Their Limitations120cr0395
 
Introduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxIntroduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxupamatechverse
 
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130Suhani Kapoor
 

Recently uploaded (20)

UNIT-III FMM. DIMENSIONAL ANALYSIS
UNIT-III FMM.        DIMENSIONAL ANALYSISUNIT-III FMM.        DIMENSIONAL ANALYSIS
UNIT-III FMM. DIMENSIONAL ANALYSIS
 
Coefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxCoefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptx
 
HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IVHARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
 
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLSMANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
 
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
 
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
 
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
 
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service NashikCall Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
 
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
 
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
 
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCollege Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
 
Microscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxMicroscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptx
 
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
 
IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...
IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...
IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...
 
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
 
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
Extrusion Processes and Their Limitations
Extrusion Processes and Their LimitationsExtrusion Processes and Their Limitations
Extrusion Processes and Their Limitations
 
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCRCall Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
 
Introduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxIntroduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptx
 
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
 

Combinational logic

  • 1. ECE 241 Logic Circuit Lab Lab #4; Page 1/11 Spring 2007 Implementing Combinational Circuits While Multiplexers are primarily thought of as “data selectors” because they select one of several inputs to be logically connected to the output, they can also be used to implement Boolean functions. Similarly, while n-bit Decoders are primarily thought of as n-bit binary to 1 of 2n code converters or as Demultiplexers, they can also be used to implement Boolean functions of n variables. 1 Multiplexers Used in Boolean Functions Consider the following truth table that describes a function of 4 Boolean variables. A B C D F 0 0 0 0 0 0 0 0 1 0 0 0 1 0 1 0 0 1 1 1 0 1 0 0 0 0 1 0 1 1 0 1 1 0 0 0 1 1 1 1 1 0 0 0 0 1 0 0 1 0 1 0 1 0 1 1 0 1 1 1 1 1 0 0 0 1 1 0 1 0 1 1 1 0 0 1 1 1 1 1 MUX 16:1 0 1 2 3 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 G 0 15 F Vcc D C B A } Figure 1: A 16 to 1 Multiplexer Implementation A 16 to 1 Multiplexer with A, B, C, and D applied to its S3, S2, S1, and S0 inputs respectively would select one of its 16 inputs for each of the 16 possible combinations of A, B, C, and D. We can implement the function described by the truth table by connecting a voltage source for logic level 1 or ground for a logic level 0 to each of the Multiplexer inputs corresponding to the required value of the function associated with the combination of A, B, C, and D that selected the input. Therefore, the inputs to the Multiplexer will be the same as the F entries in the truth table provided A, B, C, and D are connected to the Multiplexer select inputs in the right order. Consider what happens when, instead of using a 16 to 1 Multiplexer, we use an 8 to 1 Mux. If we choose to connect A, B, and C to the inputs of the Multiplexer, then for each combination of A, B and C, ECE 241 Logic Circuit Lab Lab #4; Page 2/11 Spring 2007 although only one Mux input is selected, we need to realize two potentially different values of F. If they are different, they will be functions of D (either D or D). To see this, we partition the truth table into sections where A, B and C have the same value. This is shown in Figure 2. A B C D F 0 0 0 0 0 0 0 0 0 1 0 0 0 1 0 1 1 0 0 1 1 1 0 1 0 0 0 D 0 1 0 1 1 0 1 1 0 0 D 0 1 1 1 1 1 0 0 0 0 0 1 0 0 1 0 1 0 1 0 1 1 1 0 1 1 1 1 1 0 0 0 0 1 1 0 1 0 1 1 1 0 0 D 1 1 1 1 1 Vcc D A B C F MUX 8:1 0 1 2 0 1 2 3 4 5 6 7 G0 7} Figure 2: An 8 to 1 Multiplexer Implementation This idea can be extended to a 4 to 1 Mux implementation. In this case we partition the table into sections for which A and B have the same value. This is shown in Figure 3. Now Multiplexer inputs will be either 1, 0 or some function of C and D. K-maps may be used to simplify the functions of C and D for each of the table partitions, but in the case of two variables, the functions are usually obvious. The final possibility, shown in Figure 4, is a 2 to 1 Mux implementation. In this case only A is used as a select input and the table is partitioned into two parts based on A. Inputs to the Mux will be functions of B, C and D. Here it is more likely that you will need to use K-maps to simplify the functions. It should be apparent that there is no explicit importance to the order of A, B, C and D in the truth table. If we rearranged them, we would have chosen different variables as Mux select inputs, and we might end up using less logic in the rest of the circuit. Consider rearranging the table so that B is the Mux select input. Using this approach, the realization shown in Figure 5 uses less hardware. 2 Decoders Used in Boolean Functions For an n-bit to 2n Decoder, the only output asserted is the one corresponding to the decimal value of the binary number presented to the n inputs. Another way to state this is to say that each Decoder output represents one of the 2n minterms of n variables. Thus, a Decoder can be used to implement a function
  • 2. ECE 241 Logic Circuit Lab Lab #4; Page 3/11 Spring 2007 A B C D F 0 0 0 0 0 0 0 0 1 0 C 0 0 1 0 1 0 0 1 1 1 0 1 0 0 0 0 1 0 1 1 D 0 1 1 0 0 0 1 1 1 1 1 0 0 0 0 1 0 0 1 0 C 1 0 1 0 1 1 0 1 1 1 1 1 0 0 0 1 1 0 1 0 CD 1 1 1 0 0 1 1 1 1 1 0 1 0 1 2 3 G 0 3 MUX 4:1 F A B C D C C D } Figure 3: A 4 to 1 Multiplexer Implementation of n variables simply by connecting the outputs of the Decoder that correspond to the minterms of a function to a multi-input OR gate. Consider the Decoder circuit shown in Figure 6 which implements two separate functions of three variables. Notice that we have used a 74138 3-to-8 Decoder. As in most Decoders, the outputs are asserted low. This allows us to use NAND gates to implement the minterm sums. We can see that, unlike Multiplexers, Decoders can be used to implement more than one Boolean function at a time. On the other hand, a Multiplexer implementation may not require any external cir- cuitry, while a Decoder circuit always needs external gates. 3 Seven-Segment Displays A Seven-Segment display consists of seven LEDs arranged in a “figure 8,” as shown in Figure 7. Lighting combinations of the LEDs allows one to display various symbols. To display the symbol 0, we light segments A, B, C, D, E and F. Lighting segments B and C produces the symbol 1. Because it is a common anode display, to select a Seven-Segment display a high voltage is applied to the corresponding anode (A1-A4 on the Digilab Board). Individual LED segments are lit by taking the inputs (the cathodes CA-CG, DP) associated with the segment low. Important Note - The seven segment LED’s are active low, meaning you will have to drive the seg- ment low on the CA - CG, DP pins low in order to light up the LED segments. Example - if CA = 0, then segment A will light up. ECE 241 Logic Circuit Lab Lab #4; Page 4/11 Spring 2007 A B C D F 0 0 0 0 0 0 0 0 1 0 0 0 1 0 1 BC +BD 0 0 1 1 1 0 1 0 0 0 0 1 0 1 1 0 1 1 0 0 0 1 1 1 1 1 0 0 0 0 1 0 0 1 0 1 0 1 0 1 BC +CD 1 0 1 1 1 1 1 0 0 0 1 1 0 1 0 1 1 1 0 0 1 1 1 1 1 F MUX 2:1 A 0}G 0 1B D B C C D 0 1 Figure 4: A 2 to 1 Multiplexer Implementation Also, in order to select the particular 7 segment group, the common Anodes A1 - A4 must be driven by Vcc, meaning you will have to connect the A1 - A4 pins to the FPGA and pull them up internally through an IO Buffer in your schematic entry. 4 Preliminary Exercise (5) Design a binary to 7-segment code converter for use in displaying a hexadecimal representation of a 4-bit binary number. (Use lowercase for ‘b’ and ‘d’.) You may use multiplexers and decoders in your design, as you feel appropriate, as well as primitive gates (e.g., nand gates). Turn in a copy of your complete design, with necessary documentation, at the start of your lab session. (Written neatly by hand is fine.) 5 Experiment (10) 1. Implement the code converter you designed. Feel free to use components from the Xilinx library. 2. Perform a pre- or post-synthesis simulation of your design. 3. Assign pins to connect your design to switches and displays as needed, by creating a UCF file. Download your design into the FPGA and demonstrate the functionality to the instructor or TA. Obtain a signature for your report cover page or the design summary page.
  • 3. ECE 241 Logic Circuit Lab Lab #4; Page 5/11 Spring 2007 B C D A F 0 0 0 0 0 0 0 0 1 0 0 0 1 0 0 C 0 0 1 1 0 0 1 0 0 1 0 1 0 1 1 0 1 1 0 1 0 1 1 1 1 1 0 0 0 0 1 0 0 1 0 1 0 1 0 1 D(A+C) 1 0 1 1 0 1 1 0 0 0 1 1 0 1 0 1 1 1 0 1 1 1 1 1 1 F MUX 2:1 0}G 0 1 0 1 B C C A D Figure 5: Another 2 to 1 Multiplexer Implementation 6 Report (5) Turn in a brief, professional report summarizing your experience. Include your design schematics, any simulations that you performed, and the design summary page. 0 1 2 3 4 5 6 7 1 2 4A B C BIN/OCT F2 F1 F1(ABC) = ∑m(1,5,7), F2(ABC) = ∑m(0,3,4) Figure 6: A Decoder Circuit ECE 241 Logic Circuit Lab Lab #4; Page 6/11 Spring 2007 DP A E F DP B G D C CA A1 CB CC CD CE CF CG Figure 7: Seven Segment Display