**1:8 Demultiplexer Design:** Explain the difference between a Demultiple…
**1:8 Demultiplexer Design:** Explain the difference between a Demultiplexer and a Decoder. Write synthesizable behavioral Verilog RTL code for a 1:8 De-MUX and its testbench.
Model answer
### 1. Working Principle & Demux vs. Decoder A **Demultiplexer** takes a single input data stream $D$ and routes it to one of $2^n$ outputs based on $n$ select lines. - **Demultiplexer:** Has a dedicated data line $D$ and routes $D$ to $Y[s]$. - **Decoder:** Activates an output line ($Y[s] = 1$) based purely on input code without routing a data stream. ### 2. Behavioral Verilog RTL Implementation ### 3. Verilog Testbench