3-to-8 Decoder (74138 Style)
beginner · combinational · 55 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
3-to-8 Decoder (74138 Style)
Inputs: 3-bit select `sel[2:0]`, active-low enable `en_n`.
Output: 8-bit `y[7:0]`, **active-low** (all outputs high except the selected one, which goes low).
When `en_n=1` (disabled), all outputs are high.
This mirrors the real **74HC138** IC behaviour.
**Examples**
- `en_n=0, sel=3'b000 → y=8'b1111_1110` (y[0] active)
- `en_n=0, sel=3'b101 → y=8'b1101_1111` (y[5] active)
- `en_n=1, sel=any → y=8'b1111_1111` (disabled)
Constraints
- Use assign with conditional operator or always @(*) with case.
- Active-low outputs: selected output = 0, all others = 1.
- When en_n=1, all outputs = 1.
Examples
Input: en_n=0, sel=3'b000
Output: y=8'b1111_1110
Input: en_n=1, sel=3'b000
Output: y=8'b1111_1111
Common questions
- What does the 3-to-8 Decoder (74138 Style) problem ask you to build?
- 3-to-8 Decoder (74138 Style) Inputs: 3-bit select `sel[2:0]`, active-low enable `en_n`. Output: 8-bit `y[7:0]`, **active-low** (all outputs high except the selected one, which goes low). When `en_n=1` (disabled), all outputs are high. This mirrors the real **74HC138** IC behaviour.
- What constraints does 3-to-8 Decoder (74138 Style) have?
- Use assign with conditional operator or always @(*) with case.; Active-low outputs: selected output = 0, all others = 1.; When en_n=1, all outputs = 1.
- What is an example input and output for 3-to-8 Decoder (74138 Style)?
- Input en_n=0, sel=3'b000 gives output y=8'b1111_1110.
- Which Verilog concepts does 3-to-8 Decoder (74138 Style) practise?
- combinational, decoder, assign.