フィルターのクリア

Two's complement appear as large positive (decimal) numbers. How do I convert them to the original negative value?

1 回表示 (過去 30 日間)
Signal from my analog-to-digital converter sometimes gives negative (decimal) values, which are taken forward as two's complement numbers. These numbers appear in as large positive (decimal) numbers. I would like to convert them back to the original negative values. I have tried to use codes found from this site, 'twos2dec' but it takes in binary numbers.
The question is:
Why does the two's complement number appear as a large positive decimal in my file (Shouldn't it be in binary form)?
How do I get it back to the original negative value?
I really need help with this one.

回答 (0 件)

カテゴリ

Help Center および File ExchangeData Type Conversion についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by