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

2 次查看(过去 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 中查找有关 Numbers and Precision 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by