D
Davy
Hi all,
I am new to Verilog and want to build a 2's Complement Shifter.
I found
%displayb(8'b0001_1000>>2); //Output 0000_0110
%displayb(8'b1001_1000>>2); //Output 0010_0110
So >> is unsigned shift.
How can I build a signed (2's Complement) shift based on >>?
i.e. I want 8'b1001_1000>>2 //Output 1110_0110
Any suggestions will be appreciated!
Best regards,
Davy
I am new to Verilog and want to build a 2's Complement Shifter.
I found
%displayb(8'b0001_1000>>2); //Output 0000_0110
%displayb(8'b1001_1000>>2); //Output 0010_0110
So >> is unsigned shift.
How can I build a signed (2's Complement) shift based on >>?
i.e. I want 8'b1001_1000>>2 //Output 1110_0110
Any suggestions will be appreciated!
Best regards,
Davy