How to convert a negative decimal to binary using the two's complement coding method

조회 수: 21 (최근 30일)
Is there a function to do this in MATLAB?

답변 (1개)

Fangjun Jiang
Fangjun Jiang 2023년 9월 14일
dec2bin(-1)
ans = '11111111'

카테고리

Help CenterFile Exchange에서 Data Type Conversion에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by