Docsity

Comparators-Digital Logic Design-Assignment Solution, Exercises of Digital Logic Design and Programming

Toggle sidebar
bg1
Comparators
Q: Compare two 2-bit numbers to find if one is less or greater than
the other.
Let A and B be two 2-bit numbers, such that:
A = A1A0 and B = B1B0
Let G be โ€˜>โ€™ and L be โ€˜<โ€™
In the following truth table G and L are assigned โ€˜1โ€™ if A is greater or less
than B respectively, Otherwise โ€˜0โ€™.
A1
A0
B1
B0
G
L
0
0
0
0
0
0
0
0
0
1
0
1
0
0
1
0
0
1
0
0
1
1
0
1
0
1
0
0
1
0
0
1
0
1
0
0
0
1
1
0
0
1
0
1
1
1
0
1
1
0
0
0
1
0
1
0
0
1
1
0
1
0
1
0
0
0
1
0
1
1
0
1
1
1
0
0
1
0
1
1
0
1
1
0
1
1
1
0
1
0
1
1
1
1
0
0
docsity.com
pf3

Partial preview of the text

Download Comparators-Digital Logic Design-Assignment Solution and more Exercises Digital Logic Design and Programming in PDF only on Docsity!

Comparators

Q: Compare two 2-bit numbers to find if one is less or greater than

the other.

Let A and B be two 2-bit numbers, such that:

A = A 1 A 0 and B = B 1 B 0

Let G be โ€˜>โ€™ and L be โ€˜<โ€™

In the following truth table G and L are assigned โ€˜1โ€™ if A is greater or less

than B respectively, Otherwise โ€˜0โ€™.

A 1 A 0 B 1 B 0 G L

K- Map for G :

00 m 0 m 1 m 3 m 2 01 m 4 1 m 5 m 7 m 6 11 m 12 1 m 13 1 m 15 m 14 1 10 m 8 1 m 9 1 m 11 m 10

If G = 1, then A is Greater than B.

Logic Diagram for G :