**8:3 Octal to Binary Encoder:** Explain the function of an 8:3 Octal to…
**8:3 Octal to Binary Encoder:** Explain the function of an 8:3 Octal to Binary Encoder. Derive the Boolean equations for output bits $A_2, A_1, A_0$ and write synthesizable Verilog RTL code and its testbench.
Model answer
### 1. Truth Table & Boolean Expressions An 8-to-3 Encoder accepts an active-high 1-hot 8-bit input $Y_7 \dots Y_0$ and outputs the 3-bit binary representation $A_2 A_1 A_0$: {rl} A_2 &= Y_4 + Y_5 + Y_6 + Y_7 \\ A_1 &= Y_2 + Y_3 + Y_6 + Y_7 \\ A_0 &= Y_1 + Y_3 + Y_5 + Y_7 ### 2. Behavioral Verilog RTL Implementation ### 3. Verilog Testbench