2
$\begingroup$

Let N = 1 000 … 000 1 (n zeros), and M = 111 … 1110 (n ones). What is the decimal value of M and N assuming:

a) Unsigned Binary Representation

b) Two's compliment Representation

c) Signed/Magnitude Representation

I have figured out that:

a) N = $2^{n+1} + 1$ and $M = 2^{n+1} - 2$

Any help with the rest?

$\endgroup$
  • 1
    $\begingroup$ When you use computer terms like these "representations", you should also include a link to their definitions. $\endgroup$ – GEdgar Sep 18 '15 at 13:00
1
$\begingroup$

You are right about a).

b) $N$ is negative. Its complement plus one is: $0 111...111 1$ ($n+1$) ones. Thus,

$$N=-\sum_{i=0}^{n}2^i$$

$M$ is also negative and its complement plus one is: $000...0010$. Thus, $M=-2$.

c) This is easier you just look binary numbers after the sign. Hence, $N$ is negative and $N=-1$. Similarly,

$$M=-\sum_{i=1}^{n-1}2^i$$

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.