BusMUX

Inputs

PinTypeDescription
Abus8First input bus
Bbus8Second input bus
SelbitSelector: 0 → A, 1 → B

Outputs

PinTypeDescription
Qbus8Sel=0 → A, Sel=1 → B

How It Works

BusMUX is a railway switch for bytes. Two 8-bit buses arrive at inputs A and B, while a single selector bit comes to the control pin Sel: Sel = 0 routes bus A to the output whole, Sel = 1 routes bus B. Inside, it is eight ordinary one-bit multiplexers driven in sync by the same Sel — so the selection happens for all bits at once, with no skew between digits.

The key property: the selected bus passes to the output unchanged, all 8 bits at once, while the unselected one is ignored completely — the bytes do not mix and do not add up. A byte example: A = 00001111 (15), B = 11110000 (240). With Sel = 0 the output is 00001111; with Sel = 1 it is 11110000. No intermediate value between them ever appears.

A subtlety: BusMUX is combinational logic — it remembers nothing. Sel changes and the output instantly switches to the other source. Also, you cannot "see" both inputs through a BusMUX at the same time: to compare two buses, run them through one at a time or feed them into a circuit that honestly reads both inputs — such as BusXOR.

8-bit Examples

A (bin)B (bin)SelQ (bin)
0000111111110000000001111
0000111111110000111110000
1010101001010101010101010
1010101001010101101010101

Usage

BusMUX is the key element of the processor datapath. In the ALU (level 13) it selects the second operand: sometimes a value from a register, sometimes a constant from the instruction. A multiplexer of its own stands at the input of each register — deciding what to memorize on the next tick: the ALU result, a data byte from memory, or the previous value for rewriting.

In the Harvard architecture (level 16 and beyond) the data bus is shared, but it has several sources, and BusMUX makes sure exactly one of them gets through: an instruction from ROM or a data byte from RAM, the ALU result or gamepad input. The selector is driven by the instruction decoder according to the opcode. The same trick saves hardware: instead of duplicating circuits, one multiplexer feeds different sources to a shared input in turn.

Build it yourself →

Related components

Related articles

Frequently Asked Questions

How does BusMUX differ from a plain MUX?

It switches whole 8-bit buses instead of single bits: it routes an entire byte at once.

What happens to the unselected input?

It is ignored completely: the signals on B with Sel = 0 do not affect a single output bit. Even garbage on the unselected input will not spoil the result.

How do I select one bus out of four?

Cascade the multiplexers: two BusMUX units choose between pairs of buses, and a third decides which pair moves on. You will need two selector bits — from a decoder or the two high address bits, for example.