1
\$\begingroup\$

Help please, I am new to circuits and decoders and I need some serious help.

How to build a 4x16 decoder using ONLY two 2x4 decoders?

Following the steps we took in the lecture, we are supposed to build a 4x16 decoder. So here taking k to be 4, k is even, so we will have \$2^k\$ so \$2^4 = 16\$ AND gates & 2 decoders each of size \$2^{k/2}\$ so \$2^2 = 4\$.

So we have 16 AND gates & two 2x4 decoders. Each 2x4 decoder has 4 AND gates so we have 8 AND gates that should be connected to the 16 AND gates, how do I do that?

\$\endgroup\$
  • \$\begingroup\$ You are allowed to use any number of AND gates and 2 2x4 decoders? \$\endgroup\$ – dext0rb Nov 29 '12 at 20:11
  • \$\begingroup\$ we are supposed to use 16 AND gates and two 2x4 decoders.. \$\endgroup\$ – dondon93 Nov 29 '12 at 20:21
  • 6
    \$\begingroup\$ With 2 decoders and 16 ANDs it is easy. \$\endgroup\$ – starblue Nov 29 '12 at 21:13
4
\$\begingroup\$

A \$2\$-by-\$4\$ decoder has two input lines and four output lines, only one of which is logical \$1\$ at any time. Which line is \$1\$ depends on the input bit pair which can be \$00, 01, 10, 11\$.

So take two such \$2\$-by-\$4\$ decoders which give you four input lines. Let the output lines be \$a_0, a_1, a_2, a_3\$ for one decoder and \$b_0, b_1, b_2, b_3\$ for the other. Use the \$16\$ AND gates to compute the \$16\$ functions \$ a_i \wedge b_j, 0 \leq i \leq 3, 0 \leq j \leq 3\$. We now have a \$4\$-by-\$16\$ circuit with the property that only one output is a logical \$1\$ at any time: which one depends on the values of $i$ and $j$ which in turn depend on the \$4\$ input bits. In other words, we have a \$4\$-by-\$16\$ decoder constructed from two \$2\$-by-\$4\$ decoders and \$16\$ AND gates.

\$\endgroup\$
  • 2
    \$\begingroup\$ An easy way to visualize this is as a matrix: the first decoder selects the column, the second decoder selects the rows, and the AND gates - one at each junction of the matrix - are enabled if and only if the row and column are both selected. \$\endgroup\$ – Nick Johnson Nov 30 '12 at 10:50
  • \$\begingroup\$ If the decoders are used to operate LEDs, one could omit the gates if one decoder has active-high outputs that are capable of sourcing current sufficient for the LEDs, and the other has active-low outputs. Simply wire the LEDs in a matrix, and each LED will only light when the "active-high-output" decoder is outputting high and the "active-low-output" decoder is outputting low. \$\endgroup\$ – supercat Nov 30 '12 at 16:20
  • \$\begingroup\$ @supercat As the saying goes, there is more than one way to skin a cat. In this case, the desired solution was required to use 16 AND gates (and presumably two identical \$2\$-by-\$4\$ decoders) ..... \$\endgroup\$ – Dilip Sarwate Nov 30 '12 at 16:54
3
\$\begingroup\$

you would need 5 such decoders. re-check your notes enter image description here

The question does not prohibit use of logic other than decoders so using 16 2-input and gates we have the following circuit that fulfils the requirement (Muzammal Baig)

\$\endgroup\$
  • 1
    \$\begingroup\$ i checked them again , and it says we must use only two 2 to 4 decoders knowing that we won't use the E ( enable input ) because it is a beginner course. \$\endgroup\$ – dondon93 Nov 29 '12 at 20:08
  • \$\begingroup\$ pretty hard to create 16 outputs with only 2x4=8 \$\endgroup\$ – Tony Stewart Sunnyskyguy EE75 Nov 29 '12 at 20:16
  • \$\begingroup\$ exactly that is my point ... I kept trying but to no use .. \$\endgroup\$ – dondon93 Nov 29 '12 at 20:18
  • 1
    \$\begingroup\$ I guess your assumptions need to be validated \$\endgroup\$ – Tony Stewart Sunnyskyguy EE75 Nov 29 '12 at 20:25
  • \$\begingroup\$ Tony Stewart what software did you use to make those diagrams? \$\endgroup\$ – Long Doan Nov 5 '16 at 12:45

protected by Tom Carpenter Nov 5 '16 at 22:13

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).

Would you like to answer one of these unanswered questions instead?

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