1. Not finding help here? Sign up for a free 30min tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

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

  1. Mar 24, 2008 #1
    [SOLVED] can u make "if A>=B then output=1 Else output=0" using these logic gates?

    1. The problem statement, all variables and given/known data

    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. Relevant 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: Mar 24, 2008
  2. jcsd
  3. Mar 24, 2008 #2
    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)
     
  4. Mar 24, 2008 #3
    The truth table of your gate is [C is the output]:

    Code (Text):

    +---+---+---+
    | 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:

    [​IMG]
     
  5. Mar 24, 2008 #4

    nicksauce

    User Avatar
    Science Advisor
    Homework Helper

    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?
     
  6. Mar 24, 2008 #5
    from his second post, i'm guessing both inputs are 1-bit values only.
     
  7. Mar 24, 2008 #6
    thanks, that helps a lot
    (the inputs are one bit each, either high (1) or low(0) )
     
    Last edited: Mar 24, 2008
  8. Mar 24, 2008 #7
    hey rohanprabhu, what program did u use to make that drawing?
     
  9. Mar 24, 2008 #8
    it's made by hand.. in photoshop.. nothing automated. I used the gate images from wikipedia.
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?



Similar Discussions: Can u make if A>=B then output=1 Else output=0 using these logic gates?
  1. Logic gates ? (Replies: 4)

  2. Power output (Replies: 4)

Loading...