What is different between {a + b}
and (a + b)
in verilog. I used the simulation to do:
reg [3:0] a = 4'b0001;
reg [3:0] b = 4'b1111;
reg [4:0] c = (a + b); give the result c = 5'b1_0000
but
reg [4:0] c = {a + b}; give c = 5'b0_0000;
It means the (a + b) can give the result 5 bits, but {a + b} give 4 bits. I don't know why. Please help me.
Thank you