CS355 Sylabus

# Intro to Bi-directional data transfer

• Bi-directional data transfer is a technique to reduce the number of lines used to connect the different components inside a computer.

A bi-directional bus is a set of wires where digital components attach both their inputs and outputs. A digital component can send out their output on a bi-directional bus and it can receive input from the bi-directional bus.

The best known bi-directional bus is the memory bus: the CPU can send data to the memory (writing) and the CPU can receive data from the memory (reading).

• Before we can discuss the construction of the memory, we need to consider the problem of using the same wire for input and output purposes.

Due to some electrical limitations, we will first discuss how bi-directional buses are wired...

• We first start with uni-directional data transfer. You have seen this before, like in:

The electrical signal (actually: electrical current) always flows from an output to one or more inputs. In the above circuit, the electrical current flows:

• from sources a, b, and c towards the inputs of the and-gates
• and from outputs of the and-gates towards the inputs of the or-gate

In fact, the sources a, b, and c are also outputs: they are outputs of "batteries" that generate a low or a high voltage.

• Therefore: outputs of digital circuits are only connected to inputs of other (or the same - see the SR-latch !) digital circuits.

There is a reason for this, and it would require some knowledge of electricity to understand what the problem is....

• Without going too deeply into electrical circuits, I will only state the facts that:

• The inputs of digital circuits are passive ends that do not emit any current.
• The outputs of digital circuits are active ends that emit a current.
• All electrical circuits have an input impedence and/or an output impedance
• Impedance is also called the resistance of the circuit and you may have heard and/or recall the famous Ohm's formula: V = IR (V = voltage, I = current and R = resistance/impedance).
• The input impedance is usually high to prevent burn out
• The output impedance is usually very low to get a strong "driving" current (the output must "drive" other inputs, as you see the example above, where the outputs are connected to the input.
• "Driving" means to provide an input signal and the signal strength is stronger is the impedance of the driving device is lower, that is why the impedance of output circuits must be as low as possible.
• The inputs are passive ends that do not emit any current.

• OK, after absorbing these facts, let's try to figure out what happens when you tie inputs and outputs together:

• Output and input connected:

 The red lines in the left figure show examples where an output is connected to an input. This is the "normal" case and it is "safe" to connect an output to an input. Safe means that the circuit does not get damaged by electrical current flowing from the output to the input: the high impedance of the input prevents burn out.

• Inputs connected together:

 The red lines in the left figure show an examples where two inputs are connected together. It is "safe" to connect two inputs together because input ends are passive and do not emit electrical current. In other words, there would be no danger of "burn out" - digital circuits are very delicate things because the connections are very very tiny. Even static electricity from your body can short circuit in a digital circuit imprinted on a chip...

• Outputs connected together:

 The red lines in the left figure show an examples where two outputs are connected together. It is an unsafe situation: output ends are active and they have very low impedance (i.e., very little protection against current flow. If you connect the outputs of real digital circuits together - in real life situation - one or both of the circuits will be burned out and it will be completely ruined. In logic-sim, you will get an error message that outputs are connected together - the circuit will not work. Run this demo: logic-sim err-output