Professional Documents
Culture Documents
EE-272L
Lab # 8 Manual
Roll No
Marks Obtained
Date Performed
2. Learning Outcomes
This lab satisfies the following learning outcomes of the course:
• CLO1: Build digital circuits for open-ended, complex, and real-world applications.
• CLO2: Construct combinational and sequential logic circuits using model sim software.
4. Instructions
• There will be no concept of make-up labs. If missed, the lab may be performed later for practice and
knowledge required for the coming labs on your own and will be graded for partial marks unless there
is any valid reason.
• Plagiarism cases would be sent to the student disciplinary committee (SDC) without any prior
warnings.
Page | 1
Fall 2023 DLD Lab 08 Version 2.0
5. Introduction
5.1. Magnitude Comparator
A magnitude comparator is made up of standard gates to compare digital signals and produce output
depending on the condition of those signals. It generally has three results, one each for equality (A = B),
greater than (A > B), and less than (A < B).
Commercially available magnitude comparators, like the 7485 4–bit magnitude comparator, have
additional input terminals to allow more individual comparators to be cascaded together to form larger
than 4–bits width. The pin diagram of 7485 is shown in Fig. 1.
5.2. Multiplexer
A multiplexer is a combinational circuit that selects binary information from many input lines and directs
the data to a single output line. A particular input line selection is controlled by a set of input variables,
called selection inputs. Typically, there are 2 n input lines and n selection inputs whose bit combinations
determine selected input. Multiplexers with different inputs are available as discrete ICs. Following is a
brief list of ICs available:
Multiplexers can be implemented using a variety of ways in Verilog. It can be implemented using the
if...else if...else and case statements. Another way to implement multiplexers is using the conditional
operator ? : which can be used within and outside the always block. This operator takes three operands
[2]: Condition ? true-expression : false-expression;
If the evaluated condition results in logic 1, the true expression is evaluated and used to assign a value to
the left-hand side of an assignment statement. If the result is logic 0, the false expression is evaluated. A
simple conditional operator can implement a simple 2-to-1 line multiplexer, but multiple conditional
operators can be nested to allow larger multiplexers.
6. Procedure
6.1. Task 1: 8–bit Magnitude Comparator
Using the 4–bit magnitude comparator IC, 7485, construct an 8–bit magnitude comparator and implement
it on the trainer board. Think of reasons why cascading two 4–bit magnitude comparators results in a8–bit
magnitude comparator. It will be helpful if the following steps are followed:
Page | 2
Fall 2023 DLD Lab 08 Version 2.0
• Test the given 7485, the 4-bit magnitude comparator IC, to understand its functionality.
• Connect four switches with A3 . . . A0 and four switches with B3 . . . B0.
• Make Vcc and ground connections.
• Connect the three outputs to three LEDs.
• After verification, connect another 7485 IC and make the required connections.
Page | 3
Fall 2023 DLD Lab 08 Version 2.0
7. Observations and Conclusion
8. Submissions
You need to submit a hard copy of the manual.
References
[1]. Digital Design: With an Introduction to the Verilog HDL, by M. Morris Mano and Michael D. Ciletti,
5th Edition, Pearson, 2013.
Page | 4
Lab Rubrics
Marking Rubric