Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Questions about complement r-1 and complemet r

Status
Not open for further replies.

mikemara

Junior Member level 1
Joined
Oct 26, 2009
Messages
16
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Location
Morocco
Activity points
1,420
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
 

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
 

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

Added after 7 minutes:

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.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top