# Multiplexer + flipflop all in one?

As you know if you have a 4 bits multiplexer, if you input 0101 the output 5 goes high, but right when you input another thing like 0001, output 5 goes low and output 1 goes high.

I need the multiplexer to remember the output state like a flip-flop, so when I change from 5 to 1, 5 remains high until I send another signal to it. Does this kind of IC exist?

• It's not 100% clear to me exactly what behavior you want. If you step back and give us a higher-level picture of what you're trying to do, it might be easier for us to help you out. – The Photon Nov 29 '12 at 0:45
• If a single-chip solution is absolutely required you will probably end up using a CPLD. If you can use multiple chips, it sounds like a bank of SR-latches at the output of your multiplexer could work. But again, I'm not entirely clear on the behavior you want/need. – The Photon Nov 29 '12 at 0:47
• @BrianCarlton Just a friendly reminder, not all users of this site are native English speakers. Torches and pitchforks are not appropriate tools on EE.SE. – W5VO Nov 29 '12 at 5:15

More precisely, what you're describing is a decoder, not a multiplexer.

A decoder is a purely combinational circuit. To make it into sequential circuit which holds state, the easiest way to do that seems to be to put a latch in front of it. In your case, a four bit latch.

There are IC's like this:

74HC4514

This is a "4-to-16 line decoder with latch".

As for multiplexers, they do something different. Based on an $n$-bit binary number input, one of $2^n$ possible signal lines are routed to the output. Whereas driving one of $2^n$ lines high (or low) based on a binary input is decoding.

• I think when the select input changes, he wants the newly selected output to go high immediately and the old output to stay high until reset somehow. But its not at all clear, and your suggestion might be exactly what he really wants. – The Photon Nov 29 '12 at 4:37
• I see, like a "gray-code-ish" step by step transition: grab one rope before letting go of the other. I interpreted "5 remains high until I send another signal" as that 1 also remains low, and that other signal is a clock pulse. – Kaz Nov 29 '12 at 4:41
• The Phonton is right, I need to remember the output state, not the input. – DomingoSL Nov 29 '12 at 10:45
• "Output state" is the only kind there is because the only way we know the state of a device is by looking at its outputs. A device exhibits state by preserving outputs while inputs change. Can you explain how the behavior of the 4-to-16 line decoder with latch differs from the device that you are looking for? – Kaz Nov 29 '12 at 17:26

If you want to "remember" a previous value you'd better remember it on the demultiplexer input rather than at the output, because the input has N lines and the output 2^N. A register (level or edge triggered, as to your taste) will do.

(Note that this thingy is called a DEmultiplexer, not a multiplexer).