shaiko
Advanced Member level 5
- Joined
- Aug 20, 2011
- Messages
- 2,644
- Helped
- 303
- Reputation
- 608
- Reaction score
- 297
- Trophy points
- 1,363
- Activity points
- 18,302
Hello,
signals a,b,c are defined as follows:
in my code I write:
Because I'm using signed numbers, I expect the result to be
minus 1. Which in signed binary is: 10000001
However the result is: 11111111
What did I do wrong?
signals a,b,c are defined as follows:
Code:
signal a : signed ( 7 downto 0 ) := "00000000" ;
signal b : signed ( 7 downto 0 ) := "00000001" ;
signal c : signed ( 7 downto 0 ) ;
in my code I write:
Code:
c <= a - b ;
minus 1. Which in signed binary is: 10000001
However the result is: 11111111
What did I do wrong?