A tri-state buffer is a digital circuit used to control a logic signal from input to output. It’s used when we have many logic signals connected to a common line and we select which one actually uses the line by enabling the tri-state buffer.

For , we have , i.e., we have high impedance. When , we get , i.e., the input passes through.[^1]

Applications

The buffers see significant use in memory, where the control the read and write direction.

HDL implementation

In Verilog, an -bit tri-state buffer is given by:

module tri_state_buffer (in, out, enable);
	parameter n = 'd8; // 8-bits, change
	input [n - 1:0] in;
	input enable;
	output wire [n - 1:0] out;
 
	assign out = enable ? in : 'bz;
endmodule