0
25kviews
Design a two bit digital comparator and implement using basic logic gates.
1 Answer
written 3.9 years ago by |
Comparator:-
2-bit Comparator:-
Inputs | Outputs | |||||
---|---|---|---|---|---|---|
A1 | A0 | B1 | B0 | A > B | A = B | A < B |
0 | 0 | 0 | 0 | 0 | 1 | 0 |
0 | 0 | 0 | 1 | 0 | 0 | 1 |
0 | 0 | 1 | 0 | 0 | 0 | 1 |
0 | 0 | 1 | 1 | 0 | 0 | 1 |
0 | 1 | 0 | 0 | 1 | 0 | 0 |
0 | 1 | 0 | 1 | 0 | 1 | 0 |
0 | 1 | 1 | 0 | 0 | 0 | 1 |
0 | 1 | 1 | 1 | 0 | 0 | 1 |
1 | 0 | 0 | 0 | 1 | 0 | 0 |
1 | 0 | 0 | 1 | 1 | 0 | 0 |
1 | 0 | 1 | 0 | 0 | 1 | 0 |
1 | 0 | 1 | 1 | 0 | 0 | 1 |
1 | 1 | 0 | 0 | 1 | 0 | 0 |
1 | 1 | 0 | 1 | 1 | 0 | 0 |
1 | 1 | 1 | 0 | 1 | 0 | 0 |
1 | 1 | 1 | 1 | 0 | 1 | 0 |
* Derive the boolean expressions for the required outputs.
The boolean equations are simplified by using K-Map
When A=B thenY=¯A1 ¯A0 ¯B1 ¯B0+¯A1 A0 ¯B1 B0+A1 A0 B1 B0+A1 ¯A0 B1 ¯B0=¯A1 ¯B1(¯A0 ¯B0 +A0 B0)+A1 B1(¯A0 ¯B0 +A0 B0)=(¯A1 ¯B1 +A1 B1)⋅(¯A0 ¯B0 +A0 B0)
The equations are simplified by using K-Map.
The circuit for A > B is as follows
The circuit for A = B is as follows