2's complement representation

Status
Not open for further replies.

saeddawoud

Full Member level 3
Joined
Apr 27, 2007
Messages
153
Helped
6
Reputation
12
Reaction score
1
Trophy points
1,298
Activity points
2,144
hello
why the 2's complement representation is the best among other representations in computer systems.
Regards
 

hi nice question,

Generaly we use (+) sign for positive No. and (-) sign for negative No. but when we stored data in computer then how computer know that sign there should way to solve it.. so that computer use complement technique where last bit indicate No. sign ( 1 for neg. and 0 for pos. ) ...

thats it,
 

in 2's complement form 0 has only one value that is 0000 for the cae of 4 bit reoresentation as 0 is represented as 0000 and 1111 that +0 and -0 in 1's complement representation.
 

Besides the zero only one representation in 2's complement, it's used because subtraction can be performed as usual addition i.e by representing the second operand by its 2's complement.
 

hello
let me state the question another way: what is the disadvantages of 1's complement representation and sign and magnitude representation other than +ve and -ve zeros??
Regards
 

i dont think there is any other disadvantage other than that.... but even this + and - zero condition is avoided in computers by shifting the zero to the midvalue and making all the numbers unsigned....
 

Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…