- #36
I like Serena
Homework Helper
MHB
- 16,336
- 258
evinda said:We do not get the result because the carries are not added, right?
Should we have in general only two outputs? So do we connect the arrows of the first circuit directly with the second circuit? Also do we have to connect in the second circuit the results $K_1$ and $K_2$ in order to get the right carry as output?
How about something like this:
\begin{tikzpicture}
\draw (0,0) rectangle (8,6);
\draw (0,5) -- +(-1,0) node[ left ] {P};
\draw (0,3) -- +(-1,0) node[ left ] {Q};
\draw (0,1) -- +(-1,0) node[ left ] {R};
\draw (8,4) -- +(1,0) node[ right ] {K};
\draw (8,2) -- +(1,0) node[ right ] {A};
\draw (2,2) node {+} +(-0.5,+0.2) -- +(-1,+0.2) +(-0.5,-0.2) -- +(-1,-0.2) +(0.5,+0.2) -- +(1,+0.2) +(0.5,-0.2) -- +(1,-0.2) +(-0.5,-0.5) rectangle +(0.5,0.5);
\draw (3,3.5) node {+} +(-0.5,+0.2) -- +(-1,+0.2) +(-0.5,-0.2) -- +(-1,-0.2) +(0.5,+0.2) -- +(1,+0.2) +(0.5,-0.2) -- +(1,-0.2) +(-0.5,-0.5) rectangle +(0.5,0.5);
\draw (6,1) node {+} +(-0.5,+0.2) -- +(-1,+0.2) +(-0.5,-0.2) -- +(-1,-0.2) +(0.5,+0.2) -- +(1,+0.2) +(0.5,-0.2) -- +(1,-0.2) +(-0.5,-0.5) rectangle +(0.5,0.5);
\draw (5,5) node {+} +(-0.5,+0.2) -- +(-1,+0.2) +(-0.5,-0.2) -- +(-1,-0.2) +(0.5,+0.2) -- +(1,+0.2) +(0.5,-0.2) -- +(1,-0.2) +(-0.5,-0.5) rectangle +(0.5,0.5);
\end{tikzpicture}
That leaves how to connect the lines so that all possible sums are summed correctly.
evinda said:In general, the only possible results are $1+0+0=1$, $1+1+0=0$ with carry $1$ and $1+1+1=1$ with carry $1$ and we can get it with any possible order of $0,1$ at the sum, right?
What do you mean?