An inverter is called a NOT gate, and it looks like:
The inverter is a triangle, followed by a circle/bubble. That circle sometimes appears by itself, and means negation.
What if we remove the circle? What kind of gate would we have? We'd have a buffer.
You might think that a buffer is useless. After all, the output is exactly the same as the input. What's the point of such a gate?
The answer is a practical issue from real circuits. As you may know, logic gates process 0's and 1's. 0's and 1's are really electric current at certain voltages. If there isn't enough current, it's hard to measure the voltage.
The current can decrease if the fan out is large. Here's an example:
The "fan out" is the number of devices that an output is attached to. Thus, the AND gate above is attached to the inputs of four other devices. It has a fan out of 4.
If the current coming out of the AND gate is i, then assuming each of the four devices gets equal current, then each device gets i / 4 of the current.
However, if we put in a buffer:
then the current can be "boosted" back to the original strength. Thus, a buffer (like all logic gates) is an active device. It requires additional inputs to power the gate, and provide it voltage and current.
You might wonder "Do I really need to know this? Isn't this just EE stuff?". That's true, it is. The point of the discussion was to motivate the existence of a plain buffer.
It's a common misconception to think that 0 is nothing, while 1 is something. In both cases, they're something. If you read the discussion in What's a Wire, you'll see that a wire either transmits a 0, a 1, or "Z", which is really what's nothing.
It's useful to think of a wire as a pipe, and 0 as "red kool aid" and 1 as "green kool aid" and "Z" as "no kool aid".
A tri-state buffer is a useful device that allows us to control when current passes through the device, and when it doesn't.
Here's two diagrams of the tri-state buffer.
A tri-state buffer has two inputs: a data input x and a control input c. The control input acts like a valve. When the control input is active, the output is the input. That is, it behaves just like a normal buffer. The "valve" is open.
When the control input is not active, the output is "Z". The "valve" is open, and no electrical current flows through. Thus, even if x is 0 or 1, that value does not flow through.
Here's a truth table describing the behavior of a active-high tri-state buffer.
In this case, when the output is Z, that means it's high impedance, neither 0, nor 1, i.e., no current.
As usual,the condensed truth table is more enlightening.
As you can see, when c = 1 the valve is open, and z = x. When c = 0 the valve is closed, and z = Z (e.g., high impedance/no current).
Here's the condensed truth table for an active-low tri-state buffer.
As you can see, when c = 0 the valve is open, and z = x. When c = 1 the valve is closed, and z = Z (e.g., high impedance/no current). Thus, it has the opposite behavior of a tri-state buffer.
Here's an example:
In this case, we have 32 wires coming into the tri-state buffer. We have 32 wires coming out of the tri-state buffer.
There's still only 1 control bit.
This can easily be implemented using 32 tri-state buffers taking one bit as input and one bit as output.
Recall (from earlier) that a common way for many devices to communicate with one another is on a bus, and that a bus should only have one device writing to it, although it can have many devices reading from it.
Since many devices always produce output (such as registers) and these devices are hooked to a bus, we need a way to control what gets on the bus, and what doesn't.
A tri state buffer is good for that.
Here's an example:
There are three devices, each of which output 32 bits. These devices have their outputs hooked to a 32 bit bus.
We want to prevent more than one device from writing to the bus. Ordinarily, these devices always generate output, so we're in trouble merely by attaching more than one device's output to the bus.
As long as at most one of the following control bits, c0, c1, c2, is 1, the bus is fine. That is, the bus will not have two devices attempting to write to it at the same time.
An alternate way is to use a MUX. For example, we might have a 32 bit, 3-1 MUX. The advantage of a MUX is that we're guaranteed only one device makes it to the bus. The drawback is that we might want no devices to make it to the bus.
One solution is to add an enable input to a MUX. When the enable is active, the output is selected from one of the inputs. When the enable is not active, then the output is Z.
When it's not active, the output of the device is Z, which is high-impedance or, equivalently, nothing. This is when the "valve" is closed, and no electrical signal is allowed to pass to the output.
The "valve" analogy helps make it easy to understand the behavior of a tri-state buffer.