Design with Decoder:
Input = n
Output= 2n
Decoder size= n × 2n
Truth Table:
| Input variable | Output variable | |||
| X | y | z | c | s |
| 0 | 0 | 0 | 0 | 0 |
| 0 | 0 | 1 | 0 | 1 |
| 0 | 1 | 0 | 0 | 1 |
| 0 | 1 | 1 | 1 | 0 |
| 1 | 0 | 0 | 0 | 1 |
| 1 | 0 | 1 | 1 | 0 |
| 1 | 1 | 0 | 1 | 0 |
| 1 | 1 | 1 | 1 | 1 |
Since, there are 3 input variables we need 3 × 23 or 3 × 8 decoder. Since there are 2 output variable so we need at least 2 external gates.
Here, c(x, y, z) = ∑ (3, 5, 6, 7)
And s(x, y, z) = ∑ (1, 2, 4, 7)
Circuit Diagram:

