Anyone have knowledge of Gates, Circuits, Logic Diagrams, and Boolean Expressions??????

Discussion in 'Off Topic Area' started by nightpoison, Oct 23, 2014.

  1. nightpoison

    nightpoison New Member

    Joined:
    Sep 8, 2014
    Messages:
    19
    Likes Received:
    1
    Trophy Points:
    3
    anyone out there have an understanding of Gates & Circuits, and can help comparing two 2bit numbers to design a circuit or Boolean expression? It has been 16 years since I last set foot in a classroom. I've been working retail, management, for the last 10 years. It I had enough, it was time to go back to school. So I enrolled at Salem State and I'm back in school, looking to finish the degree I started. So I'm getting my degree in Computer Science and we are currently working with Gates, Circuits, Logic diagrams, and Boolean expressions.

    I figured out the two bit problems fine, I even felt confident figuring out the three bit issue. But I'm struggling with two 2 bit problems. Here's the problem I'm currently working on. Any help would be great.

    "Design a circuit that compares two 2 bit values for equality. That is, given values C and D, where C has two bits c1 and c0, & D has two bits d1 and d0. the output X, should be 1 if and only if C==D"

    if anyone can post the boolean expression or logic diagram that would be great. I'll be about to work backwords and figure out how it was designed and why. A little explanation would help.

    Thanks guys.
     
  2. sharpuser

    sharpuser Super Moderator Staff Member

    Joined:
    Aug 20, 2013
    Messages:
    2,851
    Likes Received:
    1,030
    Trophy Points:
    113
    Location:
    Pacific Northwest & China
    My Device:
    Surface Book
    This is the XNOR logic.
    (c1⊙c0)⋅(d1⊙d0)

    An alternate involves subtracting C from D or D from C.. If C and D are equal, the subtraction results in 0.
    (To subtract C from D, reverse all bits of C (twos complement) then add to D.
     
  3. GreyFox7

    GreyFox7 Super Moderator Staff Member

    Joined:
    Jul 27, 2014
    Messages:
    6,334
    Likes Received:
    1,279
    Trophy Points:
    113
    CD + ~C~D normally Id write that with CD and an overbar
    (c And d) Or ((Not c) And (Not d))

    Better check my work :) haven't done this in years..

    logic.PNG

    Although in trying to figure out how to display this I found this.
     
  4. nightpoison

    nightpoison New Member

    Joined:
    Sep 8, 2014
    Messages:
    19
    Likes Received:
    1
    Trophy Points:
    3
    wow thank you both. I appreciate it. I understand looking at the expression and logic diagram, I just need to figure out how to come up with the results on my own.

    any idea how it would change if C & D were Signed Magnitude 2bit numbers?
     
  5. sharpuser

    sharpuser Super Moderator Staff Member

    Joined:
    Aug 20, 2013
    Messages:
    2,851
    Likes Received:
    1,030
    Trophy Points:
    113
    Location:
    Pacific Northwest & China
    My Device:
    Surface Book
    Does not matter whether numbers are signed or not. You just care whether the 1s and 0s of C or D are the same, and don't care about the context of C or D.
     
  6. nightpoison

    nightpoison New Member

    Joined:
    Sep 8, 2014
    Messages:
    19
    Likes Received:
    1
    Trophy Points:
    3
    Sharp, when I created the truth table for your equation I ended up getting 1 as an output for four of the six I need. when the inputs are 1111 or 0000, it outputs 0. Wouldn't the problem need to be have those outputs as 1 as well.

    Grey when I put your expression in a truth table I don't get 1 only on matched inputs. for instance. 0001 and 0100 output 1 as well.

    both of you thank you for your help.
     
  7. GreyFox7

    GreyFox7 Super Moderator Staff Member

    Joined:
    Jul 27, 2014
    Messages:
    6,334
    Likes Received:
    1,279
    Trophy Points:
    113
  8. nightpoison

    nightpoison New Member

    Joined:
    Sep 8, 2014
    Messages:
    19
    Likes Received:
    1
    Trophy Points:
    3
    no your correct. I did the truth table incorrect. thank you
     
  9. GreyFox7

    GreyFox7 Super Moderator Staff Member

    Joined:
    Jul 27, 2014
    Messages:
    6,334
    Likes Received:
    1,279
    Trophy Points:
    113
    Then the other site gives you (a hard to read) logic circuit.
    It's a bit picky on the syntax :)
     

Share This Page