Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations KootK on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

two's complement of an integer in Matlab?

Status
Not open for further replies.

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
 
Replies continue below

Recommended for you

Status
Not open for further replies.

Part and Inventory Search

Sponsor