necratog
Electrical
- Aug 10, 2005
- 2
Hello,
how do i get a two's complement of an integer in Matlab?
I want to get a 16 Bit two's complement vector of an integer.
It is not possible to use dec2binvec and adding a binary '1' afterwards. I get a '0001010001010102' as an example.
Does anybody know how it works?
Thanks a lot!
Greetings,
necratog
how do i get a two's complement of an integer in Matlab?
I want to get a 16 Bit two's complement vector of an integer.
It is not possible to use dec2binvec and adding a binary '1' afterwards. I get a '0001010001010102' as an example.
Does anybody know how it works?
Thanks a lot!
Greetings,
necratog