Understanding the Two's Complement System

  • Thread starter Thread starter ehrenfest
  • Start date Start date
  • Tags Tags
    System
AI Thread Summary
The discussion clarifies the concept of two's complement, emphasizing that it is primarily used to represent negative numbers in a given radix system. When expressing a positive number, such as 5, the two's complement system does not apply, as the number is simply written as is. The two's complement system involves calculating the r's complement, which is used to express negation, defined as r^n minus the number. It is noted that the complement method is only relevant for negative values, reinforcing that positive numbers do not require this representation. Overall, the two's complement system is essential for understanding negative number representation in binary systems.
ehrenfest
Messages
2,001
Reaction score
1

Homework Statement


let me check my understanding of what a twos complement

when you use the rs complement system that means you use that system to express negative numbers only; in order to express the rs complement of a number you take r^n - that number; however if the number you want to express is positive then you do not really use the twos complement system, so it is somewhat of a misnomer.

I mean that even if we are working in the two's complement system and we want to express 5 we do not take r^n - 5,we just write 5

does all that make sense


Homework Equations





The Attempt at a Solution

 
Physics news on Phys.org
r's complement

r's complement is a way to express negation in a given radix r, when the number of available digits is limited to n-1.

So, by obtaining r's complement, you're really obtaining a negative number.

So, obviously, it doesn't apply to positive numbers unless you want to turn them negative :)

A complement, in given radix, always behaves as a negative number as long as the number of digits you're considering is less than n.
 
Back
Top