**Replication Operator with Constant** What is the 8-bit hex representati…
**Replication Operator with Constant** What is the 8-bit hex representation of val ? reg [1:0] a; reg [7:0] val; initial begin a = 2'b01; val = {4{a}}; end
- 8'h55
- 8'hAA
- 8'h0F
- 8'hF0
Correct answer
A. 8'h55
Explanation
The replication {4{a}} repeats 2'b01 four times: 8'b0101_0101 , which corresponds to 8'h55 .