# Log in or Sign up.

<-- Previous Next -- > TOPIC: Query: Twos complement representation

**nithinthemax**8/17/2005 1:34:16 AM Category:

**Semiconductors**

Questions posted:

**2**Comments Posted:

**1**

Actually two's complement is used to represnt negative nos:,, but.....

Pls if anyone of you who reads knows abt it pls reply..

Thanking you in advance

Hi

assume 8-bit representation of number.

Two's complement of positive numbers starts with '0'(MSB)

Two's complement of negative numbers starts with '1' (MSB)

+8/ 0000 1000

-8/ 1111 1000

So in 2's comp, when ever it starts with MSB=1, it represents a negative number.

Hope it will help you.

thanks

To find twos complement there are two ways

1.Find 1s complement and add 1.

2.as khushin has described above.

THNX

MY question is how to find twos complement of +8 and -8? IS there any difference??

Anyway thanks for ur reply

Two's complement representation of numbers is different from normal representation ie using four bits one can represent from 0 to 15 in normal binary,but in two's complement it can represent

only from -7 to +7(three bits) and +8(four bits) {16 numbers in total}.It is similar to sign extended representation of numbers.with 0 in the MSB representing positive numbers and

1 for negative numbers.So +8 and -8 differs only in

MSB.Please correct me incase i am wrong

hi

Consider the 2s complement representation: 11100

We start copying from right to left, and the first digit we copy is a 1 so this gives us:

100

We complement the remaining digits, which gives us:

00100

We then convert this from binary to decimal, giving us the result of 4

Our original bit pattern in step 1 started with a sign bit of 1, so that means that our original bit pattern represents a negative value in 2's complement, so our final result is: -4.

suppose u want do perform 0-7=-7

using 2's complement

first 0111 now take 2's com.. 1001

0000+1001=1001

so now u convert it to decimal it is not 9 but -7 i think this will help u

thanks

You have to be logged in to be able to post a comment. To login click here. First time? Sign up. It just takes a few minutes to sign up.

Users with most replies

**User**

**No. of Replies**

© vlsibank

Terms and Conditions · Site Feedback · SiteMap and Unsubscribe

palam82829/7/2005 1:11:27 PMComments Posted:

4