**Context-Determined Expression Sizing** What is the decimal value of res…
**Context-Determined Expression Sizing** What is the decimal value of res ? reg [3:0] a, b; reg [7:0] res; initial begin a = 4'd10; b = 4'd10; res = (a * b); end
- 100
- 4
- 16
- 0
Correct answer
A. 100
Explanation
Verilog evaluates expressions based on the width of the LHS target ( res , 8 bits wide). The multiplication is calculated with 8-bit precision: $10 \times 10 = 100$, fitting fully into res without truncation.