Continue to Site

# Questions about complement r-1 and complemet r

Status
Not open for further replies.

#### mikemara

##### Junior Member level 1
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

You did not describe what you are talking about.

http://en.wikipedia.org/wiki/Two's_complement

http://en.wikipedia.org/wiki/Two's_complement

http://en.wikipedia.org/wiki/Two's_complement

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
MODERATOR - SIGNATURE LINKS ARE NOT ALLOWED

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 https://en.wikipedia.org/wiki/Method_of_complements

snafflekid said:
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 https://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

Status
Not open for further replies.