Two's complement involving binary numbers

375 Views Asked by At

$$0010\ 0100\ 1001\ 0010\ 0100\ 1001\ 0010\ 0100$$ What decimal number does it represent, assuming it's a two’s complement integer?

1

There are 1 best solutions below

7
On BEST ANSWER

Convert the two's complement number $0010~0100~ 1001~ 0010~ 0100~ 1001~ 0010~ 0100$ to decimal.

The leftmost bit is a zero, which tells us that it is a positive number. If it were a $1$, it would be a negative number.

To convert a positive two's complement number to decimal number, we simply convert from binary to decimal. If it were a negative two's complement, we invert each of the bits and add $1$.

Since this is a positive number, we simply convert from binary to decimal and this gives:

$$0010~0100~ 1001~ 0010~ 0100~ 1001~ 0010~ 0100 = 613566756_{10}$$

Perhaps you should review this web site or this web site.