Clear Filters
Clear Filters

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

3 views (last 30 days)
Is there a function to do this in MATLAB?

Answers (1)

Fangjun Jiang
Fangjun Jiang on 14 Sep 2023
dec2bin(-1)
ans = '11111111'

Categories

Find more on Data Type Conversion in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!