1

I'm working on a circuit which performs basic operations such as addition and subtraction using logic gates.

Right now, it takes 3 inputs, two 4 bit numbers, and a 3 bit opcode which indicates what operation to perform.

It seems that a 3-8 decoder would be a good idea here. This is my mockup!

enter image description here

To give a little more context, here is what my adder circuit looks like (+). I designed it to take two 4 bit numbers X & Y:

enter image description here

However, what I am confused about is the fact that I have to feed in 4 inputs or 4 wires to each of the circuit that handles it's respective operations (+, -, =, etc). It appears to only connect one wire to the circuit I need to get to. I need to actually connect 8 wires, as I have to feed in the to 4 bit numbers.

UPDATE: I ended up using a MUX to select the output that I want.

enter image description here

4

1 回答 1

1

加法器不需要输入来告诉它加法,因为这就是它所做的一切。

一个 4 位全加器应该有

  • 每个操作数有 4 个输入信号,共 8 个
  • 如果您也将其用于减法,则为进位输入信号
  • 5个输出信号,高位可用于产生溢出标志

您的解码器是与所有函数生成器分开的组件。您可以在每个函数发生器上放置一个三态缓冲区以将它们连接到公共数据总线,然后解码器将生成三态启用信号。否则,您可能不需要解码器,但您可能会考虑使用多路复用器 (mux)。

于 2014-04-25T03:27:01.167 回答