Complete the code to declare a 4-bit unsigned register.
reg [1] [3:0];
In Verilog, unsigned is used to declare unsigned registers explicitly.
Complete the code to declare an 8-bit signed wire.
wire [1] [7:0];
The keyword signed declares a wire that can hold negative values.
Fix the error in the code to correctly assign a signed value.
reg signed [3:0] a; initial begin a = [1]4'b1101; end
The 's prefix tells Verilog the number is signed.
Fill both blanks to declare a signed 5-bit register and assign a negative value.
reg [1] [4:0]; initial begin [2] = 5'sb10101; end
The register must be declared signed to hold negative values, and the variable name must match the assignment.
Fill all three blanks to create a signed 6-bit wire, assign a signed binary, and declare it.
wire [1] [5:0]; initial begin [2] = [3]6'sb111100; end
The wire must be declared signed, the variable name is 'w', and the signed binary prefix is 6'sb.
