• Support PF! Buy your school textbooks, materials and every day products Here!

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

  • Thread starter esalihm
  • Start date
90
0
[SOLVED] can u make "if A>=B then output=1 Else output=0" using these logic gates?

1. 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 :))

2. Homework Equations

no equations, just boolean logic

3. The Attempt at a Solution

tried using some different arrangements but can't really find one that works
 
Last edited:

Answers and Replies

90
0
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)
 
412
2
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:

[tex]
C = \overline{A}~\overline{B} + A\overline{B} + AB[/tex]

[tex]
C = A + \overline{A}~\overline{B}
[/tex]

So, you get,

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

or:

http://img89.imageshack.us/img89/6882/pflogicxbt7.jpg [Broken]
 
Last edited by a moderator:
nicksauce
Science Advisor
Homework Helper
1,272
5
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?
 
412
2
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.
 
90
0
thanks, that helps a lot
(the inputs are one bit each, either high (1) or low(0) )
 
Last edited:
90
0
hey rohanprabhu, what program did u use to make that drawing?
 
412
2
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.
 

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

  • Last Post
Replies
3
Views
4K
  • Last Post
Replies
4
Views
8K
  • Last Post
Replies
4
Views
2K
  • Last Post
Replies
1
Views
2K
  • Last Post
Replies
0
Views
2K
  • Last Post
Replies
1
Views
7K
  • Last Post
Replies
1
Views
572
  • Last Post
Replies
2
Views
1K
Top