Decoders and Logic Gates

decoderlogic-gates

I have two questions. First, I've been staring at this problem for over an hour and I'm stumped. To be clear, I'm not looking for the answer, just some hints to get going would be helpful:

1) Using only three 2-to-4 decoders with enable and no other additional gates, implement a
3-to-8 decoder with enable. The inputs of the resulting 3-to-8 decoder should be labeled
as X2 X1 X0 for the code input and E for the enable input. The outputs should be labeled
Y7 Y6 Y5 Y4 Y3 Y2 Y1 Y0.

I definitely know how to use a 2-to-4 decoder, and how to use a 3-to-8 decoder, but how to create a 3-to-8 decoder using only three 2-to-4 decoders is stumping me. I don't know where to begin making the connections.

Second, I have this circuit:

enter image description here

My next question has to do with a specific gate from this circuit:

enter image description here

I have never seen this gate and don't know exactly what to do with it. Professor didn't go over it in class. what is it?

Best Answer

A hint for the 1st part: You need 8 outputs, this requires two 2-to-4 decoders. What do you do with the 3rd 2-to-4 decoder?

Re the 2nd part of your question: "what is this gate?"

It's a tri-state buffer. It's "tri-state" because the output can be one of three states: 0, 1 or Z. I'll explain Z shortly.

The "side" input is the Enable. If Enable is asserted (high or 1) then the output follows the main (data) input. If Enable is not asserted (low or 0) then the output ignores the data input and becomes 'Z', or high impedance.

An output that is at 0 or 1 is actively driving the circuit. It is effectively tied to power or ground through a switch. If you were to attach two such outputs together and one was at 0 and the other at 1, then you would be joining power to ground - a short circuit. This is... bad.

An output that is at Z doesn't do anything at all. This is useful because you can tie any number of outputs that are at Z together and they won't misbehave. Even better, you can select any one of the outputs and make it 1 or 0 and that one output will take control, overriding all of the Z's.

This is the basis of how computer buses work - lots of possible drivers, but only one of them enabled (driving 1 or 0) at any one time.