A1 is -4, but the print is '1111111111111100', or '65532'. It is different from the picture shows.
I find the following but not sign control here.
Code Verilog - [expand]
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
$display("<format>", exp1, exp2, ...);// formatted write to display
format indication %b %B binary
%c %C character (low 8 bits)%d %D decimal %0d for minimum width field
%e %E E format floating point %15.7E
%f %F F format floating point %9.7F
%g %G G general format floating point
%h %H hexadecimal
%l %L library binding information
%m %M hierarchical name, no expression
%o %O octal
%s %S string,8 bits per character,2´h00 does not print
%t %T simulation time, expression is $time%u %U unformatted two value data 0and1%v %V net signal strength
%z %Z unformatted four value data 0,1, x, z
It should be able to print '-4' as the picture show. Could you tell me that? Thanks,