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.

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.

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.. Although in trying to figure out how to display this I found this.

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?

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.

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.

I might have um, misunderestimated your problem Assuming a 4 input truth table c0 c1 d0 d1 using this site http://tma.main.jp/logic/index_en.html Where a=c0 b=c1 c=d0 d=d1 Then I only see four matches 0000 0101 1010 1111 No? Result: http://tma.main.jp/logic/logic.php?...&07=0&08=0&09=0&0a=1&0b=0&0c=0&0d=0&0e=0&0f=1