# What is the advantage of a tri-state output?

I'm trying to understand what is the use of tri-state output and what is the advantage of using it.

Below depicts both two-state and tri-state output:

According to the above logic, it seems to me two-state output can only be ON or OFF. But in tri-state case, the output can be ON, OFF or floating. So to me the only difference is the floating state.

As far as I read, floating signals are not useful. But it seems I'm ignorant at some points and want to ask what is the purpose of using tri-state output?

• Having a high impedance output allows the output to be driven by another device/elsewhere in the circuit – Harry Beadle Nov 11 '19 at 12:27

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:

(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.

• "... or be disconnected and be unaffected by it" ... and to "unaffect" the bus so that effectively that component is no longer in-circuit. – Transistor Nov 11 '19 at 12:44
• @Transistor good point, I'll add that in there! – MCG Nov 11 '19 at 13:00
• @MCG You mean ON is INPUT and OFF is OUTPUT? Why do you call them as input and output? Aren't all states output? Here they call them output i.stack.imgur.com/LutlM.png Could you clarify that as well? And if possible where in practice is this tri state used? Can we name any ? – user1999 Nov 11 '19 at 13:10
• @user1999 It depends what you have connected to it, whether it is On/Off or Input/Output. It depends on the application. There isn't much advantage to a tri-state ON/OFF switch. As for inputs and outputs, I'll add an example to the answer – MCG Nov 11 '19 at 13:46

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.

Before TriState logic/bus_drivers appeared, logic systems used multiplexors (ORs of ANDs) or wired_ORs.

The wired_ORs depended on resistive pullups, and were slow.

National Semi provided additional on_silicon transistors (using all NPN, the fastest cheapest silicon of that time) to disable both low_side and high_side driver of the TTL gate output circuits.