DLD Lab 5
DLD Lab 5
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.
LAB MANUAL
DIGITAL LOGIC DESIGN
PROCEDURE:
Using IC:
Take Training Kit IDL-800 and apply power supply to it.
Carry out the pin configuration of 74LS85 IC.
Connect inputs A & B to two switches and outputs to three LEDs.
Carry out different combinations with the switches and fill the observation table.
Secondly connect the inputs related to binary numbers A to four switches and the inputs
related to input B to other four switches.
Connect inputs A<B, A=B, A>B to ground.
Connect outputs A<B, A=B, A>B to three LEDs.
With the switches compose all combinations between A & B and verify the comparator
operations.
Using Module KL-33002:
(a) Comparator Constructed with Basic Logic Gates
1. Insert connection clips according to Fig. 2-16 (a), U3a, U3b, U3c, U4a, U4b, U4c and U5 will
be used to construct the 1-bit comparator shown in fig. 2-16 (b).
2. The inputs are triggered by high state voltage. Connect inputs A and B to Data Switch SW1
and SW2. The outputs are triggered by low state voltage. Connect outputs F1, F2, F5 to Logic
Indicators L1, L2, and L3 respectively.
3. Follow the input sequence in table 2-10. Measure and record the outputs.
2. Connect input A>B to SW1 and F1; A=B to SW2 and F2; A<B to SW3 and F3. Connect inputs
A1-A4 and B1-B4 of 7485 to the output of Thumbwheel Switches on KL-31001.
3. Assuming inputs A1-A4=As and B1-B4=Bs and As=Bs, Follow input sequences in Table 2-
11 and record the outputs.
REVIEW QUESTIONS: