Hi all ,
module LRM_11_4_3_1;
integer intS;
var logic [15:0] U;
initial begin
intS = -4'd12;
$display("%b , %d",intS,intS);
U = intS/3;
$display("%b , %d",U,U);
end
endmodule
I get Output as ::
11111111111111111111111111110100 , -12
1111111111111100 , 65532
I have a few Queries
[Q1] Within intS how am i Getting all MSB’s as 1’s . -4’d12 is ( 0100 ) , after sign extension shouldn’t it be { 28{1’b0} , 4’b0100 } ?
[Q2} During the division Operation would the Numerator be treated as signed or Unsigned ?
[Q3] How does U get its Value ?
Regards,
AGIS