First order? Save 5% - FIRST5 close
Anonymous

how do i find the twos complement representation of both positive and negative decimal numbers?

for example -5 and 1024,these r decimal numbers.hope any 1 can help me.

Top 1 Answers
therasec

Favorite Answer

The easiest way to do this is by converting the decimal number into a positive binary. After that all you have to do is apply a bit-wise NOT operation and add a 1 to the result. For example decimal 5 is binary 0101. If we want to find the two’s complement we simply apply the NOT (1010) and add 1 to the result (1011). This number (1011) represents decimal -5 in two’s complement notation.
0

Give your grades a lift Order