I am trying to create a binary adder. I have this truth table:

enter image description here

This is the Karnaugh map that I made for this function (see that there is a mistake: instead of c, it had to be "c-in"):

enter image description here

Now, as the map looks like that, it gives me that s = c + c but that is certainly false. Can anyone help me with this?

  • 1
    \$\begingroup\$ Erm, I see a^b^c... \$\endgroup\$ Oct 20, 2013 at 18:39
  • \$\begingroup\$ yeah, you-re right. that's how I found it on the website, but I don't know how to get it. please, post an answer with the explanation. I am student, and I haven't been working with this for a long time \$\endgroup\$
    – Victor
    Oct 20, 2013 at 18:40
  • \$\begingroup\$ How did you draw the Karnaugh maps? \$\endgroup\$
    – Revious
    Oct 30, 2014 at 11:01

2 Answers 2


If we look at the top left corner, where a=0 and c=0, we see that s follows b. This gives us a partial result of s=b. Moving down to the bottom left corner, we see that s is inverted when a=1. This is the XOR operation, and gives us s=a^b. Moving over to the right side, we see that the output is inverted when c=1. This gives us our final result of s=a^b^c.


Karnaugh maps are usually drawn in Grey Code (with one bit changing at a time, so 000, 001, 011, 010 rather than with decimal sequence*) and if you do that, you get: enter image description here.

This corresponds to minterms

C'A'B + C'AB' + CA'B' + CAB = C' (A'B + AB') + C(A'B' + AB) The XOR function is A ^B=A'B + AB' and A XNOR B is A'B' + AB So f= C'(A XOR B) + C (A XNOR B) = C' (A XOR B) + C(A XOR B)' = C XOR (A XOR B) = A XOR B XOR C

  • Note: You can only group together cells and reduce using a K-Map when it is in Grey Code sequence, because grouping two elements together (and discarding the variable that changes) correspons to BC(A + A') = BC which only makes sense when one bit is changing.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.