Skip to content
BetterDL

Tri-state buffer

Also called: tri-state, tristate buffer, three-state buffer, tri-state driver, three-state output, tri-state output

A buffer with an enable input. When enabled it passes its input through; when disabled its output is disconnected (high impedance, Z), driving neither 0 nor 1.

An ordinary gate always drives its output to 0 or 1. A tri-state buffer adds a third option: let go.

It has a data input A, an enable E and an output Y:

  • E active: Y = A. The buffer drives the wire.
  • E inactive: Y = Z, high impedance. The output is electrically disconnected, as if the wire were cut.

Why that matters: it lets many outputs share one wire. Picture eight memory chips all connected to the same data bus. If every chip drove the bus all the time, they would fight. With tri-state outputs, only the selected chip's buffers are enabled, and everyone else is at Z.

That's exactly what happens inside a memory: the chip select (and output enable, if present) control the tri-state buffers on the data outputs. They drive only during a read of the selected chip.

Rules for a shared bus:

  • At most one driver enabled at a time. Two enabled drivers with different values cause bus contention.
  • If no driver is enabled, the bus floats at Z, and readers get an undefined value.

Z isn't a third Boolean value you can compute with. It means "this output isn't taking part", and it only makes sense for wires that something else may drive.

EAY driven (else Z)

Worked examples

Example

Two chips on one wire

Chip A's tri-state output holds 1, chip B's holds 0. Both connect to data line D0.

  1. 1.

    Enable A only: A drives D0, B is at Z. D0 = 1.

  2. 2.

    Enable B only: D0 = 0.

  3. 3.

    Enable neither: D0 floats. Its value is undefined.

  4. 4.

    Enable both: A pushes toward 1 and B toward 0. That's contention: the value is undefined and the chips can be damaged.

Example

The buffer's truth table

Write the behavior for enable E and input A.

  1. 1.

    E = 0, A = 0 → Y = Z.

  2. 2.

    E = 0, A = 1 → Y = Z.

  3. 3.

    E = 1, A = 0 → Y = 0.

  4. 4.

    E = 1, A = 1 → Y = 1.

Common mistakes

  • Treating Z as 0. A disabled output drives nothing; the wire's value comes from whichever driver is enabled.

  • Enabling two drivers on one bus line. Each line must have at most one active driver at a time.

  • Thinking tri-state logic adds a value to Boolean algebra. Z only describes a disconnected output.

Practice Tri-state buffer

Interactive questions with instant feedback and a worked solution for every wrong answer.

Learn it step by step

Tri-state buffer is taught in Memory and Basic CPU / Computer Architecture.