DSM Practical 3
DSM Practical 3
(Batch-A1)
Aim:
To implement 4-bit, 5-bit and 8-bit comparators using given MSI.
Software Used:
Proteus 8 by Labcenter Electronics.
Theory:
Comparators: -
Comparators are the combinational digital circuits that are used to compare two
n-bit numbers. A comparator consists of 3 outputs which indicate whether a
number is greater than, smaller than or equal to another number. Given below
is a block diagram of an n-bit comparator: -
A B
n-bit
comparator
Comparators can be made with the help of logic gates; however, IC circuits can
be used directly to make the process fast and efficient. The IC of 4-bit
magnitude comparator is available which can be used to make higher bits
comparator.
In the IC of a 4-bit magnitude comparator, other than the 8 inputs that are
reserved for two 4-bit numbers, there are three more inputs which are known
as cascading inputs. These inputs basically make it possible to use 4-bit
comparators to compare two numbers with higher number of bits.
Procedure:
1. In the workspace, add the logic toggle and logic probe devices for inputs
and outputs respectively.
2. Place all the equipments as required to obtain a proper circuit for
respective comparators.
3. In case of a 1-bit magnitude comparator, use the required gates directly
and make proper connections with the help of wires.
4. In case of a 4-bit comparator, connect the A=B cascading input to logic ‘1’
and connect A>B, A<B cascading inputs to logic ‘0’.
5. In case of 5-bit and 8-bit comparators, connect the cascading inputs to the
appropriate bits/outputs to get the correct circuit.
6. Verify the correctness of the designed circuits by taking different
combinations of the inputs.
Results/Observations:
A] 1-bit Comparator
Truth Table: -
Inputs Outputs
A B A>B A=B A<B
0 0 0 1 0
0 1 0 0 1
1 0 1 0 0
1 1 0 1 0
B] 4-bit Comparator
Figure-5: 4-bit comparator using IC showing A=B
Figure-8: 5-bit comparator using 7485 IC and an XNOR gate showing A=B
Figure-9: 5-bit comparator using 7485 IC and an XNOR gate showing A>B
Figure-10: 5-bit comparator using 7485 IC and an XNOR gate showing A<B
D] 8-bit Comparator
Figure-11: 8-bit comparator using two 7485 ICs showing A=B