← ProblemsVerilog Language / Vectors

Replication operator

36%vectors

Sign-extend an 8-bit number to 32 bits: replicate the sign bit (bit 7) twenty-four times, followed by the original 8 bits.

8'b10000000  =>  32'hFFFFFF80
8'b00101100  =>  32'h0000002C