Lab 08 - Magnitude Comparator
Lab 08 - Magnitude Comparator
Late Submission Cutoff Date (with late penalties): Saturday 11:59pm of the same week.
Objective
Equipment Needed
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)
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.
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.