BitFlow

1-to-8 Demultiplexer

beginner · combinational · 45 XP

Sign in to write your solution, run it in the simulator and submit it for grading.

Sign in or create a free account →

Problem

1-to-8 Demultiplexer Input: 1-bit `in`, 3-bit select `s[2:0]`. Outputs: `y[7:0]`. Routes `in` to `y[s]`; all other outputs are 0. Same pattern as 1:4, extended to 3-bit select and 8 outputs.

Constraints

  • Use case inside always @(*).
  • Default y=8'b0 to prevent latches.
  • Declare y as output reg [7:0].

Examples

Input: in=1, s=3'b101

Output: y=8'b00100000

Input: in=0, s=3'b101

Output: y=8'b00000000

Common questions

What does the 1-to-8 Demultiplexer problem ask you to build?
1-to-8 Demultiplexer Input: 1-bit `in`, 3-bit select `s[2:0]`. Outputs: `y[7:0]`. Routes `in` to `y[s]`; all other outputs are 0. Same pattern as 1:4, extended to 3-bit select and 8 outputs.
What constraints does 1-to-8 Demultiplexer have?
Use case inside always @(*).; Default y=8'b0 to prevent latches.; Declare y as output reg [7:0].
What is an example input and output for 1-to-8 Demultiplexer?
Input in=1, s=3'b101 gives output y=8'b00100000.
Which Verilog concepts does 1-to-8 Demultiplexer practise?
combinational, demux, case, always.