E
Emel
Guest
Hi,
I am using Xilinx ISE Testbench Waveform to simulate my VHDL code and
there is something that confused me:
-256 is equal to '111100000000' in two's complement
notation.'111100000000' is equal to 3840 if you interpret it as having
no sign bit.
In the testbench waveform I have several options to enter the input.
Some of them:
Decimal(Signed)
Decimal(Unsigned)
Binary
You can enter a number in one of these ways and you can also convert
one to the other. Thus, if I enter -256 while in the Decimal(Signed)
option, I expect it to be '111100000000' in the binary option. However,
I get '100100000000' or in Decimal(Unsigned), 2304.
Does Xilinx ISE Testbench Waveform use a representation other than 2's
complement? If I want to enter a negative number and want to process it
as a signed number in my code, how should I enter it in Xilinx ISE
Testbench Waveform?
Thanks in advance for any help
E.
I am using Xilinx ISE Testbench Waveform to simulate my VHDL code and
there is something that confused me:
-256 is equal to '111100000000' in two's complement
notation.'111100000000' is equal to 3840 if you interpret it as having
no sign bit.
In the testbench waveform I have several options to enter the input.
Some of them:
Decimal(Signed)
Decimal(Unsigned)
Binary
You can enter a number in one of these ways and you can also convert
one to the other. Thus, if I enter -256 while in the Decimal(Signed)
option, I expect it to be '111100000000' in the binary option. However,
I get '100100000000' or in Decimal(Unsigned), 2304.
Does Xilinx ISE Testbench Waveform use a representation other than 2's
complement? If I want to enter a negative number and want to process it
as a signed number in my code, how should I enter it in Xilinx ISE
Testbench Waveform?
Thanks in advance for any help
E.