Can u make if A>=B then output=1 Else output=0 using these logic gates?

  • Thread starter Thread starter esalihm
  • Start date Start date
  • Tags Tags
    Logic Logic gates
Click For Summary

Homework Help Overview

The discussion revolves around designing a comparator circuit that outputs 1 if A is greater than or equal to B, and 0 otherwise, using specific logic gates (NAND, AND, NOR, OR, and Exclusive OR). The context is practical electronics, as the original poster is working on a device that requires this functionality.

Discussion Character

  • Exploratory, Problem interpretation, Assumption checking

Approaches and Questions Raised

  • Participants discuss various attempts to create the desired logic using the specified gates, with one participant noting the completion of the "equal to" part and seeking assistance for the "greater than" aspect. Others suggest using truth tables and Karnaugh maps for circuit design.

Discussion Status

The conversation is ongoing, with participants providing insights and clarifications about the inputs being one-bit values. There is no explicit consensus yet, but some productive directions have been suggested regarding circuit design methods.

Contextual Notes

Participants are working under the constraint of using only specific types of logic gates and are focused on practical implementation rather than theoretical equations.

esalihm
Messages
90
Reaction score
0
[SOLVED] can u make "if A>=B then output=1 Else output=0" using these logic gates?

Homework Statement



this is not quite a homework problem. I am designing a device and I need to use A>=B comparator.

The challenge is I need to do this using only NAND, AND, NOR, OR and ExclusiveOR gates. Because these are all we have at the electronics laboratory.

This might look like a computer science problem at first. But I have to make this using actual gates, cables and LEDs. (Hence, this is electronics :))

Homework Equations



no equations, just boolean logic

The Attempt at a Solution



tried using some different arrangements but can't really find one that works
 
Last edited:
Physics news on Phys.org
hi,

I have just got the equal to part completed. now I need the "greater than" part.

equal to is

A
EOR ==> NOT ==> (output)
B

(inputs A and B are going to the EOR gate)
 
The truth table of your gate is [C is the output]:

Code:
+---+---+---+
| A | B | C |
+---+---+---+
| 0 | 0 | 1 |
| 1 | 0 | 1 |
| 0 | 1 | 0 |
| 1 | 1 | 1 |
+---+---+---+

This logic can be given by:

<br /> C = \overline{A}~\overline{B} + A\overline{B} + AB

<br /> C = A + \overline{A}~\overline{B}<br />

So, you get,

A (OR) (!A (AND) !B)

or:

http://img89.imageshack.us/img89/6882/pflogicxbt7.jpg
 
Last edited by a moderator:
How many bits are A and B? If they are small enough it wouldn't be that hard to write out the K-Map and find the circuit by brute force, would it?
 
nicksauce said:
How many bits are A and B? If they are small enough it wouldn't be that hard to write out the K-Map and find the circuit by brute force, would it?

from his second post, I'm guessing both inputs are 1-bit values only.
 
thanks, that helps a lot
(the inputs are one bit each, either high (1) or low(0) )
 
Last edited:
hey rohanprabhu, what program did u use to make that drawing?
 
esalihm said:
hey rohanprabhu, what program did u use to make that drawing?

it's made by hand.. in photoshop.. nothing automated. I used the gate images from wikipedia.
 

Similar threads

  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 3 ·
Replies
3
Views
5K
  • · Replies 25 ·
Replies
25
Views
5K
  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 5 ·
Replies
5
Views
5K
Replies
1
Views
3K
  • · Replies 12 ·
Replies
12
Views
3K
Replies
2
Views
2K
  • · Replies 4 ·
Replies
4
Views
3K
  • · Replies 10 ·
Replies
10
Views
5K