194 views

2 Answers

2 2 votes

Method $\mathbf{1}:$ The Place Value (Positional Weight) Method

In $2$'s complement, the most significant bit (MSB) has a negative weight, while all other bits have their standard positive weights. For an $8$-bit number, the weights from left to right are:

$-128,\ 64,\ 32,\ 16,\ 8,\ 4,\ 2,\ 1$.

Matching our binary number to these weights:

  • $\mathbf{1} \times (-128) = -128$

  • $\mathbf{0} \times 64 = 0$

  • $\mathbf{0} \times 32 = 0$

  • $\mathbf{1} \times 16 = 16$

  • $\mathbf{0} \times 8 = 0$

  • $\mathbf{1} \times 4 = 4$

  • $\mathbf{1} \times 2 = 2$

  • $\mathbf{0} \times 1 = 0$

Now, sum the values:

$-128 + 16 + 4 + 2 = \mathbf{-106}$

 

 

Method $\mathbf{2}:$ The Invert and Add $\mathbf{1}$ Method (Finding the Magnitude)

Because the leftmost bit is a 1, we know the number is negative. To find out its exact magnitude, we can reverse the $2$'s complement process:

Step $\mathbf{1}:$ Find the $\mathbf{1}$’s complement

Invert every bit (change $0$s to $1$s, and $1$s to $0$s).

Original$: 10010110$

Inverted$: 01101001$

Step $\mathbf{2}:$ Add $\mathbf{1}$

Add $1$ to the inverted result to find the positive magnitude.

$$01101001 + 1 = \mathbf{01101010}$$

Step $\mathbf{3}:$ Convert the result to decimal

Convert the positive binary number $01101010$ to decimal:

$$64 + 32 + 8 + 2 = 106$$

Since we knew from the beginning that the original number was negative, we add the negative sign back, giving us $\mathbf{-106}$.

Answer:
Position:
Show:

Related questions

8 8 votes
2 2 answers
206
206 views
GO Classes asked Jun 2
206 views
Let $X$ be the number of distinct $12$-bit integers representable in $2$’s complement form. Let $Y$ be the number of distinct $12$-bit integers representable in $1$’s com...
4 4 votes
1 1 answer
163
163 views
GO Classes asked Jun 2
163 views
In an $n$-bit signed number system, zero has exactly $2$ different representations in which of the following representations?Sign-magnitude and $1$’s complement only $2$’...
4 4 votes
3 3 answers
212
212 views
GO Classes asked Jun 2
212 views
Given that $A$ and $B$ are two $8$-bit $2$’s complement numbers where $A=10000001$ and $B=11111110$, then the sum $A+B$ is:$01111111$ $10000011$ $01111101$ $11111111$
2 2 votes
2 2 answers
197
197 views
GO Classes asked Jun 2
197 views
The smallest integer that can be represented using a $12$-bit number in $2$’s complement form is