What is the advantage of a tri-state output?

Tri-state is essentially 3 different states as you have seen. Instead of calling it ON and OFF, think of it as IN and OUT instead. The third state is not floating, it is in a high impedance state, which is essentially disconnecting it from the circuit. This means your 3 states are:

  • Input
  • Output
  • High Impedance (disconnected)

This is very useful in circuits that have a common bus for multiple components. With tri-state logic, components can either read from the bus, write to the bus, or be essentially disconnected so that it does not affect the bus, and will not be affected by the state of the bus either.

As an example of using tri-state logic is on a computer bus:

enter image description here

(Picture taken from http://www.lisbdnet.com/system-bus-functions-features/)

As you can see, multiple units are sharing the same busses. You don't want the information on the bus to be read by every unit at the same time. You also dont want them writing to the bus at the same time. With Tri-state logic, each individual unit can either read from the bus, write to the bus or just be disconnected. In this way, data can be sent back and forth and only the units that require the information will receive it. Imagine, with the above diagram, you receive an input to access a memory address, which then needs to be sent to a register, then go through the ALU, and finally the data is sent to the output. This can be done easily by changing the between the 3 states, so only the units that are needed will be connected to the bus at any time.


Suppose that instead of just one switch you have many switches connected to the same tristate wire. That single wire can be used by all of these different switches to communicate information, as long as only one switch at a time uses the wire by connecting to '1' or '0'. By using just one wire for all of the switches, rather than a separate wire from every switch to every other switch, we can greatly reduce the amount of physical wiring needed.

This kind of situation occurs in practice when you want to connect a processor to different memory and I/O devices. The processor only talks to one of them at a time, so the wires used for communication (the data bus) are shared. Of course, the processor must have some mechanism for specifying which device is allowed to use the wires at any point in time...that is usually done with a separate set of wires (the address bus and a handful of control signals) that is one-way from the processor to the devices.