I'm trying to figure out how to find the short version of Sum in a full adder, from the truth table I got this DNF:
(A && ~B && ~C) || (~A && B && ~C) || (~A && ~B && C) || (A && B && C)
where A = A
, B = B
, and C = CIn
But according to wikipedia, this is equivalent to:
A XOR B XOR C
Is there a way I can somehow figure out the latter version or do I just need to "see it" in the truth table?
Thanks!
The terms in your DNF have one thing in common: An odd number of inputs is true.
The output line of a full-adder is 1
if and when an odd number (one or three) of its input lines are 1
. If zero inputs are 1
(= all are 0
), the output is 0
. If two inputs are 1
, carry-out is 1
but output stays 0
.
When you translate your truth table into a Karnaugh map, you get the checker-board pattern typical for XORs. In the end you are right: It does in fact help to "see it".
(Karnaugh map image copied from here)