| Author |
Message |
mikemara
Joined: 26 Oct 2009 Posts: 2 Location: Israel
|
26 Oct 2009 22:57 Questions about complement r-1 and complemet r |
|
|
|
|
1. Do we use this complement technics just only to present negative numbers?
2. Does this complement technic working only with binary base? If its working also with dec base and oct base can you explain how?
And the last thing, It will be nice if you let me see some examples showing how it works.
thax , Mike
|
|
| Back to top |
|
 |
Google AdSense

|
26 Oct 2009 22:57 Ads |
|
|
|
|
|
|
| Back to top |
|
 |
Audioguru
Joined: 19 Jan 2008 Posts: 1149 Helped: 95 Location: Toronto area of Canada
|
26 Oct 2009 23:49 Questions about complement r-1 and complemet r |
|
|
|
|
| You did not describe what you are talking about.
|
|
| Back to top |
|
 |
mikemara
Joined: 26 Oct 2009 Posts: 2 Location: Israel
|
27 Oct 2009 6:02 Questions about complement r-1 and complemet r |
|
|
|
|
may be this will help you recall what I am talking about
http://en.wikipedia.org/wiki/Two's_complement
Added after 1 minutes:
May be this will help you recall what I am about
http://en.wikipedia.org/wiki/Two's_complement
Added after 1 minutes:
http://en.wikipedia.org/wiki/Two's_complement
|
|
| Back to top |
|
 |
siongboon
Joined: 24 Jan 2006 Posts: 288 Helped: 25 Location: Singapore
|
27 Oct 2009 15:14 Re: Questions about complement r-1 and complemet r |
|
|
|
|
Hi,
I guess binary number is man made.
Because in electronics/computer,
it is not efficient to storage a char '-'.
all number will need to be in binary.
To represent the binary in a efficient way,
this system is inverted.
binary + -
000 0 0
001 1 1
010 2 2
011 3 3
100 4 -4
101 5 -3
110 6 -2
111 7 -1
as you can see, you can count the numbering system
as a unsigned number or signed number.
The counting value will still be in a circular counting directly,
either increasing or decreasing count.
When doing increment instruction, we need not have
to worry about the sign, as they will be in sequence,
overflow again and again.
This is what I think should be the reason.
As for other numbering, storage in computer will still be in binary.
They will be converted and display to user as -ve value.
Best Regards,
Siong Boon
www.siongboon.com
|
|
| Back to top |
|
 |
snafflekid
Joined: 09 May 2007 Posts: 120 Helped: 16 Location: USA
|
30 Oct 2009 8:04 Re: Questions about complement r-1 and complemet r |
|
|
|
|
The point of two's complement is to do math with only using addition. Logic cells can easily add, but to subtract requires a lot more work.
Complements can be found in any base but it is not very useful. Decimal would be 10's complement. Hexadecimal would be 16's complement. Binary would be 2's complement. see http://en.wikipedia.org/wiki/Method_of_complements
Added after 7 minutes:
| snafflekid wrote: |
The point of two's complement is to do math with only using addition. Logic cells can easily add, but to subtract requires a lot more work.
Complements can be found in any base but it is not very useful. Decimal would be 10's complement. Hexadecimal would be 16's complement. Binary would be 2's complement. see http://en.wikipedia.org/wiki/Method_of_complements |
ah how. Take a number. To find the n's complement replace each digit with the digit required to add it up to n.
7a1f Hex
85e0 f's complement
85e1 16's complement (15's + 1) there is no letter for 16 in hex
|
|
| Back to top |
|
 |