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
답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Data Type Conversion에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!