1
\$\begingroup\$

Is there a single 7400 series IC which does this directly?

(I know can do this with 4*NOT + 4*AND gates, but that will be 2 ICs.)

Truth table:

 in | out
h l | 3 2 1 0
----+--------
0 0 | 0 0 0 1
0 1 | 0 0 1 0
1 0 | 0 1 0 0
1 1 | 1 0 0 0

(I'm not looking to mux/demux a signal.)

\$\endgroup\$
2
  • 1
    \$\begingroup\$ 2 inverters and 4 ANDs. \$\endgroup\$
    – EM Fields
    Commented Apr 22, 2016 at 17:28
  • \$\begingroup\$ If you can use CMOS instead of bipolar, a 74HC4052 would work for you, and maybe a CD4052B. \$\endgroup\$
    – EM Fields
    Commented Apr 22, 2016 at 17:48

2 Answers 2

4
\$\begingroup\$

Sure. The chip you want is known as a decoder. Specifically, you are looking for a 2-to-4 decoder, or 1-of-4 decoder.

A cursory glance at the 7400 series logic list suggests that a 74139 would work for you, it's actually a dual 2-to-4 decoder.

Most decoders will have an enable input, from your truth table, it appears you don't need this, so you can simply tie it to whichever voltage is enable (most enables are active low, so you would tie it low).

If a '139 doesn't work or is difficult to source:

  • '138: 1-of-8 decoder (just ignore four of the outputs and one of the inputs)
  • '156: dual 2-to-4 decoder/demux.
  • etc.

However, as long as you don't need teeny-tiny packages, Digikey has '139s in SOIC and DIP.


Edit: as Chris Stratton pointed out, these devices have active low outputs (the selected line is low while all others are high). If your downstream logic cannot deal with this, the '239 is probably what you are looking for. It's the same as '139, except with active-high outputs.

Unfortunately, these are not as easy to find in stock. The '238 can be found on Digikey, albeit the 74AC family version.

\$\endgroup\$
3
  • \$\begingroup\$ Close, but these devices are active low - quite useful for driving the chip select of comparable vintage bus peripherals, but the opposite of the posted truth table. Perhaps they can adapt to work with it. \$\endgroup\$ Commented Apr 22, 2016 at 14:52
  • \$\begingroup\$ @ChrisStratton Thanks for pointing that out. I've updated my answer with the active high versions, which are much harder to obtain. \$\endgroup\$
    – uint128_t
    Commented Apr 22, 2016 at 15:03
  • \$\begingroup\$ Another fairly rare part, and 24 pin... MM74HC4514 \$\endgroup\$ Commented Apr 22, 2016 at 17:43
1
\$\begingroup\$

If you've got some glue logic laying around you can do it like this:

enter image description here

\$\endgroup\$
1
  • \$\begingroup\$ how about with 3 inputs - just use 3 input AND gates at the outputs ? \$\endgroup\$
    – user4434
    Commented Jul 14, 2023 at 8:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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