0% found this document useful (0 votes)
20 views3 pages

Lab 08 - Magnitude Comparator

Uploaded by

engmanalf98
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
20 views3 pages

Lab 08 - Magnitude Comparator

Uploaded by

engmanalf98
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

Digital Logic Design

Lab 8: Magnitude Comparator

Due Date: 11:59pm on the day of the experiment.

Late Submission Cutoff Date (with late penalties): Saturday 11:59pm of the same week.

Objective

To design and implement a magnitude comparator.

Equipment Needed

1. Power Supply (presented in Lab 1)


2. Logic Probe / LED (presented in Lab 1)
3. DIP Switches with 10K Ohm pull-down resistor
4. 74LS85 Magnitude Comparator IC
5. 3 LEDs with resistors

Task – A (To be completed in Simulation only)

1. You are required to design a 2-bit magnitude comparator as shown in the figure below. It takes two 2-bit
numbers A and B, and produces three output, A=B, A<B, A>B.
2. Create a truth-table for the 2-bit comparator as given below.
3. One way to create a 2-bit comparator is to combine two 1-bit comparators in an appropriate circuit as
discussed in the lectures.
4. Draw the circuit of the 2-bit comparator using NOT, AND, OR, NOR ICs.
5. Connect the DIP switches to the 4 inputs along with the pull-down resistors.
6. Connect three LEDs to the output, RED for A<B, GREEN for A=B, and YELLOW for A>B. Do not forget to use
the associated resistors for limiting the current through the LED.
7. Giving different inputs, verify the truth table created in the above steps.
8. Take a scan/picture of truth tables and include this scan in your lab report.
9. Include pictures of the simulation in your lab report showing all three possible outputs.
Inputs Outputs
A1 A0 B1 B0 E (A=B) G (A>B) L (A<B)

Task – B (To be completed in Hardware

10. The 74LS85 is an IC which compares two 4-bit numbers. Read the datasheet and search online for example
circuits for each IC.
11. The task is to create a comparator which compares two 4-bit numbers.
12. Use eight DIP switches for inputs and LEDs for output to verify if the IC works as expected or not.
13. Include a picture of the hardware in your lab report.

Procedure for Task B

1. Find the datasheets of the 74LS85 IC magnitude comparator. As an example, 74LS08


https://www.futurlec.com/74LS/74LS08.shtml
2. Use the datasheet to confirm the pin diagram of the IC, its function table, and operating conditions such as
typical value of VCC and its absolute maximum ratings. Ensure that your operating conditions are within the
limits given in the datasheets.
3. Place the ICs on the breadboard.
4. Patch the circuit according to the datasheet.
5. Connect 8 switches to act as inputs, using the pull-down resistors. Connect 3 LEDs along with the resistors.
6. Connect +5V and GND to the IC.
7. Connect power supply to the breadboard and turn it ON.
8. Change the switches to give binary inputs. Observe the outputs. Do they match your expected output?.
9. For the lab report, take a picture of the hardware (including IC, Switches, and LEDs) providing evidence that
the comparator work as expected.
Lab Report

1. Prepare your report on an MS Word file. Do not forget to write your Name and student number.
2. Change the layout orientation of your Word File to ‘Landscape’ so that large sized pictures could be inserted
in the file.
3. If the experiment uses hardware, then use your smartphone to take a picture of the complete circuit in
working condition.
a. Give different inputs to the circuit and take pictures that show both the inputs and the outputs.
b. Include as many pictures as necessary to show the working of the circuit.
4. If the experiment uses a simulator, then take screenshots of the whole screen.
a. The screenshot must cover the whole screen and it should include the simulator window, along with
the time and date shown by Windows at the bottom of the screen.
b. Include as many screenshots as necessary to show the working of your simulation.

You might also like