Question

Design a combinational circuit that compares two 4-bit unsigned numbers A and B

Design a combinational circuit that compares two 4-bit unsigned numbers A and B to see whether B is greater than 2A. The circuit has one output X, so that:
X = 1 if 2A < B, and
X = 0 if 2A >= B.
Please de descriptive and detailed in drawing.


The book we are using in class is this: http://www.cramster.com/logic-and-computer-design-fundamentals-4th-solutions-3631 and we are on chapter 4.
0 0
Add a comment Improve this question Transcribed image text
Answer #1
<p>First start by writing all possibilities of A and B such that 2A &lt; B, where A and B both lie between o and 15 because it four bit, unsignednumber. Let first list how many possibilities of A are possible for each of value of B.<br /><br />B A<br />1 0<br />2 0<br/>3 0, 1<br />4 0, 1<br />5 0, 1, 2<br />6 0,1, 2<br />7 0, 1, 2, 3<br />8 0, 1, 2, 3<br />9 0, 1, 2, 3, 4<br/>10 0, 1, 2, 3, 4<br />11 0, 1, 2, 3, 4, 5<br />12 0, 1, 2, 3, 4, 5<br />13 0, 1, 2, 3, 4, 5, 6<br />14 0, 1, 2, 3, 4, 5,6<br />15 0, 1, 2, 3, 4, 5, 6, 7<br /><br />Now, lets denote A and B by four bits value (abcd)<sub>2 </sub>and(efgh)<sub>2</sub> respectively. So from the above table we get:</p>
<p>Y = a'b'c'de'f'g'h' + a'b'cd'e'f'g'h' + ... and this is freaking long.</p>
<p>&#160;</p>
<p>OR</p>
<p>&#160;</p>
<p>Assuming you've already got a full subtractor circuit designed, it'll have two outputs: answer, and borrow out, and 3 inputs: A, B, and borrowin.<br /> <br /> Use 4 subtractors, one for each bit, with the borrow output from the least significant subtractor wired to the borrow input ofthe second least significant subtractor, etc.<br /> <br /> If the borrow output of the most significant subtractor is set (1), then you knowthat A minus B is a negative number, therefore A &lt; B. If A=B or A&gt;B, the borrow output will be 0.</p>
Add a comment
Answer #2
<p>First start by writing all possibilities of A and B such that 2A &lt; B, where A and B both lie between o and 15 because it four bit, unsignednumber. Let first list how many possibilities of A are possible for each of value of B.<br /><br />B A<br />1 0<br />2 0<br/>3 0, 1<br />4 0, 1<br />5 0, 1, 2<br />6 0,1, 2<br />7 0, 1, 2, 3<br />8 0, 1, 2, 3<br />9 0, 1, 2, 3, 4<br/>10 0, 1, 2, 3, 4<br />11 0, 1, 2, 3, 4, 5<br />12 0, 1, 2, 3, 4, 5<br />13 0, 1, 2, 3, 4, 5, 6<br />14 0, 1, 2, 3, 4, 5,6<br />15 0, 1, 2, 3, 4, 5, 6, 7<br /><br />Now, lets denote A and B by four bits value (abcd)<sub>2 </sub>and(efgh)<sub>2</sub> respectively. So from the above table we get:</p>
<p>Y = a'b'c'de'f'g'h' + a'b'cd'e'f'g'h' + ... and this is freaking long.</p>
<p>&#160;</p>
<p>OR</p>
<p>&#160;</p>
<p>Assuming you've already got a full subtractor circuit designed, it'll have two outputs: answer, and borrow out, and 3 inputs: A, B, and borrowin.<br /> <br /> Use 4 subtractors, one for each bit, with the borrow output from the least significant subtractor wired to the borrow input ofthe second least significant subtractor, etc.<br /> <br /> If the borrow output of the most significant subtractor is set (1), then you knowthat A minus B is a negative number, therefore A &lt; B. If A=B or A&gt;B, the borrow output will be 0.</p>
answered by: Lyly
Add a comment
Know the answer?
Add Answer to:
Design a combinational circuit that compares two 4-bit unsigned numbers A and B
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