2s complement to decimal converter

Version 1.0.0.0 (1.18 KB) by Reza
Converts 2s complement to signed decimal equivalent
2.5K Downloads
Updated 1 Jun 2010

View License

Converts 2s complement to signed decimal equivalent. Takes two arguments - the data, and the number of bits wide the data is. For example:

out = twos2decimal(data,16);

Cite As

Reza (2024). 2s complement to decimal converter (https://www.mathworks.com/matlabcentral/fileexchange/27816-2s-complement-to-decimal-converter), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2010a
Compatible with any release
Platform Compatibility
Windows macOS Linux
Categories
Find more on Numeric Types in Help Center and MATLAB Answers

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Version Published Release Notes
1.0.0.0