You are on page 1of 5

LAB EXPERIMENT NO # 05

Name: Date: _________________________

Score: Signature of Instructor

COMPARATOR
OBJECTIVE: Upon successful completion of this experiment, the student will be able:
 To implement and verify Comparator operations using,
 74LS85 IC,
 Module KL-33002
EQUIPMENT:
 Training kit IDL-800
 KL-31001 Digital Logic Lab
 Module KL-33002
COMPONENTS:
 74LS85 IC (Comparator IC)
 Connecting Wires, Hard Wires
5.1 COMPARATOR:
Comparator is a combinational logic circuit that compares two input binary numbers and signals
if the two numbers are equal, or if one is higher than the other. The basic function of comparator
is to compare the magnitude of two quantities to determine the relationship of those quantities. A
binary comparator usually has three outputs: A=B, A>B, A<B. A 1-bit comparator compares two
1-bits (A & B) and determines whether they are “greater than” or “less than” or “equal to” each
other by a high level on the appropriate output. As the outputs exclusively depend on the
temporary inputs, the circuit is composed by logic gates. The logic symbol and logic diagram for
1-bit comparator as shown in fig 5.1 (a & b)

Fig 5.1: (a) Logic Symbol (b) Logic symbol for 1-bit Comparator

74LS85 COMPARATOR IC: The TTL 74LS85 IC is a four bit magnitude comparator which
will perform comparison of two 4-bit binary numbers. The pin configuration of IC is shown in
fig 5.2. This IC consists of eight comparing inputs (A0, A1, A2, A3, B0, B1, B2, B3), three
cascading inputs (A>B, A<B and A=B). This device compares two 4-bit words (A & B) and
determines whether they are “greater than”,” less than” or “equal to” each other by a high level
on the appropriate output. For words greater than 4-bits, units can be cascaded by connecting the
outputs (A>B, A<B and A=B) of the least significant stage to the cascaded inputs (A>B, A<B
and A=B) of the next significant stage. In addition the least significant stage must have a high
level (Vin (1)) applied to the A=B input and low level voltage (Vin (0)) applied to A>B and A<B
inputs.

 With the switches compose all combinations between A & B and verify the comparator operations. U3b. 2-16 (b). U4a. Department of Electrical Engineering SUKKUR IBA Summer 2014 . U4c and U5 will be used to construct the 1-bit comparator shown in fig. Insert connection clips according to Fig. U3a. A=B.  Secondly connect the inputs related to binary numbers A to four switches and the inputs related to input B to other four switches.  Connect outputs A<B. Using Module KL-33002: (a) Comparator Constructed with Basic Logic Gates 1. 2-16 (a). A>B to ground.  Carry out the pin configuration of 74LS85 IC.2: 74LS85 Magnitude Comparator IC pin configuration OBSERVATION TABLE: INPUT OUTPUT A B A>B A=B A<B PROCEDURE: Using IC:  Take Training Kit IDL-800 and apply power supply to it. U3c. A>B to three LEDs.  Carry out different combinations with the switches and fill the observation table.  Connect inputs A<B.LAB MANUAL DIGITAL LOGIC DESIGN Fig 5. A=B. U4b.  Connect inputs A & B to two switches and outputs to three LEDs.

F2. L2. and L3 respectively. Measure and record the outputs. Connect inputs A and B to Data Switch SW1 and SW2. Connect outputs F1. F5 to Logic Indicators L1. 3. The inputs are triggered by high state voltage. The outputs are triggered by low state voltage. Department of Electrical Engineering SUKKUR IBA Summer 2014 .LAB MANUAL DIGITAL LOGIC DESIGN 2. Follow the input sequence in table 2-10.

Follow input sequences in Table 2- 11 and record the outputs. Block d of module KL-33002 will be used in this section. Department of Electrical Engineering SUKKUR IBA Summer 2014 .LAB MANUAL DIGITAL LOGIC DESIGN (b) Comparator Constructed with TTL IC 1. Connect input A>B to SW1 and F1. A<B to SW3 and F3. What is the basic function of Comparator? Ans : Its basic function is to compare magnitude of two quantities to determine relationship of those quantities. A=B to SW2 and F2. Its pin assignment and truth table are given below. Connect inputs A1-A4 and B1-B4 of 7485 to the output of Thumbwheel Switches on KL-31001. U6 is a 7485 4-bit Comparator IC. Assuming inputs A1-A4=As and B1-B4=Bs and As=Bs. What are the applications of Comparator? Ans: It is used in every that application where comparison of variables is required. 2. REVIEW QUESTIONS: 1. 3. 2.

What is the function of cascading inputs of 74LS85 IC? Ans: cascaded inputs are the outputs of previous comparator.  Keep all the equipment and material to their proper storage area. Draw the block diagram for an 8-bit comparator using two 748LS5 ICs? ______________________________________________________________________________ ______________________________________________________________________________ HAND IN:  Clean your equipment/ materials before you leave. Department of Electrical Engineering SUKKUR IBA Summer 2014 .  Submit your answers to questions. 4.LAB MANUAL DIGITAL LOGIC DESIGN 3. together with your data. calculations and results before the next laboratory.