1
\$\begingroup\$

I am tring to figure out how I can have some sort of module that can create the following scenario:

The module has two inputs and one output. One of the inputs is "select". If select is high, then the output of the module is always low. If select is low, then the output of the module will equal the state of the other input.

Here is the truth table for my desired module:

enter image description here

Here is the circuit I am trying to achieve this outcome with:

enter image description here

Subtract is the "select" input and each of the "overflow" inputs are the 2nd inputs. Therefore I need 3 of my desired modules where each of the XOR gates are. The XOR gates achieve what I want when "overflow" is high, but not when it is low.

I'm sure this is relatively easy to achieve but I just can't seem to think straight at the moment. I think that some type of flip-flop would be my best bet.

\$\endgroup\$
2
  • \$\begingroup\$ ~SELECT & INPUT. Assuming you're re-using the same select line for all three instances, you need one inverter and three AND gates. \$\endgroup\$
    – The Photon
    Nov 22, 2015 at 19:04
  • \$\begingroup\$ @ThePhoton haha I knew it was something simple! Thank you very much \$\endgroup\$
    – KOB
    Nov 22, 2015 at 19:06

3 Answers 3

1
\$\begingroup\$

Your truth table is implemented by ~SELECT & INPUT. Assuming you're re-using the same select line for all three instances, you need one inverter and three AND gates.

I think that some type of flip-flop would be my best bet.

A flip-flop has memory. Its output depends on both the inputs and the past state of the output.

Since your truth table doesn't depend on the past state of the output, there's no reason to think a flip-flop would be useful here.

\$\endgroup\$
1
\$\begingroup\$

An alternative would be to use a simple non inverting tri-state buffer with active low select line and a pull down resistor on the output. A detailed description of tri-state buffers is available here: http://www.cs.umd.edu/class/sum2003/cmsc311/Notes/CompOrg/tristate.html

In simple terms, when the select line is not active the output is not driven at all, so will take the logic state of the pull down resistor.

A real world example of this device would be the CD74HCT125 see: http://www.ti.com/product/CD74HCT125/technicaldocuments

The advantage of this device is that you can 'wire or' the outputs of multiple gates if only one select line is driven at any time.

\$\endgroup\$
0
\$\begingroup\$

As The Photon pointed out in a comment above - the answer is simply ~SELECT AND INPUT as shown here:

enter image description here

\$\endgroup\$

Your Answer

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

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