Lab 6 - Combinational Logic Modules - Decoders
Lab 6 - Combinational Logic Modules - Decoders
Lab 6 - Combinational Logic Modules - Decoders
Objective/s:
Equipment Required
Theory
1) Decoders
Decoder is a combinational circuit that converts certain coded inputs to another coded outputs.
Famous examples of decoders are binary n-to-2n decoders and seven-segment decoders. A binary
decoder has n inputs and a maximum of 2n outputs. As we know, an n-bit binary number provides 2n
minterms. This type of decoder produces one of these 2n minterms at the outputs, based on the
input combinations. The following table shows the block diagram and the truth table of an example
2-to-4 decoder.
From the truth table, you can observe the basic operation of n-to-2n decoders. For each input
combination, there is only one active output Di, which is an acronym of the minterm (mi). The module
has an active high Enable. Accordingly, it will not work unless the Enable is connected to logic 1.
An example of a commercial n-to-2n line decoder is the 74139 chip. This chip has two 2-to-4 decoders
with active low enable for each.
Any Boolean function can be expressed as a sum of products (or sum of minterms). A binary decoder
provides all the minterms as outputs. Therefore, any Boolean function could be implemented by ORing
its minterms (Di), which are generated by a decoder. For example, consider the full-adder circuit that
we discussed and designed in lab (4). The Boolean expressions for the outputs S and Cout (in terms of
the inputs x, y, and Cin) are:
The above expressions can be implemented by ORING the appropriate combination of output
minterms of a 3-to-8 decoder.
All decimal or hexadecimal numbers can be displayed by controlling the state of the appropriate
segments ON or OFF. This can be done using a seven-segment decoder. A seven-segment decoder
accepts four binary inputs. According to these inputs, it provides seven outputs that determines
which segments of the seven-segment LED display should be ON in order to create the
corresponding decimal or hexadecimal digits.
A widely used commercial common anode 7-segment decoder is the 7447 chip. This chip changes a
BCD number to its corresponding CA seven-segment code. The generated seven-segment code could
be used for displaying numbers from 0 to 9, based on the corresponding input BCD number. The
circuit that displays any input BCD number on a common anode 7-segment display is shown in the
following figure. Similar connection could be used for common cathode display. However, the 7447
decoder should be replaced by the 7448 one.
Equipment Required:
1) Software simulation: The Logisim software package is installed on every PC in the lab.
2) Hardware implementation: The following equipment are needed to perform all the procedures:
- IC Training Kit
- Jumper wire kit
- 1x 7447 BCD-TO-SEVEN SEGMENT DECODERS/DRIVERS
Procedures/Lab Work:
a) Software Simulation
1. Implementation of Boolean Functions using Decoders
2. Consider the following Boolean function. It is required to implement it using 3x8 decoder.
F (A, B, C) = A' B' C + A B' C' + A B C
3. Draw the circuit that implements the Boolean function in the area below. If necessary, have
your TA to check your implementation.
Answer:
1. Start a new Logisim project. Save the project with the name "7 segment display"
2. The 7-segment decoder is not a part of the built in Logisim modules. Therefore, we have to add
it to Logisim first. The 7 segment decoder is already implemented for you. You could find it
in the desktop under the name "7 segment decoder"
3. From the Project menu, select Load library/Logisim Library
4. Browse to the file "7 segment decoder" on the desktop, select it, and click Open. You will see
a new folder added to your explorer pane named "7 segment decoder"
5. From the "7 segment decoder" folder, select main and insert it into the canvas
6. From the Input/Output folder, select "7-segment display" and insert it into the canvas.
7. Insert 4 input pins to the canvas, to the left of the decoder, and name them A, B, C, and D,
respectively.
8. Connect A, B, C, and D to I3, I2, I1, and I0 of the decoder, respectively. To know the name of
any decoder input, stop the mouse over that input. A hint box will appear with the name of that
input. For example, the following figure shows the hint of decoder input I0.
11. Use the poke tool to verify the operation of the circuit. Enter different BCD numbers and
monitor the corresponding decimal digits on the 7 segment display. Fill in the following table
(i.e., color the segments that are ON)
Questions/Exercises:
1. Implement the following Boolean function using 3x8 decoder. Draw the circuit diagram and
simulate your design using Logisim to ensure its proper operation. Snapshots from Logisim
should be included in your report.
Reference(s)
1. Introduction to Logic Circuits & Logic Design with Verilog, 1st Edition, Brock J. LaMeres
2. Digital Design, 3rd Edition, M. Morris Mano
3. Digital Principles and Logic Design, A. Saba & N Manna
Experiment Title
Experiment No. _
I. Introduction
II. Objectives
VI. Conclusion