RTL Design · Medium · Verilog, SystemVerilog, VHDL

4-Way One-Hot Multiplexer

Select one of four 8-bit inputs using a one-hot select vector.

Task

When sel is 0001/0010/0100/1000 choose d0/d1/d2/d3. Invalid select values return zero.

Examples

Constraints

What this problem is testing

A strong answer translates the requirement into synthesizable state and combinational logic, states reset and update semantics precisely, and handles boundary conditions rather than only the nominal case.

Interview habit: before coding, state reset behavior, the state that must be stored, and the conditions that update each output.

Verification plan

Common mistakes

Interview follow-up questions

Concepts to review

mux, one-hot

Open 4-Way One-Hot Multiplexer in the HDLForge interactive editor.

Related problems

Explore the RTL Design Practice & Interview Preparation hub.

Continue practising