Question

A comparator circuit has two 1-bit inputs A and B and three 1-bit outputs G (greater),...

A comparator circuit has two 1-bit inputs A and B and three 1-bit outputs G (greater), E (equal), and L (less than). That is, G is 1 if A > B (0 otherwise), E is 1 if A == B (0 otherwise), and L is 1 if A < B (0 otherwise).
     
a. Draw the truth table for a 1-bit comparator (the table has 2 inputs and 3 outputs).

b. Implement G, E, and L circuits using only NAND and NOT gates.

c.Using the 1-bit comparator as a building block (that is, drawing it as a 2-input/3-output box), construct a four-bit equality checker, such that output EQUAL is 1 if A[3:0] == B[3:0], 0 otherwise.
0 0
Add a comment Improve this question Transcribed image text
Answer #1

a) The truth table for a 1-bit comparator:

A B G E L
0 0 0 1 0
0 1 0 0 1
1 0 1 0 0
1 1 0 1 0

(b) Implementation of G, E, L circuits using NAND and NOT gates:

Using above truth table and K-Map, G=AB' , E=A XNOR B, L=A'B

(c) Construction of 4 bit equality checker using 1 bit comparator as building block:

Suppose, two 4 bit binary number A=A3A2A1A0 and B=B3B2B1B0 and E is equlity output of A and B.

A=B only if E=E3E2E1E0 where Ei is equality output of Ai and Bi .

Here is the implementation of 4 bit equality checker:

Add a comment
Know the answer?
Add Answer to:
A comparator circuit has two 1-bit inputs A and B and three 1-bit outputs G (greater),...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT