I found this strange thing upon my textbook

as an exercise to "comment by its truth table".

so I did the gargantuan truth table

But there's nothing to "comment", as I see.

The s2 = y0 reacts as a XOR or XNOR gate depending on x2, the c3 = y2 as an AND gate and the s3 = y1 seems entirely out of place.

Am Ι shortsighted at this?

Is there a connection in this design?

• aren't they c3,s3 and s2 respectively? – Coursal May 24 '16 at 22:21
• I'm confused as to what is your question. – Bradman175 May 25 '16 at 2:25
• @Bradman175 You are right. The think I should be asking is: based on the truth table above, what connection does y2, y1 and y0 have with each other and/or the whole circuit? – Coursal May 25 '16 at 17:14
• So you mean what is the circuit's purpose of y0-2 in relation to the inputs of x0-3? I can answer this! – Bradman175 May 26 '16 at 0:13
• Are you sure bout that? – Coursal May 26 '16 at 7:10

We shall start off with the inputs and outputs

• Inputs: X0, X1, X2, X3

• Outputs: Y0, Y1, Y2

This circuit basically sees how many inputs of X are HIGH and outputs as a number in binary through Y. So let me rearrange the truth table for better understanding.

X-inputs             -| Y-outputs
X3 X2 X1 X0          -| Y2 Y1 Y0
0  0  0  0  > 0 HIGH -| 0  0  0  > BINARY 0
0  0  0  1  > 1 HIGH -| 0  0  1  > BINARY 1
0  0  1  0  > 1 HIGH -| 0  0  1  > BINARY 1
0  1  0  0  > 1 HIGH -| 0  0  1  > BINARY 1
1  0  0  0  > 1 HIGH -| 0  0  1  > BINARY 1
0  0  1  1  > 2 HIGH -| 0  1  0  > BINARY 2
0  1  0  1  > 2 HIGH -| 0  1  0  > BINARY 2
1  0  0  1  > 2 HIGH -| 0  1  0  > BINARY 2
0  1  1  0  > 2 HIGH -| 0  1  0  > BINARY 2
1  0  1  0  > 2 HIGH -| 0  1  0  > BINARY 2
1  1  0  0  > 2 HIGH -| 0  1  0  > BINARY 2
0  1  1  1  > 3 HIGH -| 0  1  1  > BINARY 3
1  0  1  1  > 3 HIGH -| 0  1  1  > BINARY 3
1  1  0  1  > 3 HIGH -| 0  1  1  > BINARY 3
1  1  1  0  > 3 HIGH -| 0  1  1  > BINARY 3
1  1  1  1  > 4 HIGH -| 1  0  0  > BINARY 4


So mathematically

X0 + X1 + X2 + X3 = Y


If you had put y2, y1, and y0 in the truth table you would have noticed that this circuit adds x0, x1, x2, and x3 and outputs the sum as y.

• I though the direction was top-down, just so I needed to find some info by the c3, s3 and s2. Now I'm confused. – Coursal May 24 '16 at 22:26