Experiment No: 06 Experiment Name
Experiment No: 06 Experiment Name
Experiment No: 06 Experiment Name
Introduction:
A digital Comparator is a combinational logic circuit that compare two binary number and
generates an output that indicates whether the number are equal or which one is greater or
less. Now shows the logic diagram of an n- bit comparator.
In this experiment, we will discuss the function of 3-bit comparator and implement of logic
circuit. A 3- bit comparator compare two three bits numbers, A and B, and produces an
output indicating whether A>B, or A+B, or A<B Suppose A= A2A1A0 and B= B2B1B0 .For this 3-
bit comparator the truth table will be large (26=64 rows). That is why instead of using truth
table, the expression for A>B, A=B, A<B are derived in the following way.
Apparatus:
A B C O0 O1 O2 O3 O4 O5 O6 O7
0 0 0 1 0 0 0 0 0 0 0
0 0 1 0 1 0 0 0 0 0 0
0 1 0 0 0 1 0 0 0 0 0
0 1 1 0 0 0 1 0 0 0 0
1 0 0 0 0 0 0 1 0 0 0
1 0 1 0 0 0 0 0 1 0 0
1 1 0 0 0 0 0 0 0 1 0
1 1 1 0 0 0 0 0 0 0 1
Table :1
Implementation:
To construct the output expression of O0, O1, O2, O3, O4, O5, O6, O7 we need three AND gate
and one NOT gate.
1. To get output expression of A̅ B̅C̅ we put the A, B, C in NOT gate input and take
output and AND them.
2. In O2, O3 there is a common part that’s is A̅ B̅ . so, we first construct A̅ B̅ and 1st
ANNED C to get O3, then anned C̅ to get O2
3. In similar O4, O5, there is also a common part that’s is AB̅ . so, we first construct AB̅
and 1st ANNED C to get O5, then anned C̅ to get O4 .
4. In similar process we get the all the remaining outputs. In bellow diagram I slow the
implementation.
Discussion:
1. The experimental result of the implementation is same as the truth table of binary
to gray code converter.
2. We were very careful while putting the wire into correct point in the breadboard .